You are not logged in.
I am trying to create a GtkTreeView widget, but as soon as it (or something else related to it) gets in, all I get is segmentation fault.
No compilation errors so far. Runtime also results in a one-liner (segfault) and no additional/useful information.
Here are a few examples (just to make sure I'm not doing anything wrong):
Relevant (I guess) packages installed:
core/glibc 2.18-11 (base) [installed]
core/gcc 4.8.2-7 (base-devel) [installed]
extra/gtk2 2.24.22-1 [installed]
extra/gtk3 3.10.6-1 [installed]
What's wrong?
If I ditch GtkTreeView and widgets associated with it, everything works just as one would expect it to.
Update:
I don't know what I am doing (not the whole thing; just this), but I ran gdb and after a few breakpoints I got this:
Program received signal SIGSEGV, Segmentation fault.
0xb7b5156f in gtk_cell_layout_pack_start () from /usr/lib/libgtk-3.so.0
Last edited by EUR (2014-01-02 20:42:18)
Offline
Are you running those example exactly, or did you just use them as a template for your own program? If the latter, can you show the actual code you are using.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
At first I was just looking at those examples and writing the code myself, but after I ran into this issue, I tried those examples exactly as they are (copy/paste) and nothing changed.
Funny that they do actually work on my second laptop - architecture and package versions are the same.
I tried re-installing packages listed above and that didn't change a thing either.
Last edited by EUR (2014-01-02 20:32:41)
Offline
Lets stick with the first example. How are you compiling it?
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Are you using GTK 3?
Are you compiling with debugging information on? ("gcc -g")
Here's how to use GDB:
$ gdb myapp # Start the debugger
run # Start your application
# Now do something to make your application crash
bt # To show the "backtrace"
If you post the debugging information, please also your code.
Offline
Lets stick with the first example. How are you compiling it?
Thank you for being here while I was just .. unfortunatelly, dumb.
I increased the list size (column count) without adding additional type (G_TYPE_STRING) arguments.
Fixed that and everything's back to normal.
Are you compiling with debugging information on? ("gcc -g")
Compiling with -g doesn't reveal my mistake.
Last edited by EUR (2014-01-02 20:43:28)
Offline
No problem - though I'm far from a professional, I do quite a bit of coding and pebkac segfaults and me are old friends that are regularly reaquainted. They are often due to issues with array bounds or bad pointers.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline