[Vala] Newbie question (spawn_async_with_pipes)



Hi all,

from the valadoc of "spawn_async_with_pipes" i tried the following with ending in a "received signal SIGSEGV, Segmentation fault."

I hope someone can help me understand/fix that.....


textView.buffer.text = ""; *<------   works fine !!!!*
Process.spawn_async_with_pipes (".", spawn_args, spawn_env, SpawnFlags.SEARCH_PATH | SpawnFlags.DO_NOT_REAP_CHILD, null, out pid, out input, out output, out error);
// stdout:
IOChannel compilerOutput = new IOChannel.unix_new (output);
compilerOutput.add_watch (IOCondition.IN | IOCondition.HUP, (channel, condition) =>
{
    if ((condition & IOCondition.HUP) == IOCondition.HUP)
        return false;
    string line;
    channel.read_line (out line, null, null);
    TextIter endIter;
    textView.buffer.get_end_iter(out endIter); *<------ **"received signal SIGSEGV, Segmentation fault."*
    textView.buffer.insert(ref endIter, line, -1);
    return true;
});
.......


What i am doing wrong???

/Wolfgang



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]