|
Hi, I am developing an application that toggles the screen in Debian 6 Platform.
In earlier days I done this with Debian 5, It works good. But if I use the same code in Debian 6, I face a segmentation fault in libgtk-x11-2.0.so.2000.0 and libgdk-x11-2.0.s0.2000.0. Since they are Library files I cant do anything with that. Is there any other possibility to prevent my application from facing Segmentation fault???
Expecting for a quick reply
Thanks & Regards
Srivathsan
|
|
|
|
|
I don't think anyone is likely to be able to guess why your program fails. You need to do some diagnosis to find out where the segmentation fault occurs, and what the last call out from your code was.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
This is the Snippet I got when tried to trace the Segmentation fault using GDB
#0 0xb7281601 in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#1 0xb7282835 in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#2 0xb7052381 in ?? () from /lib/libglib-2.0.so.0
#3 0xb7054305 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#4 0xb7057fe8 in ?? () from /lib/libglib-2.0.so.0
#5 0xb7058527 in g_main_loop_run () from /lib/libglib-2.0.so.0
#6 0xb7418b69 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#7 0x080e82a1 in main_callback (data=0x0) at src/dispimage.c:155
#8 0xb707e6cf in ?? () from /lib/libglib-2.0.so.0
#9 0xb77a7955 in init_rotgrids(rotgrids**, int, int, int, double, int, int, int, int) () from /lib/i686/cmov/libpthread.so.0
#10 0xb6f99e7e in clone () from /lib/i686/cmov/libc.so.6
|
|
|
|
|
#7 0x080e82a1 in main_callback (data=0x0) at src/dispimage.c:155
I guess that's your first clue. But really, you have to do some analysis here; we cannot begin to guess what is going on in your code.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
I tried out with GDB to detect the place where Segmentation fault Occurs. I cant able to retrieve any local Variable's Information at that place. Is there any good tool to trace Segmentation Fault?
Thanks & Regards
Srivathsan
|
|
|
|
|
SrivathsanRaghavan wrote: Is there any good tool to trace Segmentation Fault? None that I am aware of. Unfortunately they are often difficult to catch without a good back stacktrace. The best you can do is add some extra trace/debug code into your program and see if you can collect some more information before the fault occurs.
One of these days I'm going to think of a really clever signature.
|
|
|
|