Segmentation Fault Question



Appologies if this isn't the right place to post this!

A program I'm writing, using GTK, is failing to run correctly. In short it throws out a segmentation fault the first time I call something gtk related other than gtk_init.

My code is at http://www.srcf.ucam.org/~mrh30/sandbox.c
with header file sandbox.h from the same address.

The fault originates somewhere in the function permittedsyscall. If I comment out the line 'display();' in the above function, the program runs as expected and will output a list of all the files opened by the program run through the sandbox.

If you get rid of the code to extract those filenames and put the display() line back in, it also runs (apparently) correctly, putting a window up on screen.

If I have both however, I get segmentation faults, which I would have thought was quite odd since neither part has any dealings with the other part.

Mel




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