Closed miyanyan closed 1 year ago
I got the same error on Linux,
#10 0x00007f4e11aa6fce in __cxxabiv1::__cxa_throw (obj=<optimized out>, tinfo=0x7f4e13a2fa38 <typeinfo for zeno::ErrorException>, dest=0x7f4e138d2aa0 <zeno::ErrorException::~ErrorException()>) at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_throw.cc:93
#11 0x000055ded9ea50f8 in zenovis::opengl::_check_opengl_error(char const*, int, char const*) [clone .cold] ()
#12 0x000055deda0b12fb in std::_Hashtable<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::unique_ptr<zenovis::opengl::Program, std::default_delete<zenovis::opengl::Program> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::unique_ptr<zenovis::opengl::Program, std::default_delete<zenovis::opengl::Program> > > >, std::__detail::_Select1st, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, false, true> >::~_Hashtable() ()
#13 0x000055deda0ad214 in zenovis::Scene::~Scene() ()
#14 0x000055deda0b46fe in zenovis::Session::~Session() ()
#15 0x000055ded9fca4fa in Zenovis::destroyGL() ()
#16 0x000055ded9fc1fb9 in ViewportWidget::initializeGL() ()
#17 0x00007f4e13c24b0d in QGLWidget::glInit (this=0x55deddd4a900) at /usr/src/debug/qt5-base/qtbase/src/opengl/qgl.cpp:4535
#18 0x00007f4e13c29b4a in QGLWidget::resizeEvent (this=0x55deddd4a900, e=<optimized out>) at /usr/src/debug/qt5-base/qtbase/src/opengl/qgl.cpp:4420
#19 0x00007f4e12daf4d4 in QWidget::event (this=0x55deddd4a900, event=0x7ffca2d60560) at kernel/qwidget.cpp:8835
#20 0x00007f4e12d78b5c in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x55deddd4a900, e=0x7ffca2d60560) at kernel/qapplication.cpp:3640
#21 0x00007f4e1208df48 in QCoreApplication::notifyInternal2 (receiver=0x55deddd4a900, event=0x7ffca2d60560) at kernel/qcoreapplication.cpp:1064
#22 0x00007f4e12daa203 in QWidgetPrivate::sendPendingMoveAndResizeEvents (this=this@entry=0x7f4e0000ce40, recursive=recursive@entry=false, disableUpdates=<optimized out>, disableUpdates@entry=false) at kernel/qwidget.cpp:7737
#23 0x00007f4e12dae208 in QWidgetPrivate::show_helper (this=this@entry=0x7f4e0000ce40) at kernel/qwidget.cpp:7788
#24 0x00007f4e12dae85d in QWidgetPrivate::setVisible (this=0x7f4e0000ce40, visible=<optimized out>) at kernel/qwidget.cpp:8137
#25 0x00007f4e12dae663 in QWidgetPrivate::showChildren (this=this@entry=0x55deddd49f30, spontaneous=spontaneous@entry=false) at kernel/qwidget.cpp:8209
#26 0x00007f4e12dae226 in QWidgetPrivate::show_helper (this=this@entry=0x55deddd49f30) at kernel/qwidget.cpp:7794
#27 0x00007f4e12dae85d in QWidgetPrivate::setVisible (this=0x55deddd49f30, visible=<optimized out>) at kernel/qwidget.cpp:8137
#28 0x00007f4e12e92d03 in QDockWidgetLayout::setWidgetForRole (this=0x55dedcab2ef0, r=QDockWidgetLayout::Content, w=0x7f4e0000dff0) at widgets/qdockwidget.cpp:470
#29 0x000055ded9ef6c05 in ZenoDockWidget::setWidget(DOCK_TYPE, QWidget*) ()
#30 0x000055ded9ff6ac7 in ZenoMainWindow::onDockSwitched(DOCK_TYPE) ()
#31 0x00007f4e120bec20 in doActivate<false> (sender=0x55dedcaacf80, signal_index=15, argv=0x7ffca2d609b0) at kernel/qobject.cpp:3935
#32 0x000055ded9eb5bc1 in ZenoDockWidget::dockSwitchClicked(DOCK_TYPE) ()
#33 0x00007f4e120bec20 in doActivate<false> (sender=0x55deddda41d0, signal_index=8, argv=0x7ffca2d60ac0) at kernel/qobject.cpp:3935
#34 0x000055ded9eb5a51 in ZenoDockTitleWidget::dockSwitchClicked(DOCK_TYPE) ()
Describe the bug (both Chinese and English are OK)
Environment
when switch dock:
Zenovis::GetInstance().initializeGL()
, first callSession::~Session()
, it want delete the opengl things in ctx1, but now is in ctx2, so delete shaderCHECK_GL(glDeleteProgram(pro))
will raise an errorGL_INVALID_VALUE
So what is the usage of existing two same dock widgets, it seems that we just need to change the dock widget position when switching dock