System.exit(1) troubles

Apr 11, 2006 at 11:23am

System.exit(1) troubles

When used into max world, exceptions and exit statements like
System.exit(1) lead to a major windows crash (i mean over 100% for
20min, no way to get the task manager up, dirty reboot). Is it just me
or do we have to define another way to terminate the process when we got
an execption ? What if we just keep, for example, the
e.printStackTrace();, but erase the System.exit(1); ??

best regards

f.e


f.e chanfrault | aka | personal computer music
> >>>>>> http://www.personal-computer-music.com
> >>>>>> objects for max/msp | C, java & python

#25355
Apr 11, 2006 at 12:14pm

I don’t think the jvm can quit max this way (ben or topher, correct me
if i’m wrong).
I found a workaround by sending a bang in a
[; max quit] messagebox.

If your error appears at object instantiation, use the bail() method
(like bogus).

Exceptions should be caught and they should terminate the process only
when major errors appears.
In my opinion, you should output major errors to max window or to a log
file.

Léo

#74581
Apr 11, 2006 at 12:18pm

Thanks again, Leopold. I forgot about bail()…

cheers

f.e

f.e chanfrault | aka | personal computer music
> >>>>>> http://www.personal-computer-music.com
> >>>>>> objects for max/msp | C, java & python

#74582
Apr 11, 2006 at 5:22pm

#74583
Apr 11, 2006 at 7:04pm

#74584

You must be logged in to reply to this topic.