Skip to content

Gmoccapy: Multiple sim configs fail to launch #4415

Description

@Sigma1912

Testing on current master:

Example

None of the Gmoccapy sim configs in configs/sim/gmoccapy/non_trivial_kinematics launch.

Possible problem

Comparing the terminal output to 2.9.10 when lauching configs/sim/gmoccapy/non_trivial_kinematics/Gantry/gantry_mm.ini points to a possible clash between the gmoccapy-internal ini value check and the new linuxcnc ini parser

2.9.10 (config launches):
[Gmoccapy.GMOCCAPY.GETINIINFO][WARNING] Wrong entry [DISPLAY] CYCLE_TIME in INI File! Will use gmoccapy default 150 (getiniinfo.py:56)

current master (config fails)

/home/user/git/linuxcnc-master/configs/sim/gmoccapy/non_trivial_kinematics/Gantry/gantry_mm.ini:9: warning: Trailing character(s) in signed integer conversion ([DISPLAY]CYCLE_TIME='0.200')

Further testing shows that a missing [DISPLAY] CYCLE_TIME entry in configs/sim/gmoccapy'/moccapy.ini is handled by gmoccapy and does not cause a launch failure.

[Gmoccapy.GMOCCAPY.GETINIINFO][WARNING] Wrong entry [DISPLAY] CYCLE_TIME in INI File! Will use gmoccapy default 150 (getiniinfo.py:56)

However in 2.9.10 the same missing ini value causes the launch to fail with this error:

[Gmoccapy][ERROR]  Found an error!
The following information may be useful in troubleshooting:

Traceback (most recent call last):
  File "/home/user/git/linuxcnc-master/bin/gmoccapy", line 6575, in <module>
    app = gmoccapy(sys.argv)
          ^^^^^^^^^^^^^^^^^^
  File "/home/user/git/linuxcnc-master/bin/gmoccapy", line 514, in __init__
    GLib.timeout_add( cycle_time, self._periodic )  # time between calls to the function, in milliseconds
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/gi/overrides/GLib.py", line 612, in timeout_add
    return GLib.timeout_add(priority, interval, function, *user_data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Argument 1 does not allow None as a value
 (gmoccapy:75)

which indicates a problem with a value returned from ini parsing/checking

cycle_time = self.get_ini_info.get_cycle_time()
GLib.timeout_add( cycle_time, self._periodic ) # time between calls to the function, in milliseconds

def get_cycle_time(self):
temp = self.inifile.getint("DISPLAY", "CYCLE_TIME")
try:
return temp
except:
message = ("Wrong entry [DISPLAY] CYCLE_TIME in INI File! ")
message += ("Will use gmoccapy default 150")
LOG.warning(message)
return 150

Metadata

Metadata

Assignees

Type

No type

Projects

Status
In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions