Search code examples
gtkarmdebianwxwidgets

Segmentation fault from outside of my code


I have a wxWidgets/GTK based application that works well - except for one installation on an Debian Squeeze ARM system. There it crashes when the user just activates the main window of it. To find the reason for that I added a signal handler to the application and use libunwind out of that signal handler to find the source for the crash. During a test that worked fine, when the software writes e.g. to address 0x0 libunwind correctly points me to the function where that happens.

But the results for the system where the crash appears unexpectedly are a bit strange, they seem to happen outside of my application. One crash comes from a function with no name (here libunwind returns an empty string), and one is caused by "malloc_usable_size", a system function which should never die this way.

So...what to do next? All ideas, suggestions or any other hints are welcome since I'm not sure how to contunue with that problem...


Solution

    • Check for buffer overrun or overwriting some memory unexpectedly for any structures, pointers, memory locations for items returned by library functions.
    • Check for invalid pointer frees in your code for the library allocated pointers that you are using.
    • May be using valgrind would also help.