SoarGroup / Soar

Soar, a general cognitive architecture for systems that exhibit intelligent behavior.
http://soar.eecs.umich.edu
Other
322 stars 70 forks source link

SVS Viewer crash #414

Open garfieldnate opened 7 months ago

garfieldnate commented 7 months ago

After connecting to SVS viewer and running our ITL/Thor agent for a bit to add all of the scene data to SVS, the viewer crashes with this output in the terminal:

qhull_in = /tmp/qhull_in_irf6ea, qhull_out = /tmp/qhull_out_Aua99e
sh: qconvex: command not found
qhull returned with non-zero status 32512
2023-11-13 13:11:56.509 svs_viewer[68869:320520] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'nextEventMatchingMask should only be called from the Main Thread!'
*** First throw call stack:
(
    0   CoreFoundation                      0x000000018d464418 __exceptionPreprocess + 176
    1   libobjc.A.dylib                     0x000000018cfaeea8 objc_exception_throw + 60
    2   AppKit                              0x0000000190640020 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 2872
    3   libglfw.3.3.dylib                   0x0000000102996db4 _glfwPlatformPollEvents + 112
    4   libglfw.3.3.dylib                   0x0000000102996d34 _glfwPlatformDestroyWindow + 144
    5   libglfw.3.3.dylib                   0x0000000102991bc4 glfwDestroyWindow + 96
    6   libglfw.3.3.dylib                   0x000000010298e340 terminate + 48
    7   libsystem_c.dylib                   0x000000018d1f506c __cxa_finalize_ranges + 480
    8   libsystem_c.dylib                   0x000000018d1f4df0 exit + 44
    9   svs_viewer                          0x00000001028bbd7c qhull + 868
    10  svs_viewer                          0x00000001028bd9c8 set_geom_vertices + 404
    11  svs_viewer                          0x00000001028ba0d0 proc_geom_cmd + 328
    12  svs_viewer                          0x00000001028b9e14 proc_cmd + 660
    13  svs_viewer                          0x00000001028b9a04 proc_input + 344
    14  svs_viewer                          0x00000001028baa9c _thrd_wrapper_function + 28
    15  libsystem_pthread.dylib             0x000000018d30a06c _pthread_start + 148
    16  libsystem_pthread.dylib             0x000000018d304e2c thread_start + 8
)
libc++abi: terminating with uncaught exception of type NSException

Soar is able to continue functioning without error, but does not mention in the debugger output that the SVS viewer has disconnected!. If I state the viewer again, it crashes with the same error as soon as I connect to it (presumably because there are already objects in SVS to send to the viewer).

This was encountered on OSX using the 961_svs_glfw_update branch, but was also reproduced on Linux using a very outdated copy of the development branch.

garfieldnate commented 7 months ago

The issue is that the system has to have qhull installed. On Mac, that can be done from Homebrew. On Linux it may be called qhull-bin.

This is an easy fix, but Soar should handled this failure gracefully and let the user know that qhull needs to be installed!