[java-dev] Re: Crash Report: call outlet() with an invalid outlet index
Adam Murray
adamjmurray at gmail.com
Thu Feb 14 10:39:04 MST 2008
- Previous message: [java-dev] Re: Crash Report: call outlet() with an invalid outlet index
- Next message: [java-dev] Re: Crash Report: call outlet() with an invalid outlet index
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Quote: Peter Castine wrote on Thu, 14 February 2008 02:33 ---------------------------------------------------- > > It's probably far too late to change the implementation... but it seems that in the Java mindset, it would be more idiomatic to have checking the default behavior Yes, exactly. Crashing Max because of a bad outlet reference is caused by accessing an invalid location in memory. Java manages memory for you, so you get used to the idea that things like this won't happen. But since MXJ calls into the underlying Max C implementation, of course this kind of crash is possible. > > It's exceptional for an object to have a reason to speak to a null outlet, but seems it can happen. ... Java gives you this feeling of comfort that no matter how stupidly you code, Everything Will Be All Right... Well I have had my share of stupid coding moments, but to put this in perspective: I was running into this problem with my ruby object, because I have no control over what scripts the user will try to evaluate. It is entirely possible, and very easy, to reference a null outlet from a script and instantly crash Max. So I had to jump through some extra hoops to make sure this can't happen. Now I'm a little wiser :) -- Adam Murray compusition.com
- Previous message: [java-dev] Re: Crash Report: call outlet() with an invalid outlet index
- Next message: [java-dev] Re: Crash Report: call outlet() with an invalid outlet index
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
