LinuxCNC randomly crashes reportedly due to Python bug
- matasbuk
- Offline
- Junior Member
-
Less
More
- Posts: 27
- Thank you received: 2
04 Aug 2025 06:32 #332793
by matasbuk
LinuxCNC randomly crashes reportedly due to Python bug was created by matasbuk
Hello, I am running the master branch of LinuxCNC with QTLathe GUI. I have a Python component that reads the feed rate from linuxcnc.stat and further use that value in my C component. The machine seems to randomly hard crash and exit LinuxCNC fully. What could be the problem ar what could I change to solve this? Thank you in advance! I am attaching the Python and C components, .ini and .hal files and the error log.
Please Log in or Create an account to join the conversation.
- unknown
- Offline
- Platinum Member
-
Less
More
- Posts: 508
- Thank you received: 180
04 Aug 2025 07:49 #332796
by unknown
The error log has identified an issue (noted above), you will need to address this.
Replied by unknown on topic LinuxCNC randomly crashes reportedly due to Python bug
Unexpected realtime delay on task 0 with period 1000000
This Message will only display once per session.
Run the Latency Test and resolve before continuing.
Starting DISPLAY program: qtvcp
hm2/hm2_7i95.0: Smart Serial port 0: DoIt not cleared from previous servo thread. Servo thread rat.sserial.0.fault-count pin will indicate if this is happening frequently.
The error log has identified an issue (noted above), you will need to address this.
Please Log in or Create an account to join the conversation.
- matasbuk
- Offline
- Junior Member
-
Less
More
- Posts: 27
- Thank you received: 2
04 Aug 2025 13:19 #332819
by matasbuk
Replied by matasbuk on topic LinuxCNC randomly crashes reportedly due to Python bug
Solving the realtime delay should solve this? Didn’t consider this as I thought Python did not ran in realtime
Please Log in or Create an account to join the conversation.
- tommylight
-
- Away
- Moderator
-
Less
More
- Posts: 20582
- Thank you received: 7007
04 Aug 2025 13:42 #332820
by tommylight
Replied by tommylight on topic LinuxCNC randomly crashes reportedly due to Python bug
1. whatever you are doing to log all the 0's and 50's , don't, just had to scroll through over 70 pages of it, it is not fun and wastes a lot of very precious time
2. none of the two mentioned errors will not stop the LinuxCNC from running
3. Python error, as noted at the end of a very long error log, having to do with jog buttons as it seems
-
Try using Axis GUI, make the machine work properly by fixing latency issues and the "dolt not cleared" as this will disable the Mesa card completely.
Then try other GUI's.
2. none of the two mentioned errors will not stop the LinuxCNC from running
3. Python error, as noted at the end of a very long error log, having to do with jog buttons as it seems
-
Try using Axis GUI, make the machine work properly by fixing latency issues and the "dolt not cleared" as this will disable the Mesa card completely.
Then try other GUI's.
Please Log in or Create an account to join the conversation.
- rodw
-
- Offline
- Platinum Member
-
Less
More
- Posts: 11383
- Thank you received: 3820
05 Aug 2025 04:46 #332865
by rodw
Replied by rodw on topic LinuxCNC randomly crashes reportedly due to Python bug
Why are you using Python when the feed rate is available in real time in motion? There are other options but try this pinmotion.feed-upm OUT FLOATCurrent feed rate in G-code program units per minute for motion.motion-type feed(2) and arc(3). Value is the G-code program F value multiplied by the current feed override value and the motion.adaptive-feed setting (if M52 active). Value is zero if motion.feed-hold or motion.feed-inhibit are asserted. If units (G20 or G21) are not specified in the G-code file then units will be the last units used.linuxcnc.org/docs/stable/html/man/man9/motion.9.html
Please Log in or Create an account to join the conversation.
- MennilTossFlykune
- Offline
- Senior Member
-
Less
More
- Posts: 42
- Thank you received: 29
08 Aug 2025 13:28 - 10 Aug 2025 19:52 #333045
by MennilTossFlykune
Replied by MennilTossFlykune on topic LinuxCNC randomly crashes reportedly due to Python bug
I've also been getting this in QtDragon_hd.
It was caused by this commit:
github.com/LinuxCNC/linuxcnc/commit/656a...de1ab167c3e89f700a7e
In halmodule.cc, if all occurrences ofare changed back tothe error goes away.
Fatal Python error: none_dealloc: deallocating None: bug likely caused by a refcount error in a C extension
Python runtime state: initialized
Thread 0x00007f9835f3c6c0 (most recent call first):
<no Python frame>
Thread 0x00007f9863bff6c0 (most recent call first):
<no Python frame>
Current thread 0x00007f98aa3ed040 (most recent call first):
File "/home/user/Documents/linuxcnc/lib/python/qtvcp/widgets/state_led.py", line 140 in change_state
File "/home/user/Documents/linuxcnc/lib/python/qtvcp/widgets/state_led.py", line 135 in _flip_state
File "/home/user/Documents/linuxcnc/lib/python/qtvcp/widgets/state_led.py", line 237 in _set_halpin_text
File "/home/user/Documents/linuxcnc/lib/python/qtvcp/widgets/state_led.py", line 130 in <lambda>
File "/home/user/Documents/linuxcnc/lib/python/common/hal_glib.py", line 930 in update
File "/home/user/Documents/linuxcnc/bin/qtvcp", line 463 in __init__
File "/home/user/Documents/linuxcnc/bin/qtvcp", line 607 in <module>
It was caused by this commit:
github.com/LinuxCNC/linuxcnc/commit/656a...de1ab167c3e89f700a7e
In halmodule.cc, if all occurrences of
return Py_None;
Py_RETURN_NONE;
Last edit: 10 Aug 2025 19:52 by MennilTossFlykune.
Please Log in or Create an account to join the conversation.
Time to create page: 0.076 seconds