ryzom / ryzomcore

Ryzom Core is the open-source project related to the Ryzom game. This community repository is synchronized with the Ryzom Forge repository, based on the Core branch.
https://wiki.ryzom.dev
GNU Affero General Public License v3.0
338 stars 90 forks source link

Ryzom Core Studio plugins example, gui editor and object viewer crash #106

Closed ryzom-pipeline closed 4 years ago

ryzom-pipeline commented 10 years ago

Original report by Meelis Mägi (Bitbucket: [Meelis Mägi](https://bitbucket.org/Meelis Mägi), ).


Both of these plugins crash on startup under linux (Ubuntu 14.04 64bit, Nvidia binary driver).

It seems to work on Ubuntu 14.04 32bit, ATI binary driver).

log before crash

DBG f7fbf7c0 dynloadlib.cpp 207 loadLibrary <Unknown> : Loading dynamic library '/opt/ryzomcore/lib/nel/libnel_drv_opengl.so'
INF f7fbf7c0 dru.cpp 102 createGlDriver <Unknown> : Using the library 'nel_drv_opengl' that is in the directory: '/opt/ryzomcore/lib/nel/libnel_drv_opengl.so'
DBG f7fbf7c0 driver_opengl_window.cpp 363 init <Unknown> : 3D: XOpenDisplay on ':0' OK
INF f7fbf7c0 driver_opengl_window.cpp 374 init <Unknown> : 3D: XRandR 1.4 found
INF f7fbf7c0 driver_opengl_window.cpp 385 init <Unknown> : 3D: XF86VidMode 2.2 found
INF f7fbf7c0 driver_opengl_window.cpp 399 init <Unknown> : 3D: XRender 0.11 found
DBG f7fbf7c0 driver_opengl_window.cpp 403 init <Unknown> : 3D: Available X Extensions:
3D:     Generic Event Extension SHAPE MIT-SHM XInputExtension XTEST 
3D:     BIG-REQUESTS SYNC XKEYBOARD XC-MISC SECURITY 
3D:     XFIXES RENDER RANDR XINERAMA DAMAGE 
3D:     MIT-SCREEN-SAVER DOUBLE-BUFFER RECORD DPMS Present 
3D:     DRI3 X-Resource XVideo XFree86-VidModeExtension XFree86-DGA 
3D:     DRI2 GLX NV-GLX NV-CONTROL XINERAMA 

WRN f7fbf7c0 driver_opengl_window.cpp 203 nelXErrorsHandler <Unknown> : 3D: XError: BadMatch (invalid parameter attributes)
WRN f7fbf7c0 driver_opengl_window.cpp 203 nelXErrorsHandler <Unknown> : 3D: XError: BadAccess (attempt to access private resource denied)

gdb backtrace

#0  0x00007ffff603734f in rawmemchr () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff6020b42 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007ffff60144e7 in vsscanf () from /lib/x86_64-linux-gnu/libc.so.6
#3  0x00007ffff6000747 in sscanf () from /lib/x86_64-linux-gnu/libc.so.6
#4  0x00007fffdadf5499 in NL3D::registerGlExtensions (ext=...)
    at /home/max/src/ryzomcore-deb/ryzomcore-0.10.0+20140923.505a845/code/nel/src/3d/driver/opengl/driver_opengl_extension.cpp:1560
#5  0x00007fffdae13d2b in NL3D::CDriverGL::setupDisplay (this=this@entry=0xe81660)
    at /home/max/src/ryzomcore-deb/ryzomcore-0.10.0+20140923.505a845/code/nel/src/3d/driver/opengl/driver_opengl.cpp:390
#6  0x00007fffdae07082 in NL3D::CDriverGL::setDisplay (this=0xe81660, wnd=wnd@entry=46137359, mode=..., show=show@entry=true, 
    resizeable=resizeable@entry=true)
    at /home/max/src/ryzomcore-deb/ryzomcore-0.10.0+20140923.505a845/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp:1108
#7  0x00007fffe1fd6367 in NL3D::CDriverUser::setDisplay (this=0xbae960, wnd=46137359, mode=..., show=show@entry=true, 
    resizeable=resizeable@entry=true) at /home/max/src/ryzomcore-deb/ryzomcore-0.10.0+20140923.505a845/code/nel/src/3d/driver_user.cpp:252
#8  0x00007fffde7dad37 in NLQT::QNLWidget::init (this=this@entry=0x8b9f90)
    at /home/max/src/ryzomcore-deb/ryzomcore-0.10.0+20140923.505a845/code/studio/src/plugins/example/qnel_widget.cpp:67
#9  0x00007fffde7daf4f in NLQT::QNLWidget::QNLWidget (this=0x8b9f90, parent=<optimized out>)
    at /home/max/src/ryzomcore-deb/ryzomcore-0.10.0+20140923.505a845/code/studio/src/plugins/example/qnel_widget.cpp:47
#10 0x00007fffde7dcfbd in Plugin::SimpleViewer::SimpleViewer (this=0x977640, parent=<optimized out>)
    at /home/max/src/ryzomcore-deb/ryzomcore-0.10.0+20140923.505a845/code/studio/src/plugins/example/simple_viewer.cpp:38
#11 0x00007fffde7dc8bc in ExampleContext (parent=0x8ba270, this=0x9ef590)
    at /home/max/src/ryzomcore-deb/ryzomcore-0.10.0+20140923.505a845/code/studio/src/plugins/example/example_plugin.h:52
#12 Plugin::ExamplePlugin::initialize (this=0x8ba270, pluginManager=<optimized out>, errorString=<optimized out>)
    at /home/max/src/ryzomcore-deb/ryzomcore-0.10.0+20140923.505a845/code/studio/src/plugins/example/example_plugin.cpp:46
#13 0x000000000040e891 in ExtensionSystem::PluginSpec::initializePlugin (this=this@entry=0x8d7de0)
    at /home/max/src/ryzomcore-deb/ryzomcore-0.10.0+20140923.505a845/code/studio/src/extension_system/plugin_spec.cpp:389
#14 0x0000000000414456 in setPluginState (destState=5, spec=0x8d7de0, this=0x7fffffffe250)
    at /home/max/src/ryzomcore-deb/ryzomcore-0.10.0+20140923.505a845/code/studio/src/extension_system/plugin_manager.cpp:367
#15 ExtensionSystem::PluginManager::loadPlugins (this=this@entry=0x7fffffffe250)
    at /home/max/src/ryzomcore-deb/ryzomcore-0.10.0+20140923.505a845/code/studio/src/extension_system/plugin_manager.cpp:103
#16 0x000000000040d3e0 in main (argc=1, argv=<optimized out>)
    at /home/max/src/ryzomcore-deb/ryzomcore-0.10.0+20140923.505a845/code/studio/src/main.cpp:202
ryzom-pipeline commented 10 years ago

Original comment by Meelis Mägi (Bitbucket: [Meelis Mägi](https://bitbucket.org/Meelis Mägi), ).


updated for Ryzom Core Studio

ryzom-pipeline commented 10 years ago

Original comment by Meelis Mägi (Bitbucket: [Meelis Mägi](https://bitbucket.org/Meelis Mägi), ).


plugins/example/qnel_widget.cpp, QNLWidget::init() NL3D::UDriver does not like winId() in setDisplay().

ryzom-pipeline commented 10 years ago

Original comment by dfighter1985 (Bitbucket: dfighter1985, GitHub: dfighter1985).


Try again please, from the develop branch. Thanks!

ryzom-pipeline commented 10 years ago

Original comment by Meelis Mägi (Bitbucket: [Meelis Mägi](https://bitbucket.org/Meelis Mägi), ).


stack trace updated to 0.10.0 develop branch commit 505a845

as you can see, it still crashes under linux.

ryzom-pipeline commented 10 years ago

Original comment by dfighter1985 (Bitbucket: dfighter1985, GitHub: dfighter1985).


OK, then it seems I only fixed A crash, not THE crash... :( I'll keep trying.

ryzom-pipeline commented 10 years ago

Original comment by dfighter1985 (Bitbucket: dfighter1985, GitHub: dfighter1985).


Well I've just wiped my lappy, installed a 64bit XUbuntu 14.4 and couldn't get it to crash, it "just" looks weird: Screenshot - 2014-09-23 - 22.22.09.png

But then it only has an integrated Intel GPU, so different driver.

I'll keep investigating.

ryzom-pipeline commented 8 years ago

Original comment by osquallo (Bitbucket: osquallo, GitHub: osquallo).


Seem's to launch without crash (under debian with nvidia driver) by changing

#!c++
    // create the driver
    m_driver = NL3D::UDriver::createDriver(0, false);
    nlassert(m_driver);

    // initialize the nel 3d viewport
    m_driver->setDisplay((nlWindow)winId(), NL3D::UDriver::CMode(width(), height(), 32));

To

#!c++
    // create the driver
    m_driver = NL3D::UDriver::createDriver();
    nlassert(m_driver);

    // initialize the nel 3d viewport
    m_driver->setDisplay(NL3D::UDriver::CMode(width(), height(), 32));

No more opengl crash because of opengl context not created properly. Edit: i just want to add that it's the way driver are created in the objec viewer example in nel's sample. And for the weird look of the previous post it's look like when we had used our own data accidentally mixed with ryzom data.

kaetemi commented 4 years ago

Review Qt tool design.