Shop OBEX P1 Docs P2 Docs Learn Events
Terminal stops receiving messages after OutOfMemoryError — Parallax Forums

Terminal stops receiving messages after OutOfMemoryError

Don FrenchDon French Posts: 126
edited 2007-05-18 21:01 in General Discussion
Is it just me or does the terminal stop displaying debug messages semi-permanently after there is an OutOfMemoryError? Re-setting the Javelin does not help. Powering it off and back on does not help. Disconnecting the serial cable from the Demo board and re-connecting it does not help. The only thing that works is to re-Program the Javelin or to reboot the PC. It is like the com port is dead until you do a reprogram. And since that takes several minutes with a large program, this turns out to be a major irritation and has me shouting out loud. So, am I missing something? Anyone else have this problem? Anyone know of a better solution than re-programming the Javelin or rebooting the PC?

Comments

  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2007-05-18 04:37
    you could be right. Then again, after an Out of memory error, which identifies
    a programming error, the next step is to overlook your· program and change it
    to prevent any Out of memory error to occur, and then reprogram.
    That is the way I handle Out of memory errors. I never reset or restart
    a program that shows this error as there is little point.
    Have you tried single step debugging?

    regards peter
  • Don FrenchDon French Posts: 126
    edited 2007-05-18 17:36
    In my experience, single stepping is seldom the easiest way to solve a problem. Maybe it is useful when you are a newbie who doesn't understand how some aspect of the language functions, but it is nearly useless for almost everything else. Once in a while I might put in a few breakpoints to take a look at the state of things, but nothing compares in usefulness to spitting out debug messages. Sometimes those messages must occur in code that repeats, causing many messages and the subsequent dreaded out of memory error. What would be nice is if 1) getting an out of memory condition did not kill the com port. (That has to be considered a bug in my opinion.) 2) Garbage collection was added to the JVM so that out of memory condition never occurs. Since garbage collection can be a problem for real time, time-dependent code, there probably needs to be a method to suppress and another to activate GC. Just my two cents.
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2007-05-18 18:57
    What I meant with debug:
    Debug allows you to run your application at full speed,
    but it also offers buttons to stop and reset the javelin.
    Perhaps when you reset via debug, the com port
    (eg. message window) continues to function.

    regards peter
  • Don FrenchDon French Posts: 126
    edited 2007-05-18 20:41
    No, I tried that and it does not fix the broken com port.
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2007-05-18 21:01
    My·terminal programs do show ide messages.
    The reason I wrote these programs is that connecting to a running
    javelin (on location for example) and starting up the javelin ide and
    message window do not show the messages.

    http://tech.groups.yahoo.com/group/JavelinCode/files/JideTerm/

    regards peter
Sign In or Register to comment.