hi all,
i am writing a filter plugin using cs5 sdk on a mac (with XCode 3.1.4).
at some point, i need to allocate memory inside the program, and i do that via malloc(), followed by a free() inside the DoFilter() function.
all this works perfectly under osx leopard, but when i try to run it under snow leopard, it crashes like this:
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Application Specific Information:
abort() called
Thread 0 Crashed: Dispatch queue: com.apple.main-thread
0 libSystem.B.dylib 0x00007fff81c78616 __kill + 10
1 libSystem.B.dylib 0x00007fff81d18cca abort + 83
2 libSystem.B.dylib 0x00007fff81c306f5 free + 128
3 Dissolve 0x0000000123abd75a DoFilter() + 3593
4 Dissolve 0x0000000123abd98e DoStart() + 254
5 Dissolve 0x0000000123abeacb PluginMain + 2502
it is quite obvious that this is not a plug-in problem proper, but rather an os problem. as soon as i comment out the free() functions, the plug-in works as expected - but this is, of course, a nasty practice.
i thought this might be due to some kind of incompatibility between the system libraries of snow leopard and leopard, so i re-compiled the plug-in under snow leopard with no hassle, but the result is the same. in other words, snow leopard doesn't like me to free() memory at all. :-)
does anyone has an idea about the reason for this behaviour?
bypassing malloc() completely by defining buffers in the Data struct of the plug-in would be an idea, but for what i need to do this would be a simpler method.
any suggestion is really welcome!
all the best and thanks in advance for your replies,
marco olivotto