Skip to content
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

Crash using OpenGL widget #717

Open
zyrkiel opened this issue Feb 20, 2025 · 2 comments
Open

Crash using OpenGL widget #717

zyrkiel opened this issue Feb 20, 2025 · 2 comments

Comments

@zyrkiel
Copy link

zyrkiel commented Feb 20, 2025

Hello,

I am facing a different issues when handling OpenGL widgets inside the ads::CDockWidget.
I have been able to reproduce a crash with a light example: https://github.com/zyrkiel/Qt-Advanced-Docking-System/tree/Add-OpenGl-example

Screencast.from.2025-02-20.12-16-59.mp4

What I try to do, in this example, is to undock then dock my ads::CDockWidget that handles an OpenGL widget (here a chart with an GPU accelerated series). In that case, the MainWindow crashes when docking back the CDockWidget.
(In my project, I am using QVTKOpenGLStereoWidget that creates a different situation where the CDockWidget disappears if it is undocked from the area it has been added to)

Here is the callstack:

libQt6Core.so.6!QMetaObject::cast(const QMetaObject * const this, const QObject * obj) (/home/tgeffroy/GitRepo/git/vcpkg/buildtrees/qtbase/src/here-src-6-ac50939fe7.clean/src/corelib/kernel/qmetaobject.cpp:395)
libQt6Widgets.so.6!QMetaObject::cast(const QMetaObject * const this, QObject * obj) (/home/tgeffroy/GitRepo/git/vcpkg/buildtrees/qtbase/src/here-src-6-ac50939fe7.clean/src/corelib/kernel/qobjectdefs.h:241)
libQt6Widgets.so.6!qobject_cast<QWidgetWindow*>(QObject * object) (/home/tgeffroy/GitRepo/git/vcpkg/buildtrees/qtbase/src/here-src-6-ac50939fe7.clean/src/corelib/kernel/qobject.h:419)
libQt6Widgets.so.6!QApplicationPrivate::notifyActiveWindowChange(QApplicationPrivate * const this, QWindow * previous) (/home/tgeffroy/GitRepo/git/vcpkg/buildtrees/qtbase/src/here-src-6-ac50939fe7.clean/src/widgets/kernel/qapplication.cpp:1935)
libQt6Gui.so.6!QGuiApplicationPrivate::processFocusWindowEvent(QWindowSystemInterfacePrivate::FocusWindowEvent * e) (/home/tgeffroy/GitRepo/git/vcpkg/buildtrees/qtbase/src/here-src-6-ac50939fe7.clean/src/gui/kernel/qguiapplication.cpp:2566)
libQt6Gui.so.6!QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent * e) (/home/tgeffroy/GitRepo/git/vcpkg/buildtrees/qtbase/src/here-src-6-ac50939fe7.clean/src/gui/kernel/qguiapplication.cpp:2092)
libQt6Gui.so.6!QWindowSystemInterface::sendWindowSystemEvents(QEventLoop::ProcessEventsFlags flags) (/home/tgeffroy/GitRepo/git/vcpkg/buildtrees/qtbase/src/here-src-6-ac50939fe7.clean/src/gui/kernel/qwindowsysteminterface.cpp:1114)
libQt6XcbQpa.so.6!QXcbUnixEventDispatcher::processEvents(QXcbUnixEventDispatcher * const this, QEventLoop::ProcessEventsFlags flags) (/home/tgeffroy/GitRepo/git/vcpkg/buildtrees/qtbase/src/here-src-6-ac50939fe7.clean/src/plugins/platforms/xcb/qxcbeventdispatcher.cpp:27)
libQt6Core.so.6!QEventLoop::processEvents(QEventLoop * const this, QEventLoop::ProcessEventsFlags flags) (/home/tgeffroy/GitRepo/git/vcpkg/buildtrees/qtbase/src/here-src-6-ac50939fe7.clean/src/corelib/kernel/qeventloop.cpp:100)
libQt6Core.so.6!QEventLoop::exec(QEventLoop * const this, QEventLoop::ProcessEventsFlags flags) (/home/tgeffroy/GitRepo/git/vcpkg/buildtrees/qtbase/src/here-src-6-ac50939fe7.clean/src/corelib/kernel/qeventloop.cpp:182)
libQt6Core.so.6!QCoreApplication::exec() (/home/tgeffroy/GitRepo/git/vcpkg/buildtrees/qtbase/src/here-src-6-ac50939fe7.clean/src/corelib/kernel/qcoreapplication.cpp:1486)
libQt6Gui.so.6!QGuiApplication::exec() (/home/tgeffroy/GitRepo/git/vcpkg/buildtrees/qtbase/src/here-src-6-ac50939fe7.clean/src/gui/kernel/qguiapplication.cpp:1926)
libQt6Widgets.so.6!QApplication::exec() (/home/tgeffroy/GitRepo/git/vcpkg/buildtrees/qtbase/src/here-src-6-ac50939fe7.clean/src/widgets/kernel/qapplication.cpp:2555)
main(int argc, char ** argv) (/home/tgeffroy/GitRepo/git/Qt-Advanced-Docking-System/examples/openGL/main.cpp:16)


My config is:
Qt: 6.7.2 (through vcpkg official ports but it should not matter)
ADS: 4.4.0
OS: Ubuntu 24.04
Debug & Release

@zyrkiel
Copy link
Author

zyrkiel commented Feb 21, 2025

I have done a similar test by replacing the ads::CDockWidget by a QDockWidget. In that case, undocking and docking the dock widget containing the OpenGL chart doesn't meet the issue.

@zyrkiel
Copy link
Author

zyrkiel commented Feb 21, 2025

A colleague has tested it on Windows and cannot reproduce what happens on Ubuntu...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant