THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 04/05/2006 at 09:30, xxxxxxxx wrote:
Cinema 4D Version: 9
Platform: Windows ;
Language(s) : C++ ;
I've got lots of crashes when using my plugin in C4D.
The most frequent is when using the GetNext() method.
Here is an example where this crash is triggered:
bool IsObjectPresent(BaseObject *obj)
BaseObject *cur = GetActiveDocument()->GetFirstObject();
if (cur==obj) return true;
cur = cur->GetNext(); <---- here a crash is triggered
I also get some crashes sometimes when calling the AddEvent() function with a parameter (without it works well).
I wondered if this is caused by the fact that one of these functions is called outside the main thread, so:
- I tried to use the GeIsMainThread() function but this one also crashes!!!
- I tried to use SpecialEventMessage() to get the main thread execute some code, but it also crashes in the main thread......
I don't understand why calling such a simple function like GetNext() on the list of the objects can trigger a crash...
Thanks for your help guys!