Qt dependencies for Windows 10
-
I had them installed for a long time, so it was either an update in any of those modules, or a bug I introduced that somehow conflicts with them.
I haven't install them after this, but once our module is ready for release I will definitely check this issue again (as I was playing with Anaconda3, and putting it on the path also affects Qt, there is a chance it was related to this).
-
I suspect it might be related more to Anaconda3 affecting Qt, since Anaconda also ships Qt libraries.
If you suspect that it is due to SAMSON modules, could you, please, put a list of those you are suspecting causing the problem. -
Hi!
I think it is Anaconda3 definitely, as I had again the problem after playing around with the python bindings. I have submitted a samson log which shows an error. -
Thank you for reporting, @Elisa !
In the report message, you write that you get this problem when you try to run Debug. The Python scripting is supported only in Release mode since Python is not shipped with debug libraries.
Is the crash report you submitted from the SAMSON-Debug or from SAMSON?
-
When you create Python bindings for your SAMSON Element, you should do it only for the Release version of the Element and not for the Debug version.
-
From SAMSON release I think.
So I did the following: I configured everything to get Python Scripting working so I could work on the branch of my project that has the Python bindings. Everything went ok so far, I then checked-out to the branch without python bindings and removed Python Scripting from my elements. Then I tried to run Debug and it crashed, I could run Samson release but I got that error. I removed Anaconda3 from my path, re-run cmake and the error was gone. -
Did you clean the project (clean, re-run cmake) after checking the version without Python bindings?
If you add Anaconda3 to your Path environment variable now, does SAMSON crash when you run in Debug?
I suggest adding some variable defining whether you compile the project with Python bindings or without such that it won't be compiled with Python bindings in the Debug mode at all, e.g. in the CMakeLists.txt of your Element (see the PyBindTutorial sample):
#################################################### # Python bindings #################################################### IF( NOT DEBUG ) # Disable the creation of Python bindings in the Debug mode since Python is not supported in the Debug mode FIND_PACKAGE( PythonInterp ${PYTHON_VERSION} REQUIRED ) IF ( PYTHONINTERP_FOUND ) SET(CREATE_PYTHON_BINDINGS TRUE) ENDIF ( PYTHONINTERP_FOUND ) ENDIF() IF ( CREATE_PYTHON_BINDINGS ) # Determine Python paths, see PyBindTutorial # ... # This define is used in the code to determine whether Python bindings should be created or not add_definitions(-DCREATE_PYTHON_BINDINGS) ELSE ( CREATE_PYTHON_BINDINGS ) SET (PYTHON_LIBRARY "") ENDIF ( CREATE_PYTHON_BINDINGS ) # ... TARGET_LINK_LIBRARIES ( ${OUTPUT_NAME} ${QT_LIBRARIES} ${PYTHON_LIBRARY} ${OPENGL_LIBRARY} ${SAMSON_SDK_LIBRARIES} )
And then use this
CREATE_PYTHON_BINDINGS
variable in your code like it is done in the PyBindTutorial sample, e.g.:#ifdef CREATE_PYTHON_BINDINGS #include "pybind11/pybind11.h" // ... #endif
You can test whether you have the same problem with the PyBindTutorial sample when you compile it in the Release mode, and then launch SAMSON in the Debug mode.
-
Hi, yes, I deleted the build folder and run cmake after checking out from the Python bindings version. If I add Anaconda3 now I don't think it will crush unless I re-run cmake again, I have cloned my repository again so I don't need to check out and will test this next time I run the version with python bindings.
I never had problems launching the version with Python Bindings in the debug mode, it just doesn't show up but otherwise runs fine, but I will check again.
-
Could you, please, also check whether in the CMakeLists of your Element you link to a Python library even in the Debug version?
-
Hi Dmitriy,
My CMakeLists for the Python Bindings version is like you posted above, so I'm not linking in the debug mode. My other branches don't have any reference to Python in the CMakeLists, so they are not linking neither.