-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NSWindow drag regions should only be invalidated on the Main Thread! #5
Comments
This is expected on macOS 10.14+ (since 2018). It's only an issue if you use OpenFrames' built-in window manager (via OSG). It is not an issue if using your own window manager, e.g. wxWidgets, Qt, etc, since those do event handling in the main thread. However, it should not be happening in the PyQt demo ( |
Don't know if this helps, but here is the full script that can be used to reproduce the problem: #!/bin/bash
# version numbers of dev tools:
export PYTHON_VERSION=3.9
export OSG_VERSION=3.6.5
export CMAKE_VERSION=3.25
export SWIG_VERSION=4.0
export NUMPY_VERSION=1.24
export PYQT_VERSION=5.15
export NINJA_VERSION=1.11
# magic to make conda work:
eval "$(conda shell.bash hook)"
# set up directories:
rm -rf ./build
rm -rf ./install
mkdir ./build
mkdir ./install
# create the conda environment and activate it:
conda create --channel nodefaults --channel conda-forge --prefix ./build/osgenv --solver libmamba python=$PYTHON_VERSION openscenegraph=$OSG_VERSION cmake=$CMAKE_VERSION swig=$SWIG_VERSION numpy=$NUMPY_VERSION PYQT=$PYQT_VERSION ninja=$NINJA_VERSION
cd build
conda activate ./osgenv
# configure:
cmake -G Ninja \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_INSTALL_PREFIX=`readlink -f ../install` \
-D OSG_DIR=./osgenv \
-D OF_BUILD_DEMOS=ON \
-D OF_PYTHON_MODULE=ON \
-D SWIG_EXECUTABLE=./osgenv/bin/swig \
..
# build:
ninja
ninja install
# set up paths for the shared libs
export DYLD_LIBRARY_PATH=$CONDA_DEFAULT_ENV/lib:$DYLD_LIBRARY_PATH
export DYLD_LIBRARY_PATH=`readlink -f ../install/lib`:$DYLD_LIBRARY_PATH
# run an example:
cd ../install/bin
python ofqt_demo.py (Note that you can delete the The core dump I get is this:
Also note that I'm getting these warnings at runtime:
This is all with the latest develop commit (67cce87). |
Looks like this same issue has affected other OpenGL applications: Examples:
Seems to have been caused by something apple changed (maybe in macOS 10.15 or so?) |
Can we do a similar thing when using from Python? |
On an Apple M1 Mac (MacOS Ventura 13.1, clang 14.0.0), I can't get the examples to work.
For example, when running
ofcones
I get:If I run
ofqt_demo.py
I get a similar error (-[NSOpenGLContext setView:] must be called from the main thread.
)I'm compiling it with the following script (using conda for all the dependencies):
The text was updated successfully, but these errors were encountered: