Does Object Exist(Or Something)

This forum is currently in read-only mode.
From the Asset Store
112 High-Quality destruction sounds for videogames
  • Okay, I have a question about some plugin things. I just found a crash associated with my IK plugin. If the objects the IK plugin is using aren't there(if you have them destroyed at the start, for example), Construct will crash since it can't find any objects to use. I know Construct shouldn't crash, but is there some code I need to put into my plugin to keep it from crashing?

  • When it crashes, does it crash in your plugin? Use debug to find out. If it doesn't, then you should submit it as a bug.

  • If you're using something like GetTypeInstances, it'll return NULL and 0 if no instances exist, so you just need some basic error checking. If you're holding a pointer to an object (CRunObject*), if it's destroyed the pointer becomes invalid. You must check the object->info.destroying flag in OnFrame2(), and if it's set true, you must stop using the pointer (set it to NULL/erase it/whatever's appropriate).

  • Rich - Construct crashes. I'll go ahead and submit it as a bug as soon as I can.

    Ashley - I'm pretty sure I'm using CRunObject, but I need to reinstall VC so I can check. Ultimately, I kind of stumbled around like a blind person when making the plugin.

  • But is it a function call from your object? If so which?

    I'd use the debugger religiously so you have information to put in the report, if it turns out to be a bug on our side.

  • I've seen the bug report, but this still sounds like a bug in your plugin. Even if it crashed in Construct it could easily be a bug in your plugin, eg. if your plugin calls a runtime function which crashes because you called it wrong, the crash will occur in the runtime, but will have been caused by your plugin further up the call stack. It's still possible to cause the runtime to crash even if the plugin isn't in the call stack with a badly written plugin. Maybe if you attach the source code to the bug report I can take a look.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I finally got around to fixing this. Or rather, I completely rewrote the plugin. I added some error checking, and everything works perfectly now.

  • error checking++

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)