Forum Rule: Always post complete source code & details to reproduce any issue!
Page 169 of 175 FirstFirst ... 69 119 159 167 168 169 170 171 ... LastLast
Results 4,201 to 4,225 of 4361

Thread: Teensy 4.0 First Beta Test

  1. #4201
    Senior Member
    Join Date
    Dec 2015
    Location
    LA
    Posts
    137
    @Paul
    Trying rev 4. Using DejaVu.ino and repeatedly compiling, loading, changing ect. as before and haven't got any out of memory errors I do get:

    java.lang.InterruptedException: sleep interrupted
    at java.lang.Thread.sleep(Native Method)
    at processing.app.inputPipeListener.run(TeensyPipeMon itor.java:234)

    when I close the terminal window while it's running.

    I did get this once, but I was playing with the terminal window scroll bar. I had scrolled the thumb to the window bottom and when I closed the window:

    java.io.IOException: Stream closed
    at java.io.BufferedInputStream.getBufIfOpen(BufferedI nputStream.java:170)
    at java.io.BufferedInputStream.read(BufferedInputStre am.java:336)
    at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.j ava:284)
    at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.ja va:326)
    at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:1 78)
    at java.io.InputStreamReader.read(InputStreamReader.j ava:184)
    at processing.app.inputPipeListener.run(TeensyPipeMon itor.java:229)
    inputPipeListener thread exit

    But the App kept running. I was never able to crash it with Dejavu.ino.

    I froze the Arduino App once with millis() print program after a lot of messing around, but it didn't give an error indication (no memory error at least )
    Code:
    int thisdelay=100;
    
    void setup() {
      Serial.begin(9600);
      while(!Serial)
       ;
      Serial.print("Starting up with ");
      Serial.print(thisdelay);
      Serial.println(" delay");
    
    }
    
    void loop() {
      Serial.println(millis());
      delayMicroseconds(thisdelay);
    }

  2. #4202
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,786
    Here's a 5th try. This one keeps the memory reduction of #4 and fixes many of the bugs. Should be good to test on Windows and Linux (eg, not a huge regression from #3). It should be noticeable more efficient on all platforms.

    I also tried to speed up some parts, especially the line searching. Maybe that will free up CPU time to allow the Java GC to work better on Macintosh? Right now I'm having a hard time imagining any more ways I can improve this for Macs. Maybe more ideas will come after some sleep.

    This version still has occasional "StateInvariantError: Can't render line" errors. You might see the negative number warnings too. Right now I'm not too worried about those, unless they cause the output to stop or do something very wrong. If you see StateInvariantError but nothing noticeably wrong with the output, please just ignore it for now.

    If you see *other* errors, especially any errors mentioning "inputPipeListener" and "TeensyPipeMonitor" or any out of memory exceptions, or freezing the output or Arduino completely locking up, or just running unusably slow, I really want to hear about those!
    Attached Files Attached Files

  3. #4203
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    10,078
    5th_Try Seems to be working well.

    Might have stepped up from 235K toward 250K lps on my 6 per line lps.ino.

    I saw two of the : 'javax.swing.text.StateInvariantError' but no new errors. And those often hit the first time after Upload.

    Done a few uploads and resizing and nothing triggers yet.

    Did board to T_3.6 and back and no issue.

    Oddly [not] it messes with Win Remote Desktop - had to come to the machine …

    Will let it run and interrupt it again later -

    <UPDATE>: Sitting most of 2 hours - 154 instances of the error ".StateInvariantError: Can't render line"

    Still functional and stable - switched to other T4 and upload and Button and Upload in combo keep working the IDE RAM and CPU% seem to be in order.
    Last edited by defragster; 08-26-2019 at 06:50 AM.

  4. #4204
    Senior Member
    Join Date
    Dec 2015
    Location
    LA
    Posts
    137
    @Paul

    Had to mess around quit a while opening and closing monitor window, recompiling, loading with terminal in various states until finally after pressing show timestamp and closed the window when it wouldn't the first error message :

    inputPipeListener exception: java.io.IOException: Stream closed
    java.io.IOException: Stream closed
    at java.io.BufferedInputStream.getBufIfOpen(BufferedI nputStream.java:170)
    at java.io.BufferedInputStream.read(BufferedInputStre am.java:336)
    at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.j ava:284)
    at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.ja va:326)
    at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:1 78)
    at java.io.InputStreamReader.read(InputStreamReader.j ava:184)
    at processing.app.inputPipeListener.run(TeensyPipeMon itor.java:236)
    inputPipeListener thread exit

    Then after maybe 4 more times of recompile, load overflow, I tried to open the terminal window got:

    Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: GC overhead limit exceeded
    at processing.app.FifoDocument.<init>(FifoDocument.ja va:147)
    at processing.app.TeensyPipeMonitor.<init>(TeensyPipe Monitor.java:50)
    at cc.arduino.packages.MonitorFactory.newMonitor(Moni torFactory.java:51)
    at processing.app.Editor.handleSerial(Editor.java:226 1)
    at processing.app.EditorToolbar.handleSelectionPresse d(EditorToolbar.java:503)
    at processing.app.EditorToolbar.mousePressed(EditorTo olbar.java:448)
    at java.awt.Component.processMouseEvent(Component.jav a:6536)
    at javax.swing.JComponent.processMouseEvent(JComponen t.java:3324)
    at java.awt.Component.processEvent(Component.java:630 4)
    at java.awt.Container.processEvent(Container.java:223 9)
    at java.awt.Component.dispatchEventImpl(Component.jav a:4889)
    at java.awt.Container.dispatchEventImpl(Container.jav a:2297)
    at java.awt.Component.dispatchEvent(Component.java:47 11)
    at java.awt.LightweightDispatcher.retargetMouseEvent( Container.java:4904)
    at java.awt.LightweightDispatcher.processMouseEvent(C ontainer.java:4532)
    at java.awt.LightweightDispatcher.dispatchEvent(Conta iner.java:4476)
    at java.awt.Container.dispatchEventImpl(Container.jav a:2283)
    at java.awt.Window.dispatchEventImpl(Window.java:2746 )
    at java.awt.Component.dispatchEvent(Component.java:47 11)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.j ava:760)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessI mpl.doIntersectionPrivilege(ProtectionDomain.java: 74)
    at java.security.ProtectionDomain$JavaSecurityAccessI mpl.doIntersectionPrivilege(ProtectionDomain.java: 84)
    at java.awt.EventQueue$4.run(EventQueue.java:733)
    at java.awt.EventQueue$4.run(EventQueue.java:731)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessI mpl.doIntersectionPrivilege(ProtectionDomain.java: 74)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java: 730)
    at java.awt.EventDispatchThread.pumpOneEventForFilter s(EventDispatchThread.java:205)

    And after waiting a minute or so and trying terminal window again:
    Exception in thread "Thread-86" Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: GC overhead limit exceeded
    at java.io.BufferedInputStream.getInIfOpen(BufferedIn putStream.java:159)
    at java.io.BufferedInputStream.available(BufferedInpu tStream.java:410)
    at sun.nio.cs.StreamDecoder.inReady(StreamDecoder.jav a:363)
    at sun.nio.cs.StreamDecoder.implReady(StreamDecoder.j ava:371)
    at sun.nio.cs.StreamDecoder.ready(StreamDecoder.java: 185)
    at java.io.InputStreamReader.ready(InputStreamReader. java:195)
    at processing.app.inputPipeListener.run(TeensyPipeMon itor.java:229)
    java.lang.OutOfMemoryError: GC overhead limit exceeded

    At this point I had to kill it.

    However, it was really impressive what it took to freeze it. I don't think any normal use would ever do what I was doing to it. Way back at try 1 or 2 normal stupid programming could have caused the problems, but now you have to make a concerted effort to try and mess it up.

    I still want to try the milliseconds printing code but the wife beckons...

  5. #4205
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    10,078
    One thing I see is the scroll to place new lines seems to vary by about a pixel - looking at text it doesn't jump in place or draw clean and fresh -

    But seems to jitter up and down 1 or 2 pixels.

    Updated last post with no new errors - but 154 of the old ones in past 2 hours.

    <edit>: It doesn't do it on short lines like this : 23135 @ 23135643

    But it does on longer lines like this:
    count=11262499, lines/sec=251487count=11262500, lines/sec=251487count=11262501, lines/sec=251487count=11262502, lines/sec=251487count=11262503, lines/sec=251487count=11262504, lines/sec=251487

    New Note:
    Just made IDE hang - been running and occasional upload to flush the repeat errors off.

    It was running in T_SerMon and I clicked as the text scrolled it blue selected a few lines and HUNG - No console Error notes were added - three open sketch windows in one instance and the sermon window - had to TaskMan: End Task.

    Restarted IDE - it does not do it now. Selecting grabs some and flashes and continues. Odd though it selects from bottom up to mouse pointer - not a point scrolling up from mouse. Must have been accumulated 'damage' from prior errors.

    Noticed that 'add timestamps' not working?
    Last edited by defragster; 08-26-2019 at 10:31 AM.

  6. #4206
    Senior Member
    Join Date
    Nov 2017
    Location
    Belgium
    Posts
    152

    serialmon_speedup_5th_try.zip

    iMac 2011 24GB ram, osx 10.13.6, arduino 1.8.9, td1.47

    Repeated the following procedure 3times.
    <
    Plugin t4 with usb_serial_print_speed.ino already flashed.
    Open arduino.
    Open the serial monitor, sometime later it will stop printing lines. Close the serial monitor.

    Attempt1: stops printing within first minute
    Attempt2: stops printing within first minute
    Attempt3: stops printing within first minute, scrolling bad, arduino cpu load 150%-180%
    Attempt4: stops printing after 10 to 15 minutes, scrolling very bad, arduino cpu load 250%-280%
    Attempt5: serialmon does not open anymore
    >

  7. #4207
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    4,290
    serialmon_speedup_5th_try.zip

    Running on a windows 10 x64 and got the following java error - on opening sermon while running flexcan:
    Code:
    javax.swing.text.BadLocationException: beyond end
    	at processing.app.FifoDocument.createPosition(FifoDocument.java:720)
    	at javax.swing.text.DefaultHighlighter.changeHighlight(DefaultHighlighter.java:245)
    	at javax.swing.text.DefaultCaret$Handler.insertUpdate(DefaultCaret.java:1676)
    	at processing.app.FifoDocument.processAppended(FifoDocument.java:351)
    	at processing.app.inputPipeListener.run(TeensyPipeMonitor.java:252)

  8. #4208
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,786
    Quote Originally Posted by neurofun View Post
    iMac 2011 24GB ram, osx 10.13.6, arduino 1.8.9, td1.47
    Did you get any OutOfMemoryError messages, like Heap or GC problems?

    I believe the lockups and errors like StateInvariant, BadLocationException, and negative number warnings are probably a multithreading issue. Maybe this?

    https://www.javamex.com/tutorials/th...okelater.shtml

    I'm going to make a 6th try soon, once I figure out how to use SwingUtilities.invokeLater() and have the input listener not clobber the data before "invokeLater" happens....

    But on the memory use and the GC issues on Macintosh, pretty sure that won't make any difference. My best guess is the remaining memory use, spewing more onto heap than the garbage collector can clean up, might be coming from InputStreamReader. Maybe? Even if it is, not sure what I can do about that.

  9. #4209
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,786
    Here's a 6th try. This one moves updating the FIFO onto the GUI event thread. Hopefully this will solve the StateInvariant, BadLocation, negative numbers and mysterious lockups.

    I suspect there's still a bug or two involving selecting text. So if you get these sorts of errors, please let me know if they happen when you click in the serial monitor window, or if you were resizing or dragging the window, or if they just happen spontaneously.

    Also please keep an eye out for "ERROR: GUI update failed". If you're capturing stdout on Linux or running the Arduino debug version of on Windows, that's normal when you quit Arduino. It's not supposed to happen any other time.

    If you see the "*****NEGATIVE NUMBER ERROR*****" message, does it have a Java exception, or just an annoying warning without any sign of actual error?

    As always, I want to know how the memory usage is looking, especially on Macs. This should be similar to #5. Performance might be a slightly slower, maybe?
    Attached Files Attached Files

  10. #4210
    Senior Member
    Join Date
    Nov 2017
    Location
    Belgium
    Posts
    152
    Quote Originally Posted by PaulStoffregen View Post
    Did you get any OutOfMemoryError messages, like Heap or GC problems?
    Yes, I forgot to mention. I did a quick test before the 3 mentioned above and before my morning coffee. I got those message only the first time I opened arduino after replacing pde.jar.
    Code:
    Exception in thread "SocketListener(imac27-i5.local.)" java.lang.OutOfMemoryError: GC overhead limit exceeded
    	at java.net.Inet6Address.<init>(Inet6Address.java:378)
    	at java.net.PlainDatagramSocketImpl.receive0(Native Method)
    	at java.net.AbstractPlainDatagramSocketImpl.receive(AbstractPlainDatagramSocketImpl.java:143)
    	at java.net.DatagramSocket.receive(DatagramSocket.java:812)
    	at javax.jmdns.impl.SocketListener.run(SocketListener.java:41)
    Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: GC overhead limit exceeded
    Exception in thread "JmDNS(fe80-0-0-0-c23b-ac81-4816-3c74-utun0.local.).State.Timer" java.lang.OutOfMemoryError: GC overhead limit exceeded
    and
    Code:
    Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
    	at processing.app.FifoDocument.<init>(FifoDocument.java:136)
    	at processing.app.TeensyPipeMonitor.<init>(TeensyPipeMonitor.java:50)
    	at cc.arduino.packages.MonitorFactory.newMonitor(MonitorFactory.java:51)
    	at processing.app.Editor.handleSerial(Editor.java:2261)
    	at processing.app.EditorToolbar.handleSelectionPressed(EditorToolbar.java:503)
    	at processing.app.EditorToolbar.mousePressed(EditorToolbar.java:448)
    	at java.awt.Component.processMouseEvent(Component.java:6536)
    	at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
    	at java.awt.Component.processEvent(Component.java:6304)
    	at java.awt.Container.processEvent(Container.java:2239)
    	at java.awt.Component.dispatchEventImpl(Component.java:4889)
    	at java.awt.Container.dispatchEventImpl(Container.java:2297)
    	at java.awt.Component.dispatchEvent(Component.java:4711)
    	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
    	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4532)
    	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
    	at java.awt.Container.dispatchEventImpl(Container.java:2283)
    	at java.awt.Window.dispatchEventImpl(Window.java:2746)
    	at java.awt.Component.dispatchEvent(Component.java:4711)
    	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
    	at java.awt.EventQueue.access$500(EventQueue.java:97)
    	at java.awt.EventQueue$3.run(EventQueue.java:709)
    	at java.awt.EventQueue$3.run(EventQueue.java:703)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
    	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
    	at java.awt.EventQueue$4.run(EventQueue.java:733)
    	at java.awt.EventQueue$4.run(EventQueue.java:731)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
    	at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
    	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)

  11. #4211
    Senior Member
    Join Date
    Nov 2017
    Location
    Belgium
    Posts
    152

    serialmon_speedup_6th_try.zip

    Mac 2011 24GB ram, osx 10.13.6, arduino 1.8.9, td1.47

    Plugin t4 with usb_serial_print_speed.ino already flashed.
    Open arduino.
    Open the serial monitor, sometime later it will stop printing lines. Close the serial monitor.

    Attempt1: stops printing after 10sec
    Attempt2: stops printing after 25sec
    Attempt3: stops printing after 1sec
    Attempt4: stops printing after 40 minutes, scrolling very bad, arduino cpu load 350% for the first 3min, after that drops to 270%. I noticed scrolling smoothness is directly affected by cpu load.
    Attempt5: throws following exception when clicking serialmon button, window does not open.
    Code:
    Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
    	at processing.app.FifoDocument.<init>(FifoDocument.java:136)
    	at processing.app.TeensyPipeMonitor.<init>(TeensyPipeMonitor.java:51)
    	at cc.arduino.packages.MonitorFactory.newMonitor(MonitorFactory.java:51)
    	at processing.app.Editor.handleSerial(Editor.java:2261)
    	at processing.app.EditorToolbar.handleSelectionPressed(EditorToolbar.java:503)
    	at processing.app.EditorToolbar.mousePressed(EditorToolbar.java:448)
    	at java.awt.Component.processMouseEvent(Component.java:6536)
    	at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
    	at java.awt.Component.processEvent(Component.java:6304)
    	at java.awt.Container.processEvent(Container.java:2239)
    	at java.awt.Component.dispatchEventImpl(Component.java:4889)
    	at java.awt.Container.dispatchEventImpl(Container.java:2297)
    	at java.awt.Component.dispatchEvent(Component.java:4711)
    	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
    	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4532)
    	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
    	at java.awt.Container.dispatchEventImpl(Container.java:2283)
    	at java.awt.Window.dispatchEventImpl(Window.java:2746)
    	at java.awt.Component.dispatchEvent(Component.java:4711)
    	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
    	at java.awt.EventQueue.access$500(EventQueue.java:97)
    	at java.awt.EventQueue$3.run(EventQueue.java:709)
    	at java.awt.EventQueue$3.run(EventQueue.java:703)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
    	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
    	at java.awt.EventQueue$4.run(EventQueue.java:733)
    	at java.awt.EventQueue$4.run(EventQueue.java:731)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
    	at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
    	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)

  12. #4212
    Senior Member
    Join Date
    Dec 2015
    Location
    LA
    Posts
    137

    Here's a 6th try

    Slowing reducing the code to see what it takes to kill terminal window. Even with this in T4 just opening and closing the terminal window 5 times:
    Code:
    void setup() {
    }
    
    void loop() {
    }
    attempt Memory MB
    1st 439
    2 574
    3 667
    4 803
    5 terminal won't open

    Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
    at processing.app.FifoDocument.<init>(FifoDocument.ja va:136)
    at processing.app.TeensyPipeMonitor.<init>(TeensyPipe Monitor.java:51)
    at cc.arduino.packages.MonitorFactory.newMonitor(Moni torFactory.java:51)
    at processing.app.Editor.handleSerial(Editor.java:226 1)
    at processing.app.EditorToolbar.handleSelectionPresse d(EditorToolbar.java:503)
    at processing.app.EditorToolbar.mousePressed(EditorTo olbar.java:448)
    at java.awt.Component.processMouseEvent(Component.jav a:6536)
    at javax.swing.JComponent.processMouseEvent(JComponen t.java:3324)
    at java.awt.Component.processEvent(Component.java:630 4)
    at java.awt.Container.processEvent(Container.java:223 9)
    at java.awt.Component.dispatchEventImpl(Component.jav a:4889)
    at java.awt.Container.dispatchEventImpl(Container.jav a:2297)
    at java.awt.Component.dispatchEvent(Component.java:47 11)
    at java.awt.LightweightDispatcher.retargetMouseEvent( Container.java:4904)
    at java.awt.LightweightDispatcher.processMouseEvent(C ontainer.java:4532)
    at java.awt.LightweightDispatcher.dispatchEvent(Conta iner.java:4476)
    at java.awt.Container.dispatchEventImpl(Container.jav a:2283)
    at java.awt.Window.dispatchEventImpl(Window.java:2746 )
    at java.awt.Component.dispatchEvent(Component.java:47 11)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.j ava:760)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessI mpl.doIntersectionPrivilege(ProtectionDomain.java: 74)
    at java.security.ProtectionDomain$JavaSecurityAccessI mpl.doIntersectionPrivilege(ProtectionDomain.java: 84)
    at java.awt.EventQueue$4.run(EventQueue.java:733)
    at java.awt.EventQueue$4.run(EventQueue.java:731)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessI mpl.doIntersectionPrivilege(ProtectionDomain.java: 74)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java: 730)
    at java.awt.EventDispatchThread.pumpOneEventForFilter s(EventDispatchThread.java:205)

  13. #4213
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    10,078
    6th Try: Win 10

    > Speed and function seem the same ( ~230K lps ) - Good ignoring the cascading errors.
    > 5th try ran overnight and the 'text select hang' of p#4205 did NOT recur.

    On each Ctrl+U to upload this drops before build output starts?
    Code:
    ERROR: GUI update failed
    java.lang.InterruptedException
    	at java.lang.Object.wait(Native Method)
    	at java.lang.Object.wait(Object.java:502)
    	at java.awt.EventQueue.invokeAndWait(EventQueue.java:1343)
    	at java.awt.EventQueue.invokeAndWait(EventQueue.java:1324)
    	at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1353)
    	at processing.app.inputPipeListener.update_gui(TeensyPipeMonitor.java:281)
    	at processing.app.inputPipeListener.run(TeensyPipeMonitor.java:251)
    THRICE … running this variant of lps.ino the T_SerMon just QUITS displaying, happens on resizing - lower left corner two directions. Just slowly move it around for ~10 seconds?
    It is responsive to : Clear output, and to check and uncheck of Autoscroll and Timestamp - but no further window output is displayed, and there is no associated 'Console error/feedback' - I saw that once on 5th try as well.

    > Click on IDE of SerMon while open send focus there - but no output.
    > TaskMan does not show any resource abuse.
    > Close t_sermon window and click IDE Sermon button and it restarts
    > Also restart with no issue doing UPLOAD from IDE, nothing is HUNG - just stops sermon output.

    Code:
    void setup() {
      Serial.begin(1000000); // edit for highest baud your board can use
      while (!Serial) ;
      count = 10000000; // starting with 8 digits gives consistent chars/line
      prior_count = count;
      count_per_second = 0;
      prior_msec = millis();
    }
    
    void loop() {
      while (1) {
        Serial.print(" >count=");
        Serial.print(count);
        Serial.print(", lines/sec=");
        Serial.print(count_per_second);
        if ( !(count%4) )
          Serial.println();
        count = count + 1;
        uint32_t msec = millis();
        if (msec - prior_msec > 1000) {
          prior_msec = prior_msec + 1000;
          count_per_second = count - prior_count;
          prior_count = count;
        }
      }
    }

  14. #4214
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    5,711
    Tried #6 on MAC again...

    Again simple app, simply output one line of text with loop counter, as fast as it will run

    Ran maybe a minute and stopped output.
    Closed window, opened again, ran maybe 3-4 minutes before hang.
    closed and opened another couple of times, Did not wait for hang.
    On the 5th or 6th open attempt. got the error:
    Code:
    ERROR: GUI update failed
    java.lang.InterruptedException
    	at java.lang.Object.wait(Native Method)
    	at java.lang.Object.wait(Object.java:502)
    	at java.awt.EventQueue.invokeAndWait(EventQueue.java:1343)
    	at java.awt.EventQueue.invokeAndWait(EventQueue.java:1324)
    	at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1353)
    	at processing.app.inputPipeListener.update_gui(TeensyPipeMonitor.java:281)
    	at processing.app.inputPipeListener.run(TeensyPipeMonitor.java:251)
    Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: GC overhead limit exceeded
    	at processing.app.FifoDocument.<init>(FifoDocument.java:147)
    	at processing.app.TeensyPipeMonitor.<init>(TeensyPipeMonitor.java:51)
    	at cc.arduino.packages.MonitorFactory.newMonitor(MonitorFactory.java:51)
    	at processing.app.Editor.handleSerial(Editor.java:2261)
    	at processing.app.EditorToolbar.handleSelectionPressed(EditorToolbar.java:503)
    	at processing.app.EditorToolbar.mousePressed(EditorToolbar.java:448)
    	at java.awt.Component.processMouseEvent(Component.java:6536)
    	at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
    	at java.awt.Component.processEvent(Component.java:6304)
    	at java.awt.Container.processEvent(Container.java:2239)
    	at java.awt.Component.dispatchEventImpl(Component.java:4889)
    	at java.awt.Container.dispatchEventImpl(Container.java:2297)
    	at java.awt.Component.dispatchEvent(Component.java:4711)
    	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
    	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4532)
    	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
    	at java.awt.Container.dispatchEventImpl(Container.java:2283)
    	at java.awt.Window.dispatchEventImpl(Window.java:2746)
    	at java.awt.Component.dispatchEvent(Component.java:4711)
    	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
    	at java.awt.EventQueue.access$500(EventQueue.java:97)
    	at java.awt.EventQueue$3.run(EventQueue.java:709)
    	at java.awt.EventQueue$3.run(EventQueue.java:703)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
    	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
    	at java.awt.EventQueue$4.run(EventQueue.java:733)
    	at java.awt.EventQueue$4.run(EventQueue.java:731)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
    	at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
    	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)

  15. #4215
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    10,078
    @Paul: -- still 6th Try JAR in place on Win 10
    Left my machine - I thought running T4 code above to t_sermon - came back and it was stalled - no 'error' text in the console.

    Now I do IDE Upload w/TLoader and it runs only a few seconds and stalls:
    Code:
     >count=10422469, lines/sec=240429 >count=10422470, lines/sec=240429 >count=10422471, lines/sec=240429 >count=10422472, lines/sec=240429
    That shows only 422K counted prints from start - then it just stops.
    > Nothing untoward in JAVA for RAM @ 542MB and running CPU% from 0.5 up toward 2%
    > No longer dropping the noted p#4213 error in console before compile starts
    > Restarts each time on Upload for a short time
    > Closing t_sermon and then restarting from IDE repeats this where it will pick up and run a short time - stalling with no error
    >> No Error or Orange text generated in the Console window when it stops as before.

    At this point I did the t_sermon close and restart 2-3 times and then I got this in the IDE Console:
    Code:
    // NOTHING but build details up here
    
    Sketch uses 12896 bytes (0%) of program storage space. Maximum is 2031616 bytes.
    Global variables use 15760 bytes (1%) of dynamic memory, leaving 1032816 bytes for local variables. Maximum is 1048576 bytes.
    Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
    	at processing.app.FifoDocument.<init>(FifoDocument.java:149)
    	at processing.app.TeensyPipeMonitor.<init>(TeensyPipeMonitor.java:51)
    	at cc.arduino.packages.MonitorFactory.newMonitor(MonitorFactory.java:51)
    	at processing.app.Editor.handleSerial(Editor.java:2261)
    	at processing.app.EditorToolbar.handleSelectionPressed(EditorToolbar.java:503)
    	at processing.app.EditorToolbar.mousePressed(EditorToolbar.java:448)
    	at java.awt.Component.processMouseEvent(Component.java:6536)
    	at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
    	at java.awt.Component.processEvent(Component.java:6304)
    	at java.awt.Container.processEvent(Container.java:2239)
    	at java.awt.Component.dispatchEventImpl(Component.java:4889)
    	at java.awt.Container.dispatchEventImpl(Container.java:2297)
    	at java.awt.Component.dispatchEvent(Component.java:4711)
    	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
    	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4532)
    	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
    	at java.awt.Container.dispatchEventImpl(Container.java:2283)
    	at java.awt.Window.dispatchEventImpl(Window.java:2746)
    	at java.awt.Component.dispatchEvent(Component.java:4711)
    	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
    	at java.awt.EventQueue.access$500(EventQueue.java:97)
    	at java.awt.EventQueue$3.run(EventQueue.java:709)
    	at java.awt.EventQueue$3.run(EventQueue.java:703)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
    	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
    	at java.awt.EventQueue$4.run(EventQueue.java:733)
    	at java.awt.EventQueue$4.run(EventQueue.java:731)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
    	at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
    	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)

  16. #4216
    Senior Member
    Join Date
    Nov 2017
    Location
    Belgium
    Posts
    152
    Quote Originally Posted by bicycleguy View Post
    Slowing reducing the code to see what it takes to kill terminal window. Even with this in T4 just opening and closing the terminal window 5 times:
    Code:
    void setup() {
    }
    
    void loop() {
    }
    attempt Memory MB
    1st 439
    2 574
    3 667
    4 803
    5 terminal won't open

    Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
    at processing.app.FifoDocument.<init>(FifoDocument.ja va:136)
    at processing.app.TeensyPipeMonitor.<init>(TeensyPipe Monitor.java:51)
    at cc.arduino.packages.MonitorFactory.newMonitor(Moni torFactory.java:51)
    at processing.app.Editor.handleSerial(Editor.java:226 1)
    at processing.app.EditorToolbar.handleSelectionPresse d(EditorToolbar.java:503)
    at processing.app.EditorToolbar.mousePressed(EditorTo olbar.java:448)
    at java.awt.Component.processMouseEvent(Component.jav a:6536)
    at javax.swing.JComponent.processMouseEvent(JComponen t.java:3324)
    at java.awt.Component.processEvent(Component.java:630 4)
    at java.awt.Container.processEvent(Container.java:223 9)
    at java.awt.Component.dispatchEventImpl(Component.jav a:4889)
    at java.awt.Container.dispatchEventImpl(Container.jav a:2297)
    at java.awt.Component.dispatchEvent(Component.java:47 11)
    at java.awt.LightweightDispatcher.retargetMouseEvent( Container.java:4904)
    at java.awt.LightweightDispatcher.processMouseEvent(C ontainer.java:4532)
    at java.awt.LightweightDispatcher.dispatchEvent(Conta iner.java:4476)
    at java.awt.Container.dispatchEventImpl(Container.jav a:2283)
    at java.awt.Window.dispatchEventImpl(Window.java:2746 )
    at java.awt.Component.dispatchEvent(Component.java:47 11)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.j ava:760)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessI mpl.doIntersectionPrivilege(ProtectionDomain.java: 74)
    at java.security.ProtectionDomain$JavaSecurityAccessI mpl.doIntersectionPrivilege(ProtectionDomain.java: 84)
    at java.awt.EventQueue$4.run(EventQueue.java:733)
    at java.awt.EventQueue$4.run(EventQueue.java:731)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessI mpl.doIntersectionPrivilege(ProtectionDomain.java: 74)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java: 730)
    at java.awt.EventDispatchThread.pumpOneEventForFilter s(EventDispatchThread.java:205)
    Same here. Even when nothing is send over serial usb, the 5th time opening serialmon throws above exception

  17. #4217
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    10,078
    Quote Originally Posted by neurofun View Post
    Same here. Even when nothing is send over serial usb, the 5th time opening serialmon throws above exception
    I hadn't tried that - was wondering if it was on MAC or Win. But took my Running T4 to Bootloader with TLoader closed.

    Closed and opened Sermon about 4-5 more times and got this:
    Code:
    Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
    	at processing.app.FifoDocument.<init>(FifoDocument.java:149)
    	at processing.app.TeensyPipeMonitor.<init>(TeensyPipeMonitor.java:51)
    	at cc.arduino.packages.MonitorFactory.newMonitor(MonitorFactory.java:51)
    	at processing.app.Editor.handleSerial(Editor.java:2261)
    // that same after this

  18. #4218
    Senior Member
    Join Date
    Nov 2017
    Location
    Belgium
    Posts
    152
    Quote Originally Posted by defragster View Post
    I hadn't tried that - was wondering if it was on MAC or Win. But took my Running T4 to Bootloader with TLoader closed.

    Closed and opened Sermon about 4-5 more times and got this:
    Code:
    Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
    	at processing.app.FifoDocument.<init>(FifoDocument.java:149)
    	at processing.app.TeensyPipeMonitor.<init>(TeensyPipeMonitor.java:51)
    	at cc.arduino.packages.MonitorFactory.newMonitor(MonitorFactory.java:51)
    	at processing.app.Editor.handleSerial(Editor.java:2261)
    // that same after this
    It was on Mac.

  19. #4219
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    10,078
    Quote Originally Posted by neurofun View Post
    It was on Mac.
    @neurofun - Interesting left T4 in bootloader and restarted IDE and on the sixth open of T_sermon I got this again just now on Windows 10:
    Code:
    Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
    	at processing.app.FifoDocument.<init>(FifoDocument.java:149)
    	at processing.app.TeensyPipeMonitor.<init>(TeensyPipeMonitor.java:51)
    	at cc.arduino.packages.MonitorFactory.newMonitor(MonitorFactory.java:51)
    	at processing.app.Editor.handleSerial(Editor.java:2261)
    ...
    And IDE can do Compile and Upload but it will not open T-sermon - always errors:
    Code:
    Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
    Exception in thread "JmDNS(MdXPS16_i7.local.).State.Timer" Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
    java.lang.OutOfMemoryError: Java heap space
    Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
    Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
    Exception in thread "TimerQueue" Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
    java.lang.OutOfMemoryError: Java heap space

  20. #4220
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    10,078
    Paul - char prints and line breaks getting mixed up - see the end of this post :: USB-Mass-Storage-Driver-Experiments

    <EDIT> : WORKING CODE BELOW SHOWS THE ISSUE
    > Note Try #3 WORKS properly :: Teensy-4-0-First-Beta-Test #4171
    > Note Try #5 shows the same Breakage :: Teensy-4-0-First-Beta-Test
    Looking at text from Copy&Paste there the dots are in a row on same line - but screen shot shows like this as seen:
    Click image for larger version. 

Name:	Try6_BadnLine.png 
Views:	4 
Size:	11.8 KB 
ID:	17332

    That is with the Try #6 Java on Win IDE 1.8.9 TD 1.47 and the latest libs to make the USB Host sample work - so not something you can test unless you want to go grab all that.

    I'll try to set up a DEMO sketch of just similar DOT prints …

    NOTE: IDE was opened Fresh. Did some dozen uploads for that post and otherwise the try#6 with typical status prints this is the only oddity I saw - no other Console Errors.

    Working on Demo - just got this:
    Code:
    ERROR: GUI update failed
    java.lang.InterruptedException
    	at java.lang.Object.wait(Native Method)
    	at java.lang.Object.wait(Object.java:502)
    	at java.awt.EventQueue.invokeAndWait(EventQueue.java:1343)
    	at java.awt.EventQueue.invokeAndWait(EventQueue.java:1324)
    	at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1353)
    	at processing.app.inputPipeListener.update_gui(TeensyPipeMonitor.java:281)
    	at processing.app.inputPipeListener.run(TeensyPipeMonitor.java:251)
    DEMO going oddly - what is printing isn't as expected - opened TyCommander for second Sermon view - that came up on closing TyComm and then opening t_sermon IIRC.

    Note IDE been open for as noted some dozen uploads - though no abusive SPEED runs until this.

    Here is loop for WIP code - I think it shows the issue:
    Code:
    void setup() {
      while (!Serial)    ;
      Serial.print("Starting up ... ");
    }
    
    uint32_t count = 0;
    void loop() {
      delayMicroseconds( 200 );
      count++;
      if (!(count % 10)) Serial.printf(".");  // SAME WITH :: Serial.print(".");
      if ( !(count % 400) ) Serial.println("<nl>");
    }
    Cut and paste gives:
    Code:
    Starting up ... ........................................<nl>
    ........................................<nl>
    ........................................<nl>
    ......................................
    But screen shot of same shows:
    Click image for larger version. 

Name:	Try6_BadnLine_B.png 
Views:	3 
Size:	11.1 KB 
ID:	17333

    And expected output as shown from TyComm - where there is one space in starting up line:
    Code:
    Starting up ... ........................................<nl>
    ........................................<nl>
    ........................................<nl>
    ........................................<nl>
    ........................................<nl>
    ........................................<nl>
    So the extra NewLines are artifacts in GUI drawing of t_sermon
    Last edited by defragster; 08-27-2019 at 05:49 PM.

  21. #4221
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    10,078
    @Paul - Relating to post #4220 did a more exciting update showing working and non working behavior with a bit of flair showing counts and cycling between one and the other:
    Code:
    void setup() {
      while (!Serial)    ;
      Serial.println("Starting up ... <nl>");
      for ( int ii = 2; ii < 12; ii++ ) {
        for ( int jj = 0; jj < ii; jj++ ) Serial.print(".");
        Serial.println("<nl>");
      }
      for ( int ii = 2; ii < 12; ii++ ) {
        for ( int jj = 0; jj < ii; jj++ ) {
          delayMicroseconds( 200 );
          Serial.print(".");
        }
        delayMicroseconds( 200 );
        Serial.println("<nl>");
      }
      delay ( 3000 );
    }
    
    uint32_t count = 0;
    elapsedMillis emTick = 0;
    void loop() {
      if (emTick < 6000)
        delayMicroseconds( 200 );
      if (emTick > 8000) {
        emTick = 0;
        count = 0;
      }
    
      count++;
      //  if (!(count % 10)) Serial.printf(".");
      if (!(count % 10)) Serial.print(".");
      if ( !(count % 400) ) Serial.printf("%lu<nl>\n", count);
    }

    And funny enough in compiling/uploading this a FEW times the Console just barfed out this - I may have clicked 'OFF Autoscroll' at the time:
    Code:
    ERROR: GUI update failed
    java.lang.InterruptedException
    	at java.lang.Object.wait(Native Method)
    	at java.lang.Object.wait(Object.java:502)
    	at java.awt.EventQueue.invokeAndWait(EventQueue.java:1343)
    	at java.awt.EventQueue.invokeAndWait(EventQueue.java:1324)
    	at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1353)
    	at processing.app.inputPipeListener.update_gui(TeensyPipeMonitor.java:281)
    	at processing.app.inputPipeListener.run(TeensyPipeMonitor.java:251)
    T:\arduino-1.8.9t4\arduino-builder -dump-prefs -logger=machine -hardware T:\arduino-1.8.9t4\hardware -hardware C:\Users\Tim\AppData\Local\Arduino15\packages -hardware T:\tCode\hardware -tools T:\arduino-1.8.9t4\tools-builder -tools T:\arduino-1.8.9t4\hardware\tools\avr -tools C:\Users\Tim\AppData\Local\Arduino15\packages -built-in-libraries T:\arduino-1.8.9t4\libraries -libraries T:\tCode\libraries -fqbn=teensy:avr:teensy40:usb=serial,speed=600,opt=o2std,keys=en-us -ide-version=10809 -build-path T:\TEMP\arduino_build_762420 -warnings=more -build-cache T:\TEMP\arduino_cache_615386 -verbose T:\tCode\trash\Try6_SerMon\Try6_SerMon.ino
    FifoDocument.getText *****NEGATIVE NUMBER ERROR*****
    Exception in thread "AWT-EventQueue-0" javax.swing.text.StateInvariantError: Can't render line: 125236
    	at javax.swing.text.PlainView.drawLine(PlainView.java:92)
    	at javax.swing.text.PlainView.paint(PlainView.java:311)
    	at javax.swing.plaf.basic.BasicTextUI$RootView.paint(BasicTextUI.java:1434)
    	at javax.swing.plaf.basic.BasicTextUI.paintSafely(BasicTextUI.java:737)
    	at javax.swing.plaf.basic.BasicTextUI.paint(BasicTextUI.java:881)
    	at javax.swing.plaf.basic.BasicTextUI.update(BasicTextUI.java:860)
    	at javax.swing.JComponent.paintComponent(JComponent.java:780)
    	at javax.swing.JComponent.paint(JComponent.java:1056)
    	at javax.swing.JComponent.paintChildren(JComponent.java:889)
    	at javax.swing.JComponent.paint(JComponent.java:1065)
    	at javax.swing.JViewport.paint(JViewport.java:728)
    	at javax.swing.JComponent.paintChildren(JComponent.java:889)
    	at javax.swing.JComponent.paint(JComponent.java:1065)
    	at javax.swing.JComponent.paintToOffscreen(JComponent.java:5210)
    	at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1579)
    	at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1502)
    	at javax.swing.RepaintManager.paint(RepaintManager.java:1272)
    	at javax.swing.JComponent._paintImmediately(JComponent.java:5158)
    	at javax.swing.JComponent.paintImmediately(JComponent.java:4969)
    	at javax.swing.RepaintManager$4.run(RepaintManager.java:831)
    	at javax.swing.RepaintManager$4.run(RepaintManager.java:814)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
    	at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:814)
    	at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:789)
    	at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:738)
    	at javax.swing.RepaintManager.access$1200(RepaintManager.java:64)
    	at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1732)
    	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
    	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
    	at java.awt.EventQueue.access$500(EventQueue.java:97)
    	at java.awt.EventQueue$3.run(EventQueue.java:709)
    	at java.awt.EventQueue$3.run(EventQueue.java:703)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
    	at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
    	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
    	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
    T:\arduino-1.8.9t4\arduino-builder -compile -logger=machine -hardware T:\arduino-1.8.9t4\hardware -hardware C:\Users\Tim\AppData\Local\Arduino15\packages -hardware T:\tCode\hardware -tools T:\arduino-1.8.9t4\tools-builder -tools T:\arduino-1.8.9t4\hardware\tools\avr -tools C:\Users\Tim\AppData\Local\Arduino15\packages -built-in-libraries T:\arduino-1.8.9t4\libraries -libraries T:\tCode\libraries -fqbn=teensy:avr:teensy40:usb=serial,speed=600,opt=o2std,keys=en-us -ide-version=10809 -build-path T:\TEMP\arduino_build_762420 -warnings=more -build-cache T:\TEMP\arduino_cache_615386 -verbose T:\tCode\trash\Try6_SerMon\Try6_SerMon.ino
    Using board 'teensy40' from platform in folder: T:\arduino-1.8.9t4\hardware\teensy\avr
    Using core 'teensy4' from platform in folder: T:\arduino-1.8.9t4\hardware\teensy\avr
    Detecting libraries used...
    "T:\\arduino-1.8.9t4\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=147 -DARDUINO=10809 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IT:\\arduino-1.8.9t4\\hardware\\teensy\\avr\\cores\\teensy4" "T:\\TEMP\\arduino_build_762420\\sketch\\Try6_SerMon.ino.cpp" -o nul
    Generating function prototypes...
    "T:\\arduino-1.8.9t4\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=147 -DARDUINO=10809 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IT:\\arduino-1.8.9t4\\hardware\\teensy\\avr\\cores\\teensy4" "T:\\TEMP\\arduino_build_762420\\sketch\\Try6_SerMon.ino.cpp" -o "T:\\TEMP\\arduino_build_762420\\preproc\\ctags_target_for_gcc_minus_e.cpp"
    "T:\\arduino-1.8.9t4\\tools-builder\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "T:\\TEMP\\arduino_build_762420\\preproc\\ctags_target_for_gcc_minus_e.cpp"
    Compiling sketch...
    "T:\\arduino-1.8.9t4\\hardware\\teensy/../tools/precompile_helper" "T:\\arduino-1.8.9t4\\hardware\\teensy\\avr/cores/teensy4" "T:\\TEMP\\arduino_build_762420" "T:\\arduino-1.8.9t4\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -x c++-header -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=147 -DARDUINO=10809 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IT:\\arduino-1.8.9t4\\hardware\\teensy\\avr/cores/teensy4" "T:\\TEMP\\arduino_build_762420/pch/Arduino.h" -o "T:\\TEMP\\arduino_build_762420/pch/Arduino.h.gch"
    Using previously compiled file: T:\TEMP\arduino_build_762420\pch\Arduino.h.gch
    
    "T:\\arduino-1.8.9t4\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=147 -DARDUINO=10809 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IT:\\TEMP\\arduino_build_762420/pch" "-IT:\\arduino-1.8.9t4\\hardware\\teensy\\avr\\cores\\teensy4" "T:\\TEMP\\arduino_build_762420\\sketch\\Try6_SerMon.ino.cpp" -o "T:\\TEMP\\arduino_build_762420\\sketch\\Try6_SerMon.ino.cpp.o"
    Compiling libraries...
    Compiling core...
    Using precompiled core: T:\TEMP\arduino_cache_615386\core\core_2d2ac97583686748de40bdc1fd01841a.a
    Linking everything together...
    "T:\\arduino-1.8.9t4\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-gcc" -O2 -Wl,--gc-sections,--relax "-TT:\\arduino-1.8.9t4\\hardware\\teensy\\avr\\cores\\teensy4/imxrt1062.ld" -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -o "T:\\TEMP\\arduino_build_762420/Try6_SerMon.ino.elf" "T:\\TEMP\\arduino_build_762420\\sketch\\Try6_SerMon.ino.cpp.o" "T:\\TEMP\\arduino_build_762420/..\\arduino_cache_615386\\core\\core_2d2ac97583686748de40bdc1fd01841a.a" "-LT:\\TEMP\\arduino_build_762420" -larm_cortexM7lfsp_math -lm -lstdc++
    "T:\\arduino-1.8.9t4\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "T:\\TEMP\\arduino_build_762420/Try6_SerMon.ino.elf" "T:\\TEMP\\arduino_build_762420/Try6_SerMon.ino.eep"
    "T:\\arduino-1.8.9t4\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-objcopy" -O ihex -R .eeprom "T:\\TEMP\\arduino_build_762420/Try6_SerMon.ino.elf" "T:\\TEMP\\arduino_build_762420/Try6_SerMon.ino.hex"
    "T:\\arduino-1.8.9t4\\hardware\\teensy/../tools/stdout_redirect" "T:\\TEMP\\arduino_build_762420/Try6_SerMon.ino.lst" "T:\\arduino-1.8.9t4\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-objdump" -d -S -C "T:\\TEMP\\arduino_build_762420/Try6_SerMon.ino.elf"
    "T:\\arduino-1.8.9t4\\hardware\\teensy/../tools/stdout_redirect" "T:\\TEMP\\arduino_build_762420/Try6_SerMon.ino.sym" "T:\\arduino-1.8.9t4\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-objdump" -t -C "T:\\TEMP\\arduino_build_762420/Try6_SerMon.ino.elf"
    "T:\\arduino-1.8.9t4\\hardware\\teensy/../tools/teensy_post_compile" -file=Try6_SerMon.ino "-path=T:\\TEMP\\arduino_build_762420" "-tools=T:\\arduino-1.8.9t4\\hardware\\teensy/../tools/" -board=TEENSY40
    "T:\\arduino-1.8.9t4\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-size" -A "T:\\TEMP\\arduino_build_762420/Try6_SerMon.ino.elf"
    Sketch uses 31920 bytes (1%) of program storage space. Maximum is 2031616 bytes.
    Global variables use 35744 bytes (3%) of dynamic memory, leaving 1012832 bytes for local variables. Maximum is 1048576 bytes.
    T:\arduino-1.8.9t4\hardware\teensy/../tools/teensy_post_compile -file=Try6_SerMon.ino -path=T:\TEMP\arduino_build_762420 -tools=T:\arduino-1.8.9t4\hardware\teensy/../tools -board=TEENSY40 -reboot -port=usb:0/140000/0/8/6 -portlabel=hid#vid_16c0&pid_0478 Bootloader -portprotocol=Teensy 
    FifoDocument.getText *****NEGATIVE NUMBER ERROR*****
    Exception in thread "AWT-EventQueue-0" javax.swing.text.StateInvariantError: Can't render line: 125236
    	at javax.swing.text.PlainView.drawLine(PlainView.java:92)
    	at javax.swing.text.PlainView.paint(PlainView.java:311)
    	at javax.swing.plaf.basic.BasicTextUI$RootView.paint(BasicTextUI.java:1434)
    	at javax.swing.plaf.basic.BasicTextUI.paintSafely(BasicTextUI.java:737)
    	at javax.swing.plaf.basic.BasicTextUI.paint(BasicTextUI.java:881)
    	at javax.swing.plaf.basic.BasicTextUI.update(BasicTextUI.java:860)
    	at javax.swing.JComponent.paintComponent(JComponent.java:780)
    	at javax.swing.JComponent.paint(JComponent.java:1056)
    	at javax.swing.JComponent.paintToOffscreen(JComponent.java:5210)
    	at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1579)
    	at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1502)
    	at javax.swing.RepaintManager.paint(RepaintManager.java:1272)
    	at javax.swing.JComponent._paintImmediately(JComponent.java:5158)
    	at javax.swing.JComponent.paintImmediately(JComponent.java:4969)
    	at javax.swing.RepaintManager$4.run(RepaintManager.java:831)
    	at javax.swing.RepaintManager$4.run(RepaintManager.java:814)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
    	at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:814)
    	at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:789)
    	at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:738)
    	at javax.swing.RepaintManager.access$1200(RepaintManager.java:64)
    	at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1732)
    	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
    	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
    	at java.awt.EventQueue.access$500(EventQueue.java:97)
    	at java.awt.EventQueue$3.run(EventQueue.java:709)
    	at java.awt.EventQueue$3.run(EventQueue.java:703)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
    	at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
    	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
    	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
    FifoDocument.getText *****NEGATIVE NUMBER ERROR*****
    Exception in thread "AWT-EventQueue-0" javax.swing.text.StateInvariantError: Can't render line: 125236
    	at javax.swing.text.PlainView.drawLine(PlainView.java:92)
    	at javax.swing.text.PlainView.paint(PlainView.java:311)
    	at javax.swing.plaf.basic.BasicTextUI$RootView.paint(BasicTextUI.java:1434)
    	at javax.swing.plaf.basic.BasicTextUI.paintSafely(BasicTextUI.java:737)
    	at javax.swing.plaf.basic.BasicTextUI.paint(BasicTextUI.java:881)
    	at javax.swing.plaf.basic.BasicTextUI.update(BasicTextUI.java:860)
    	at javax.swing.JComponent.paintComponent(JComponent.java:780)
    	at javax.swing.JComponent.paint(JComponent.java:1056)
    	at javax.swing.JComponent.paintChildren(JComponent.java:889)
    	at javax.swing.JComponent.paint(JComponent.java:1065)
    	at javax.swing.JViewport.paint(JViewport.java:728)
    	at javax.swing.JComponent.paintChildren(JComponent.java:889)
    	at javax.swing.JComponent.paint(JComponent.java:1065)
    	at javax.swing.JComponent.paintToOffscreen(JComponent.java:5210)
    	at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1579)
    	at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1502)
    	at javax.swing.RepaintManager.paint(RepaintManager.java:1272)
    	at javax.swing.JComponent._paintImmediately(JComponent.java:5158)
    	at javax.swing.JComponent.paintImmediately(JComponent.java:4969)
    	at javax.swing.RepaintManager$4.run(RepaintManager.java:831)
    	at javax.swing.RepaintManager$4.run(RepaintManager.java:814)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
    	at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:814)
    	at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:789)
    	at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:738)
    	at javax.swing.RepaintManager.access$1200(RepaintManager.java:64)
    	at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1732)
    	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
    	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
    	at java.awt.EventQueue.access$500(EventQueue.java:97)
    	at java.awt.EventQueue$3.run(EventQueue.java:709)
    	at java.awt.EventQueue$3.run(EventQueue.java:703)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
    	at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
    	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
    	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
    Last edited by defragster; 08-27-2019 at 11:01 PM. Reason: opps <nl> before \n

  22. #4222
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,786
    Sorry I've been absent the last ~24 hours. The biz size of PJRC pulled me away from coding, as it does at times. The upside is we got the 3rd batch of Teensy 4.0 boards into production 1 week early, and got sort-of caught up on a big backlog of pending orders. I'm looking at this stuff again now, and I should be back on it late tonight. Hope to have a 7th test by the morning.

    First up, I'm going to work on the "GUI update failed" InterruptedException error. I know how to fix that one, or at least I think I know what to do. Everyone here can be the judge of whether I actually manage to fix it.

    On repeated opening of the serial monitor using up all the memory on Macintosh... I'm less certain of what to do. Currently the JTextArea is created with the default document object (GapContent-based) and we create an instance of FifoDocument to replace it. My understanding is Java GC is supposed to clean up that original one. But maybe it's not doing that on Macintosh? Honestly, I'm pretty frustrated with Mac. Going to try to grab an older mac with 10.12 installed. My Macbook Air just doesn't reproduce these out of memory errors.

  23. #4223
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    10,078
    Great to get a week jump on the bigger batch.

    Hopefully prior posts where try#5/6 show odd GUI draw versus try#3 make sense - and the other issues clear up MAC and WIN.

    The yield() calls on the Teensy 4.0's super fast loop() take a big toll. Putting a while(1) inside loop around the code in #4221 show a HUGE difference for not leaving:
    Code:
      // In while(1) no loop/yield >> t_sermon :: 17,257,242 and TyComm :: 17,257,045
      // No while with loop/yield >> t_sermon :: 5,233,315 and TyComm :: 5,233,326
    In closing SerMon after numerous uploads - then opening TyComm to see before disconnecting and then going back to t_sermon This fail to Start t_sermon gave this on Win 10:
    Code:
    Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
    	at processing.app.FifoDocument.<init>(FifoDocument.java:136)
    	at processing.app.TeensyPipeMonitor.<init>(TeensyPipeMonitor.java:51)
    	at cc.arduino.packages.MonitorFactory.newMonitor(MonitorFactory.java:51)
    	at processing.app.Editor.handleSerial(Editor.java:2261)
    	at processing.app.EditorToolbar.handleSelectionPressed(EditorToolbar.java:503)
    	at processing.app.EditorToolbar.mousePressed(EditorToolbar.java:448)
    	at java.awt.Component.processMouseEvent(Component.java:6536)
    	at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
    	at java.awt.Component.processEvent(Component.java:6304)
    	at java.awt.Container.processEvent(Container.java:2239)
    	at java.awt.Component.dispatchEventImpl(Component.java:4889)
    	at java.awt.Container.dispatchEventImpl(Container.java:2297)
    	at java.awt.Component.dispatchEvent(Component.java:4711)
    	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
    	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4532)
    	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
    	at java.awt.Container.dispatchEventImpl(Container.java:2283)
    	at java.awt.Window.dispatchEventImpl(Window.java:2746)
    	at java.awt.Component.dispatchEvent(Component.java:4711)
    	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
    	at java.awt.EventQueue.access$500(EventQueue.java:97)
    	at java.awt.EventQueue$3.run(EventQueue.java:709)
    	at java.awt.EventQueue$3.run(EventQueue.java:703)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
    	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
    	at java.awt.EventQueue$4.run(EventQueue.java:733)
    	at java.awt.EventQueue$4.run(EventQueue.java:731)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
    	at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
    	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)

  24. #4224
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    10,078
    For fun I asked for EMAIL on restock at AdaF and SFun - just got email from SparkFun:
    There are now 1 units of the Teensy 4.0 (DEV-15583) immediately available for purchase from SparkFun Electronics.
    And going to website the item shows that ' 1 items in stock' there too. - that lasted all of 5+ minutes … but they may have filled their existing backorders.

    AdaFruit still 'Out'.

  25. #4225
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    4,290
    Just out of curiosity just checked Adafruit and its still showing OUT OF STOCK. Either I missed it or they sold out really fast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •