atom feed9 messages in at.iem.pd-listRe: [PD] Crasher bug found...
FromSent OnAttachments
Luke IanniniFeb 1, 2009 12:43 am.txt, .pd, .pd
Hans-Christoph SteinerFeb 1, 2009 11:55 am 
Mathieu BouchardFeb 1, 2009 6:17 pm 
Miller PucketteFeb 2, 2009 9:05 am 
Mathieu BouchardFeb 2, 2009 9:38 am 
Miller PucketteFeb 2, 2009 6:44 pm 
Luke IanniniFeb 10, 2009 4:06 am 
Mathieu BouchardFeb 10, 2009 6:01 am 
IOhannes m zmölnigFeb 10, 2009 10:14 am 
Subject:Re: [PD] Crasher bug found...
From:Mathieu Bouchard (mat@artengine.ca)
Date:Feb 2, 2009 9:38:52 am
List:at.iem.pd-list

On Mon, 2 Feb 2009, Miller Puckette wrote:

I'll check this out - I've had a couple of wierd moving crashes before and it's largely as Mathieu says, switching stuff around and using some intition.

I don't know whether you use Valgrind, but I would very much recommend it. It runs your programme in a sort of emulator that checks all memory accesses. It can help you find a lot more bugs than gdb can. It can tell you whether it's an uninitialised pointer, dangling pointer, double free, buffer overflow, etc., and give you both a backtrace of the problem and a backtrace of the related malloc (!!!).

The main downside is that there can be a lot of false positives, so you have to learn to recognise those as such and perhaps have to make yourself a "suppression file" to hide them.

The other main downside is that it can't find most stack-related problems because that would require the collaboration of the compiler. But most of the trickiest bugs tend to be malloc-related rather than stack-related.

Of course you can't debug everything with valgrind and this is why I also use gdb.

I wish gdb were more customisable, so that for example it could print a t_symbol * like:

gensym("hello")

for example. it could save a lot of time.