Latest test build freezes

143 views
Skip to first unread message

Jim Young

unread,
Jul 5, 2023, 5:29:54 PM7/5/23
to OpenPnP
I just downloaded the latest test build, 2023-07-05_18-52-44.30ccdd2, and it freezes when I try to connect to the LitePlacer. The UI become completely unresponsive and the only solution is to kill the process. I made several attempts, trying various steps and sequences of turning on the LitePlacer and starting OpenPnP, all with the same freeze results. 

I rolled back to the previous test version and all is working well now.

Jim Young

unread,
Jul 5, 2023, 5:50:53 PM7/5/23
to OpenPnP
Here's what little log I was able to salvage and the machine.xml files. I reinstalled the 2023-07-05 version and the freeze happened again. I rolled back to the 06-25 version and everything operates normally. Definitely reproducible.

Windows 11 Pro

OpenPnP.0.log
machine.xml

tonyl...@gmail.com

unread,
Jul 5, 2023, 6:11:35 PM7/5/23
to OpenPnP
Is the GUI working ok before you try to connect to the LitePlacer, i.e., can you select the various tabs, load a job, etc?

Tony

Jim Young

unread,
Jul 5, 2023, 6:34:10 PM7/5/23
to OpenPnP
The GUI appears to be working okay before connecting. I'm able to select tabs, look at the log, etc. After I click the connect button the program appears to connect, the home button turns yellow, but the GUI is then unresponsive.

tonyl...@gmail.com

unread,
Jul 6, 2023, 12:15:08 PM7/6/23
to OpenPnP
Ok, I was able to duplicate the issue as well.  I don't think it has anything to do with my latest change though. I went back to the commit before my last changes were merged (83de338d) and it also exhibited the issue. Mark, do you have any ideas?

Tony


Mark

unread,
Jul 6, 2023, 5:14:53 PM7/6/23
to ope...@googlegroups.com

Hi,

I can also replicate it on Windows. I'm now trying to figure this out for five hours. 😤

I checked all the (relevant) changes in the Gcode[Async]Driver et al. Nothing.

When it happens, I see no obvious OpenPnP threads being blocked in deadlock or similar.

But the AWT thread is blocked drawing a simple FillRect of the last button being pressed. WTH?

The only other thing was the serial reader, being blocked for read.

But that's supposed to be okay, since we always had a separate reader thread. Right?

But then I remembered we changed it to have no timeout more than a year ago. 🤔

https://github.com/openpnp/openpnp/pull/1378

So I reinserted that timeout.

https://github.com/openpnp/openpnp/pull/1378/files#diff-dec1db26d6c2776bbec8768f001ed16c73d22f02ef6a455149992cdb83d227edL113

And sure enough, it now works again!? 😲?

Anybody got an idea why this should be acting up like that after a year? Could this be some obscure behavioral change in Java 11 (and above) vs. Java 8 we had before?

Let's try the revert. I will report when it is merged.

_Mark

Ref:
https://github.com/Fazecast/jSerialComm/wiki/Blocking-and-Semiblocking-Reading-Usage-Example

--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/fc438b5f-83d0-46b9-8957-36578f6d52e8n%40googlegroups.com.

Mark

unread,
Jul 6, 2023, 5:48:46 PM7/6/23
to ope...@googlegroups.com

See

https://github.com/openpnp/openpnp/pull/1569

In a few minutes the new test version should be deloyed.

@Jim, @Tony, please test on your side, thanks! 💯

_Mark

tonyl...@gmail.com

unread,
Jul 6, 2023, 5:58:48 PM7/6/23
to OpenPnP
Yep, that seems to have fixed the problem for me - very weird.

Thanks,
Tony

Jim Young

unread,
Jul 6, 2023, 7:31:39 PM7/6/23
to OpenPnP
Download, installed and tested. It seems to be working correctly now.

Excellent bug hunting!

Jim Young

unread,
Jul 7, 2023, 11:35:49 AM7/7/23
to OpenPnP
I was looking over the code last night. With no timeout, serial port reads are blocking. The way the bug behaves, it is as if the serial I/O is running on the UI thread.

If that is the case, and it shouldn't be, I could see an scenario where a serial read is done, no characters are available, the port read and UI is blocked. With the UI blocked there is no way for the program to send a command to the controller, initiating a response and enabling the serial read to complete.

Ian Arkver

unread,
Jul 8, 2023, 12:48:32 PM7/8/23
to OpenPnP
Just to keep the group in the loop - discussions on this bug are still ongoing. See Mark's PR 1569. An alternate fix may be brewing.

Regards,
Ian

Mark

unread,
Jul 8, 2023, 1:07:54 PM7/8/23
to ope...@googlegroups.com

Mark

unread,
Jul 8, 2023, 2:09:26 PM7/8/23
to ope...@googlegroups.com

There is now yet another workaround version available. See the details here:

https://github.com/openpnp/openpnp/pull/1570

Allow for some minutes to deploy.

_Mark

Mark

unread,
Jul 9, 2023, 6:03:55 AM7/9/23
to ope...@googlegroups.com

We're still on it...

https://github.com/Fazecast/jSerialComm/issues/505#issuecomment-1627665026

Looking good, will likely be able to soon upgrade jSeralComm to a new version that resolves all the issues.

_Mark

tonyl...@gmail.com

unread,
Jul 10, 2023, 9:48:47 AM7/10/23
to OpenPnP
Wow, that was an amazing bit of detective work you all put in on this.  Thanks to everyone who worked on it. (And I'm happy my PR #1568 was just the unlucky victim and not the cause.)

Tony

mark maker

unread,
Jul 10, 2023, 1:57:55 PM7/10/23
to ope...@googlegroups.com

The new jSerialComm version is now in the test version. Allow some minutes to deploy.

Details:
https://github.com/openpnp/openpnp/pull/1571

_Mark

Reply all
Reply to author
Forward
0 new messages