[LinuxCNC/linuxcnc PR#472] Dont crash on corrupt position.txt

未分类 bolang 5个月前 (10-15) 24次浏览

Issue #472 | 状态: 已关闭 | 作者: SebKuzminsky | 创建时间: 2018-07-25


The local hackspace had a machine with a corrupt position.txt file: it existed, but was empty. As a result, Task would segfault at startup, every time anyone launched LinuxCNC.

Investigation revealed two problems:
1. There was no error in the log complaining about the corrupted position.txt file.
2. Task’s convoluted startup skipped inihal setup because of the failure of emcPositionLoad(), so Task would segfault later when trying to access the inihal data structures.

This PR adds the missing error logging to emcPositionLoad(), and fixes the initialization bug in Task that let it run without inihal set up.


评论 (1)

#1 – KurtJacobson 于 2018-07-27

Thank you @SebKuzminsky, this is great! I have run into this several times in the past, once when I had first started using LCNC …


原始Issue: https://github.com/LinuxCNC/linuxcnc/pull/472

喜欢 (0)