This has happened to me occasionally in the past. I think it's usually that some routine that is getting called after post() is accessing an automatic variable (on the stack) without having set it earlier. The post() call is simply changing the behavior by using the stack itself.
If you can't catch it with gdb (which might allow you to avoid adding printout) another strategy is to try moving the post() line further down in the code - if by moving it below some other line you make it fail again, some function call in that line might be doing the bad access.
cheers M
On Fri, Sep 12, 2014 at 01:27:53AM +0100, Ed Kelly wrote:
Hi devs,
I've recently, and a number of times in the past had a problem with writing externals which is this: An external is supposed to output something (such as a list) from an internally stored array, and it does not work. When I add a post("This is this %d",x->theValue); It starts working. This has happened to my code more than once, both in Pd under Linux and in libPd in iOS. It's happened not just recently, but over a number of years. I wonder if there is a relationship between Pd and the use of internal arrays that has to be cemented in some way before it can work, and if there is some problem in the Pd code (or I might be stupid about something). I'll try to find a simple way of demonstrating this - the current extern is about 1800 lines of C, but maybe I can cook up a test if I have time.
Has anyone else had this problem? Ed
Ninja Jamm - a revolutionary new music remix app from Ninja Tune and Seeper, for iPhone and iPad http://www.ninjajamm.com/
Gemnotes-0.2: Live music notation for Pure Data, now with dynamics! http://sharktracks.co.uk/
Pd-dev mailing list Pd-dev@lists.iem.at http://lists.puredata.info/listinfo/pd-dev