Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Getting error when using the resounce module #31

#1

Hi Kris,

Here is my testing code for both a SE3Trajectory and a RobotTrajectory. I am able to run and see the resource UI and modify the trajectory, but when I try to close the UI, or save/load a trajectory, I am getting errors, and the error messages are different for the 2 types of trajectories.

Code:

from klampt.model.trajectory import SE3Trajectory,RobotTrajectory
from klampt.io import resource
from klampt.math import se3
from klampt import WorldModel,vis

world_path = '../TRINA/Motion/data/TRINA_world_bubonic.xml'
world = WorldModel()
res = world.readFile(world_path)
robot = world.robot(0)

traj = SE3Trajectory([0,1],[se3.identity(),se3.identity()])
saved,result = resource.edit("se3 traj",traj,'SE3Trajectory','Some spatial trajectory',world=world,referenceObject=robot.link(20))

config0 = robot.getConfig()
config1 = robot.getConfig()
config1[15] += 1
traj = RobotTrajectory(robot = robot, times = [0,1],milestones=[config0,config1])
saved,result = resource.edit("robot traj",traj,'Trajectory','Some robot trajectory',world=world,referenceObject=robot)

Close the UI when testing SE3Trajectory:

######## QGLWidget setProgram ###############
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.7/threading.py", line 926, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.7/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.7/dist-packages/Klampt-0.8.3-py3.7-linux-x86_64.egg/klampt/vis/backends/vis_qt.py", line 170, in run_app_thread
    w.glwindow.setProgram(w.frontend)
  File "/usr/local/lib/python3.7/dist-packages/Klampt-0.8.3-py3.7-linux-x86_64.egg/klampt/vis/backends/qtbackend.py", line 137, in setProgram
    self.setWindowTitle(program.name)
RuntimeError: wrapped C/C++ object of type QtGLWindow has been deleted

Segmentation fault (core dumped)

load/save with SE3Trajectory:

######### QGLWidget Initialize GL ###############
QtGLWidget.initialize: no action menu?
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/Klampt-0.8.3-py3.7-linux-x86_64.egg/klampt/vis/editors.py", line 1283, in save
    resource.save(self.editorObject.value,'auto','.')
  File "/usr/local/lib/python3.7/dist-packages/Klampt-0.8.3-py3.7-linux-x86_64.egg/klampt/io/resource.py", line 364, in save
    extensions=[v for v in loader.typeToExtensions[type]]
KeyError: 'SE3Trajectory'
Aborted (core dumped)

Close the UI when testing RobotTrajectory:

(python3:3602): GLib-CRITICAL **: g_main_context_pop_thread_default: assertion 'stack != NULL' failed
QObject::killTimer: Timers cannot be stopped from another thread
QObject::~QObject: Timers cannot be stopped from another thread
QtDBus: cannot relay signals from parent QObject(0x7f42c8778390 "") unless they are emitted in the object's thread QThread(0x7f42c80012b0 ""). Current thread is QThread(0x2afeb00 "").
QtDBus: cannot relay signals from parent QObject(0x7f42c86c3650 "") unless they are emitted in the object's thread QThread(0x7f42c80012b0 ""). Current thread is QThread(0x2afeb00 "").
[xcb] Unknown sequence number while appending request
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
python3: ../../src/xcb_io.c:161: append_pending_request: Assertion `!xcb_xlib_unknown_seq_number' failed.
Aborted (core dumped)

load/save with RobotTrajectory:

#########################################
klampt.vis: Creating dialog on window 2
#########################################
vis: Creating a dialog from within another dialog or window
vis: creating GL window
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/Klampt-0.8.3-py3.7-linux-x86_64.egg/klampt/vis/editors.py", line 1283, in save
    resource.save(self.editorObject.value,'auto','.')
  File "/usr/local/lib/python3.7/dist-packages/Klampt-0.8.3-py3.7-linux-x86_64.egg/klampt/io/resource.py", line 380, in save
    vis.dialog()
  File "/usr/local/lib/python3.7/dist-packages/Klampt-0.8.3-py3.7-linux-x86_64.egg/klampt/vis/visualization.py", line 864, in dialog
    return _window_manager.dialog()
  File "/usr/local/lib/python3.7/dist-packages/Klampt-0.8.3-py3.7-linux-x86_64.egg/klampt/vis/backends/vis_qt.py", line 325, in dialog
    w.glwindow = _GLBackend.createWindow(w.name)
NameError: name '_GLBackend' is not defined
Aborted (core dumped)

Do you know what might be wrong?

Best,
Yifan Zhu

  • replies 3
  • views 1.1K
  • likes 0
#2

Oops, more bugs I introduced. should be fixed now by git pulling master (or devel).

I am now able to load and save a trajectory with no issues but the same error is still present when I close the UI with Ok/Cancel. However, no error shown when I close the UI using the close box.

#4

Weird, this doesn't happen on my end, but there are some people who have the same problem with other X11 code. Can you

  1. give the sequence of items that pop up, and how you close them,
  2. post the full console output that causes the crash?

Does this happen when you close the UI every time, or just with the second dialog? Does it matter which order you open the dialogs?