donovan6000 / M33-Fio

The ultimate OctoPrint plugin
GNU General Public License v3.0
125 stars 38 forks source link

Error in unloadSharedLibrary #150

Closed ra100 closed 8 years ago

ra100 commented 8 years ago

I'm getting this ugly error on Linux, before print, when using shared library.

2016-06-07 20:00:30,353 - octoprint.plugin - ERROR - Error while calling plugin m3dfio
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/OctoPrint-1.3.0.dev1071+gdb66e4a-py2.7.egg/octoprint/plugin/__init__.py", line 242, in call_plugin
    result = getattr(plugin, method)(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/OctoPrint_M3DFio-0.34.2016060604-py2.7.egg/octoprint_m3dfio/__init__.py", line 4554, in on_event
    if self.loadSharedLibrary() :
  File "/usr/local/lib/python2.7/dist-packages/OctoPrint_M3DFio-0.34.2016060604-py2.7.egg/octoprint_m3dfio/__init__.py", line 933, in loadSharedLibrary
    self.unloadSharedLibrary()
  File "/usr/local/lib/python2.7/dist-packages/OctoPrint_M3DFio-0.34.2016060604-py2.7.egg/octoprint_m3dfio/__init__.py", line 1044, in unloadSharedLibrary
    _ctypes.dlclose(self.sharedLibrary._handle)
OSError: P�rP�r�r�r`�r`�rh�rh�rp�rp�rx�rx�r��r��r��r��r��r��r��r��r��r��r��r��r��r��r�<�r�<�r��r��r��r��r�B�r�B�r�0�r�0�r��r��r��r��rp��rp��r��r��r: shared object not open

and withou shared library

Fatal Python error: (pygame parachute) Segmentation Fault
fish: “octoprint serve” terminated by signal SIGABRT (Abort)
donovan6000 commented 8 years ago

Alright, it should be fixed now. Windows has trouble updating M3D Fio when it has the shared library loaded, so I changed it so that it'll only load the shared library when it needs it and unload it when it's done.

ra100 commented 8 years ago

I confirm, it's fixed. Thanks.