Probe Basic backplot error when loading file
- Unlogic
- Offline
- Elite Member
-
Less
More
- Posts: 236
- Thank you received: 115
22 Oct 2025 07:14 #336860
by Unlogic
Probe Basic backplot error when loading file was created 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.
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.
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.).
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: 1I 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: 2I 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.).
Please Log in or Create an account to join the conversation.
- Unlogic
- Offline
- Elite Member
-
Less
More
- Posts: 236
- Thank you received: 115
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
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.
- Unlogic
- Offline
- Elite Member
-
Less
More
- Posts: 236
- Thank you received: 115
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
LinuxCNC: 2.9.4
ProbeBasic: stable branch
Please Log in or Create an account to join the conversation.
- Lcvette
-
- Offline
- Moderator
-
Less
More
- Posts: 1489
- Thank you received: 712
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.
- Unlogic
- Offline
- Elite Member
-
Less
More
- Posts: 236
- Thank you received: 115
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?
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.
- Lcvette
-
- Offline
- Moderator
-
Less
More
- Posts: 1489
- Thank you received: 712
22 Oct 2025 21:48 #336899
by Lcvette
Replied by Lcvette on topic Probe Basic backplot error when loading file
the docs are actually for the develop version, so just use the docs and configuration page information for any changes required
Please Log in or Create an account to join the conversation.
- Unlogic
- Offline
- Elite Member
-
Less
More
- Posts: 236
- Thank you received: 115
23 Oct 2025 10:59 #336951
by Unlogic
Replied by Unlogic on topic Probe Basic backplot error when loading file
I upgraded to the development version and did the required config changes and copied over the new routines etc.
However the bug is still there. The stack trace has changed to another line but it seems to be the same error:
[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.025238275527954 seconds --- (vtk_backplot.py:831)
[qtpyvcp.app.launcher][CRITICAL] Unhandled exception in vtk_backplot.py line 917 (launcher.py:37)
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/qtpyvcp/widgets/display_widgets/vtk_backplot/vtk_backplot.py", line 917, in load_program
point_01_pos = self.path_offset_start_point[prev_wcs_index]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
KeyError: 1
This is the setup I'm probing.
I've tried probing the parts in different order etc but as soon as G56 finishes probing the error pop up. Now in the development version pressing the stop button after the error has appeared doesn't do anything instead the GUI mostly frozen for any user input however it still updates if I use my physical button for e-stop etc.
Could there be a typo somewhere relating to G56?
However the bug is still there. The stack trace has changed to another line but it seems to be the same error:
[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.025238275527954 seconds --- (vtk_backplot.py:831)
[qtpyvcp.app.launcher][CRITICAL] Unhandled exception in vtk_backplot.py line 917 (launcher.py:37)
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/qtpyvcp/widgets/display_widgets/vtk_backplot/vtk_backplot.py", line 917, in load_program
point_01_pos = self.path_offset_start_point[prev_wcs_index]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
KeyError: 1
This is the setup I'm probing.
I've tried probing the parts in different order etc but as soon as G56 finishes probing the error pop up. Now in the development version pressing the stop button after the error has appeared doesn't do anything instead the GUI mostly frozen for any user input however it still updates if I use my physical button for e-stop etc.
Could there be a typo somewhere relating to G56?
Attachments:
Please Log in or Create an account to join the conversation.
- Unlogic
- Offline
- Elite Member
-
Less
More
- Posts: 236
- Thank you received: 115
23 Oct 2025 12:43 #336956
by Unlogic
Replied by Unlogic on topic Probe Basic backplot error when loading file
I started looking into to this and while I haven't been able to pinpoint the cause yet I found these lines of code in vtk_backplot.py
The lines highlighted red and yellow seem to be duplicates of each other and the ones marked green don't seem to be used anywhere.
Digging a bit further it seems that the path_offset_start_point dictionary where the KeyError comes from only gets written to in one location (marked orange below).
So I assume that the dictonary is supposed to be populated with values via the VTKCanon class.
The lines highlighted red and yellow seem to be duplicates of each other and the ones marked green don't seem to be used anywhere.
Digging a bit further it seems that the path_offset_start_point dictionary where the KeyError comes from only gets written to in one location (marked orange below).
So I assume that the dictonary is supposed to be populated with values via the VTKCanon class.
Attachments:
Please Log in or Create an account to join the conversation.
- Lcvette
-
- Offline
- Moderator
-
Less
More
- Posts: 1489
- Thank you received: 712
24 Oct 2025 02:17 #337015
by Lcvette
Replied by Lcvette on topic Probe Basic backplot error when loading file
did you try fixing the missing parenthesis and retesting?
Please Log in or Create an account to join the conversation.
- Lcvette
-
- Offline
- Moderator
-
Less
More
- Posts: 1489
- Thank you received: 712
24 Oct 2025 02:29 #337016
by Lcvette
Replied by Lcvette on topic Probe Basic backplot error when loading file
im not probing but i can set 54 55 56 work offsets with mdi in the same command in the probe routine and am getting no error in the develop version, let me go back through your post and read the triggering description again to see if i missed something.
Please Log in or Create an account to join the conversation.
Moderators: KCJ, Lcvette
Time to create page: 0.221 seconds