View Full Version : Any idea why this crashes Lightwave?

11-29-2007, 08:03 PM
I'm writing a channel modifier plugin, which itself can have an envelope. As soon as I click on the E button on my XPanel, LW crashes deep in its guts.

I've trimmed the code to the bare minimum (ie, no actual content of my particular plugin - just skeleton enough to demo the crash). Source attached. Any help appreciated.

11-30-2007, 02:00 AM
I guess it is impossible to put an envelope in ...
an envelope.
Except faking the E button, just to create
a new channel, but it couldn't be edited directly
by user, see the NoisyChannel2 plugin from


11-30-2007, 04:25 AM
Try disabling evaluation function with GVParmFunc->getVal() to see whether it's not crashing anymore..

11-30-2007, 05:18 AM
Removing the call didn't help. Same crash location.

11-30-2007, 05:22 AM
Note that LW has no problem with the vparm construction or usage. If you fill in a single value on the XPanel, the plugin will work fine. It's only when you try to make it an envelope. In fact, LW *does* make it an envelope just fine, and it even shows it in the Graph Editor just before the crash.

12-06-2007, 07:36 PM
Just out of curiosity have you stepped through the plugin line for line?? I had some crashing going on in a plug in and after doing step by step I found it didn't like me cleaning up data before the done(); command.

Just curious.

12-06-2007, 08:13 PM
It wasn't anything in my code. However, I've successfully side-stepped the issue by putting a button on the XPanel and having its click event open the graph editor. So, I'm all clear now. I'm almost done with the plugin itself (still ironing out some perf issues) and then I'll release it.