PDA

View Full Version : Crash in 2010 (not 2009-) - scripted plugin, ui link + ui access during creation


ZeBoxx2
05-19-2009, 05:31 PM
Yeah, crappy title, but can only fit so much and figured I'd drop keywords in there.

To the point, then.

plugin simpleObject myTest classID:#(0x6d21bd57, 0x30c14d86) (
rollout roll_test "test" (
pickbutton pickObj
)

parameters main rollout:roll_test (
testVal type:#node subAnim:true ui:pickObj
on testVal set val do (
local myUI = this.roll_test
)
)

tool create (
on mousePoint click do (
case click of (
1: (nodeTM.translation = gridPoint; #stop)
)
)
) -- end create tool
) -- end plugin definition


-- let's create a setup
(
test = myTest()
test.testVal = sphere()
)


The code above crashes with a ** system exception ** and then a soft crash in 3ds Max 2010, while it seems to work fine in 3ds Max 2009.

If I remove the red part, it no longer crashes, but I've lost the UI hook-up.
If I remove the green part, it no longer crashes, but then that means I simply cannot access elements in the UI.
If I remove the blue parentheses, things also no longer crash. However, I'd rather not have to invoke my 'doDelayed()' function. ( on the up side, I can. )

Setting a local variable in 'on postCreate' and checking for that variable before trying to access the UI didn't work, so I've left that code out of the above example.

Any and all thoughts as to the proper way to do this are welcome.

And yes, I should report this as a bug. However, I'm still stuck on the infamous Swindon junction with the support channels on a 3ds Max 2010 Trial startup crasher, trying to explain I'm having no difficulty whatsoever downloading the trial, but rather in -running- the thing. I'm nonplussed. /vent

ZeBoxx2
05-23-2009, 08:00 PM
alright, doDelayed() consistently failed after all.

The only reasonable solution I could come up with was to move the parameter I need to a separate parameter block, not specify a ui:<rollout> for that block so that I could access the UI from that block without crashing, while the other parameters in the original block still have themselves linked automatically to the UI.

As the UI > Parameter hookup was just for letting a picked node (pickbutton UI element) automatically set a node parameter, the only other change required was a picked() event handler for the pickbutton UI element, in which I then set the parameter manually.
( The parameter, in turn, sets the UI element's label; as it did before, as this does not happen automagically for pickbuttons linked to node parameters )

PEN
05-24-2009, 12:39 PM
This might be a good one for Larry Richard. None if my RAIC system control will load in 2010 either and it looks like there is a big problem with the order that things are being loaded when Max starts. At this point the entire system that I have developed for my clients is broken in 2010.

grabjacket
05-25-2009, 09:19 AM
Hi,

i seemed to have had a similar problem, though on max 2010 64 bit only: http://forums.cgsociety.org/showthread.php?f=98&t=762726

I could work around this problem by switching event-handlers. But some situations (like yours) don't have easy fixes.

Do you think these two situations are related?

Klaas

CGTalk Moderation
05-25-2009, 09:19 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.