Probe Basic backplot error when loading file

More
22 Oct 2025 07:14 #336860 by Unlogic
It's been a long time since I found any bugs in Probe Basic but this morning I came across a backplot error.

To trigger this bug I loaded the attached g-code file and probed 3 work offsets using the built in probing functionality (G54, G55, G56).

As soon as I probed the final offset G56 I got the first error below.

 
[qtpyvcp.widgets.input_widgets.gcode_text_edit][INFO] File encoding: ascii (gcode_text_edit.py:538) [qtpyvcp.widgets.display_widgets.vtk_backplot.vtk_backplot][INFO] -------Draw time 1.4562861919403076 seconds --- (vtk_backplot.py:762) [qtpyvcp.app.launcher][CRITICAL] Unhandled exception in vtk_backplot.py line 849 (launcher.py:37) Traceback (most recent call last): File "/usr/lib/python3/dist-packages/qtpyvcp/widgets/display_widgets/vtk_backplot/vtk_backplot.py", line 849, in load_program point_01_pos = self.path_offset_start_point[prev_wcs_index] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^ KeyError: 1

I pressed the ignore button but after that the GUI became partially unresponsive and for example the jog buttons would not work.

Pressing the stop button on the machine gave me the following error.

 
[qtpyvcp.widgets.input_widgets.gcode_text_edit][INFO] File encoding: ascii (gcode_text_edit.py:538) qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 7081, resource id: 8480708, major code: 40 (TranslateCoords), minor code: 0 [qtpyvcp.app.launcher][CRITICAL] Unhandled exception in vtk_backplot.py line 1174 (launcher.py:37) Traceback (most recent call last): File "/usr/lib/python3/dist-packages/qtpyvcp/widgets/display_widgets/vtk_backplot/vtk_backplot.py", line 1174, in on_offset_table_changed self.rotate_and_translate() File "/usr/lib/python3/dist-packages/qtpyvcp/widgets/display_widgets/vtk_backplot/vtk_backplot.py", line 1289, in rotate_and_translate self.offset_change_start_actor[wcs_index].SetUserTransform(actor_transform) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ KeyError: 2

I did some further testing and discovered that if I do the probing first and then open the file I get the same error. However if I do the probing, close Probe Basic and then start it again and open the file I get no error but on the other hand this forces me to rehome the machine which is not optimal from an accuracy perspective.

Seems like the probing routine somehow causes the backplot to crash or leave a bade state somewhere. I tired poking around in the code myself but I'm too inexperienced to put my finger on the exact cause.

If you need any information don't hesitate to contact me here on the forums or via e-mail (This email address is being protected from spambots. You need JavaScript enabled to view it.).
 
Attachments:

Please Log in or Create an account to join the conversation.

More
22 Oct 2025 07:17 #336861 by Unlogic
Replied by Unlogic on topic Probe Basic backplot error when loading file
Noticed that the code tags in the editor completely mangled the stack traces, here they are in a more readable form.

Error 1:

[qtpyvcp.widgets.input_widgets.gcode_text_edit][INFO]  File encoding: ascii (gcode_text_edit.py:538)
[qtpyvcp.widgets.display_widgets.vtk_backplot.vtk_backplot][INFO] 
Draw time 1.4562861919403076 seconds --- (vtk_backplot.py:762)
[qtpyvcp.app.launcher][CRITICAL]  Unhandled exception in vtk_backplot.py line 849 (launcher.py:37)
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/qtpyvcp/widgets/display_widgets/vtk_backplot/vtk_backplot.py", line 849, in load_program
    point_01_pos = self.path_offset_start_point[prev_wcs_index]
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
KeyError: 1


Error 2:

[qtpyvcp.widgets.input_widgets.gcode_text_edit][INFO]  File encoding: ascii (gcode_text_edit.py:538)
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 7081, resource id: 8480708, major code: 40 (TranslateCoords), minor code: 0
[qtpyvcp.app.launcher][CRITICAL]  Unhandled exception in vtk_backplot.py line 1174 (launcher.py:37)
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/qtpyvcp/widgets/display_widgets/vtk_backplot/vtk_backplot.py", line 1174, in on_offset_table_changed
    self.rotate_and_translate()
  File "/usr/lib/python3/dist-packages/qtpyvcp/widgets/display_widgets/vtk_backplot/vtk_backplot.py", line 1289, in rotate_and_translate
    self.offset_change_start_actor[wcs_index].SetUserTransform(actor_transform)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
KeyError: 2

Please Log in or Create an account to join the conversation.

More
22 Oct 2025 09:24 #336863 by Unlogic
Replied by Unlogic on topic Probe Basic backplot error when loading file
I realized that I forgot to mention which version and branch I'm running.

LinuxCNC: 2.9.4
ProbeBasic: stable branch

Please Log in or Create an account to join the conversation.

More
22 Oct 2025 14:13 #336880 by Lcvette
Replied by Lcvette on topic Probe Basic backplot error when loading file
I think this was resolved in the develop branch, multiple offsets but was something we found also, you can upgrade to the develop version which should resolve the issue

Please Log in or Create an account to join the conversation.

More
22 Oct 2025 15:41 #336886 by Unlogic
Replied by Unlogic on topic Probe Basic backplot error when loading file
Thank you for a quick reply!

Just as a precaution is there anything special I need to take into consideration when upgrading to the development version?

Please Log in or Create an account to join the conversation.

Moderators: KCJLcvette
Time to create page: 0.366 seconds
Powered by Kunena Forum