Script can crash moho

Discuss Moho bugs (or suspected bugs) with other users. To report bugs to Smith Micro, please visit support.smithmicro.com

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
macton
Posts: 93
Joined: Thu Aug 18, 2005 6:29 am
Location: San Diego

Script can crash moho

Post by macton »

point.fAnimPos:SetValue( moho.frame, nil ) will crash Moho.
Obviously a bug in the script, but you had mentioned in another thread that you wanted to protect Moho from crashing on bad scripts.

Edit: This is in a tool script

Also, improperly trying to access functions can crash Moho in a tool script.
e.g.
LM.Beep() (instead of LM:Beep())
User avatar
Lost Marble
Site Admin
Posts: 2355
Joined: Tue Aug 03, 2004 6:02 pm
Location: Scotts Valley, California, USA
Contact:

Post by Lost Marble »

Yes, it is possible for a script to crash Moho. Lua itself is supposed to prevent crashing, but when you call Moho functions, you are basically calling C++ functions, so passing invalid data (in particular, invalid or NULL pointers) can cause a crash. It would be quite difficult to avoid these problems in all cases, but I'm not even sure if it's desireable. It would introduce a lot of parameter checking that would slow things down.
Post Reply