[chuck-users] Debugging Segmentation fault: 11

Joel Matthys jwmatthys at gmail.com
Tue Jan 27 16:01:38 EST 2015


I assume you're on Linux or OSX. (If it's Windows, I'm clueless.)

For me on Ubuntu I type:

$ *gdb chuck*

and then once it starts up and I get the (gdb) prompt I type:

(gdb) *run my_chuck_file.ck*

Of course GDB slows down your system, A LOT, but you can keep it running 
until it hits the segfault. The spew should (hopefully) point toward a 
specific place in the chuck code that is the problem. (Type q to exit 
gdb.) You might want to copy the error messages here for the devs to 
look into.

Joel

On 01/27/2015 02:53 PM, Gonzalo wrote:
> Never used gdb before, I'll read about this, but any pointers on how 
> to get started?
>
>
> On 28/01/2015 7:39 am, Joel Matthys wrote:
>> It's hard to debug segfaults in the ChucK code itself. running gdb chuck
>> might help narrow down the problem.
>>
>> Joel
>>
>> On 01/27/2015 02:31 PM, Gonzalo wrote:
>>> Hi,
>>>
>>> On a project I'm working on, I sometimes get a "Segmentation fault:
>>> 11" error, and the program crashes. But I can't figure out when it
>>> happens, and cannot reproduce it. It's a big project, with many
>>> components communicating via events, and I have no idea who's
>>> triggering the problem. My question is how would you go about
>>> debugging this? Any ideas what can be triggering it? It sounds very
>>> generic...
>>>
>>> Probably unrelated, but just in case, I also got this (only once so 
>>> far):
>>>
>>> chuck(22226,0x7fff790ee310) malloc: *** error for object 0x1028f3408:
>>> incorrect checksum for freed object - object was probably modified
>>> after being freed.
>>> *** set a breakpoint in malloc_error_break to debug
>>> Abort trap: 6
>>>
>>> Thanks!
>>> Gonzalo
>>> _______________________________________________
>>> chuck-users mailing list
>>> chuck-users at lists.cs.princeton.edu
>>> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
>>
>> _______________________________________________
>> chuck-users mailing list
>> chuck-users at lists.cs.princeton.edu
>> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
>>
> _______________________________________________
> chuck-users mailing list
> chuck-users at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20150127/9c6b45f9/attachment.html>


More information about the chuck-users mailing list