coin3d / pivy

python bindings to coin3d
ISC License
53 stars 37 forks source link

SoGui.init(sys.argv[0]) run error #100

Open CaeCoder opened 1 year ago

CaeCoder commented 1 year ago

call code:myWindow = SoGui.init(sys.argv[0]),there throw error

Traceback (most recent call last): File "D:\Temp\pivy\pivy-master\examples\Mentor\02.1.HelloCone.py", line 63, in main() File "D:\Temp\pivy\pivy-master\examples\Mentor\02.1.HelloCone.py", line 34, in main myWindow = SoGui.init(sys.argv[0]) File "D:\Software\Software_Install\Anaconda3\lib\site-packages\pivy\sogui.py", line 123, in init return pivy.quarter.QuarterWidget() File "D:\Software\Software_Install\Anaconda3\lib\site-packages\pivy\quarter\QuarterWidget.py", line 204, in init QuarterWidget._sensormanager = SensorManager() File "D:\Software\Software_Install\Anaconda3\lib\site-packages\pivy\quarter\SensorManager.py", line 51, in init SoDB.getSensorManager().setChangedCallback(self.sensorQueueChangedCB, self) File "D:\Software\Software_Install\Anaconda3\lib\site-packages\pivy\coin.py", line 4068, in setChangedCallback return _coin.SoSensorManager_setChangedCallback(self, sensorQueueChangedCB, data) TypeError: in method 'SoSensorManager_setChangedCallback', argument 2 of type 'void ()(void )' Exception ignored in: <function SensorManager.del at 0x000001D914F48280> Traceback (most recent call last): File "D:\Software\Software_Install\Anaconda3\lib\site-packages\pivy\quarter\SensorManager.py", line 58, in del if self._signalthread.isRunning(): RuntimeError: Internal C++ object (SignalThread) already deleted.

marioalexis84 commented 1 year ago

https://github.com/coin3d/pivy/pull/99 solve this.

CaeCoder commented 1 year ago

I update to the latest pivy (2022-08-25), recompile, and this error still exist.

CaeCoder commented 1 year ago

run #99,run below code,there is error _TypeError: in method 'SoSensorManagersetChangedCallback', argument 2 of type 'void ()(void )' from PySide2.QtWidgets import QApplication from pivy import quarter app = QApplication() q = quarter.QuarterWidget()

CaeCoder commented 1 year ago

my python environment is "Python 3.9.7 (default, Sep 16 2021, 16:59:28) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32"

marioalexis84 commented 1 year ago

How are you recompiling? Can you try a full rebuild? Currently, changes to the SWIG interface file pivy_common_typemaps.i don't trigger a rebuild.

CaeCoder commented 1 year ago

I recoimpile with cmake-gui configure setting Visual Studio 2017 X64,swig4.0.0,Qt5 items selected Anaconda install directory。I deleted all build files and folder before compile。recompiled,run Install project to make pivy package in Anaconda Lib/Site-package/pivy