After adding the attached patch dont-draw-empty-scene.diff the game still segfaults :
#0 0x00007ffff5a10086 in ?? () from /lib/x86_64-linux-gnu/libc.so.6 #1 0x00007ffff6702997 in ?? () from /usr/lib/x86_64-linux-gnu/libGL.so.1 #2 0x00007ffff6702dab in ?? () from /usr/lib/x86_64-linux-gnu/libGL.so.1 #3 0x000000000041de37 in Board::paintGL (this=0x6fe340) at src/board.cpp:681 #4 0x00007ffff7b0cd90 in QGLWidget::glDraw() () from /usr/lib/x86_64-linux-gnu/libQtOpenGL.so.4 #5 0x0000000000432e30 in Message::setVisible (this=<optimized out>, visible=<optimized out>) at src/message.cpp:111 #6 0x0000000000421ecb in Board::newGame (this=0x6fe340, image=..., difficulty=2) at src/board.cpp:191 #7 0x00007ffff6abf591 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 #8 0x0000000000447521 in ChooseGameDialog::newGame (this=<optimized out>, _t1=..., _t2=2) at build/moc_choose_game_dialog.cpp:101 #9 0x00007ffff6abf591 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 #10 0x0000000000447b94 in NewGameTab::newGame (this=<optimized out>, _t1=..., _t2=2) at build/moc_new_game_tab.cpp:132 #11 0x0000000000433c8e in NewGameTab::accept (this=0x7caed0) at src/new_game_tab.cpp:241 #12 0x00007ffff6abf591 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 #13 0x00007ffff6abf591 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 #14 0x00007ffff766b472 in QAbstractButton::clicked(bool) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #15 0x00007ffff73aa66e in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #16 0x00007ffff73ab9ab in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #17 0x00007ffff73abc1c in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #18 0x00007ffff7030964 in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #19 0x00007ffff6fe0204 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #20 0x00007ffff6fe5953 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #21 0x00007ffff6aab1ac in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 #22 0x00007ffff6fe11d2 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #23 0x00007ffff705d635 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #24 0x00007ffff705c4fa in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #25 0x00007ffff7084e62 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #26 0x00007ffff48a179a in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #27 0x00007ffff48a1b60 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #28 0x00007ffff48a1c24 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #29 0x00007ffff6ada6cf in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 #30 0x00007ffff7084aee in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #31 0x00007ffff6aa9f92 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 #32 0x00007ffff6aaa1e7 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 #33 0x00007ffff74ac526 in QDialog::exec() () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #34 0x0000000000444566 in Window::chooseGame (this=this@entry=0x6c26e0, files=...) at src/window.cpp:203 #35 0x0000000000446157 in Window::Window (this=0x6c26e0, files=...) at src/window.cpp:139 #36 0x000000000043221a in Application::createWindow (this=this@entry=0x7fffffffe4a0) at src/main.cpp:76 #37 0x00000000004194e7 in main (argc=1, argv=<optimized out>) at src/main.cpp:193
Date: Sat, 12 May 2012 19:07:40 -0400 From: Graeme Gott <gra...@gottcode.org> diff --git a/src/board.cpp b/src/board.cpp index fd6435a..6622f9c 100644 --- a/src/board.cpp +++ b/src/board.cpp @@ -606,7 +606,9 @@ void Board::paintGL() // Draw scene rectangle QColor fill = palette().color(QPalette::Base); QColor border = fill.lighter(125); - drawArray(m_scene_array, fill, border); + if (m_scene.isValid()) { + drawArray(m_scene_array, fill, border); + } // Draw pieces graphics_layer->bindTexture(0, m_image);