Ogre - Runs on X Server DISPLAY=:x once, Segmentation fault

Problems building or running the engine, queries about how to use features etc.
Post Reply
User avatar
rakeshj
Gnoblar
Posts: 24
Joined: Tue Mar 17, 2009 10:53 am
Location: Benglore - India
x 1

Ogre - Runs on X Server DISPLAY=:x once, Segmentation fault

Post by rakeshj »

In an Amazon EC2 (GPU Based instance), OGRE implementation runs as expected on first run, however generates Segmentation Fault afterwards.

OS : Ubuntu 14.04
OGRE Version : 1.8.1

/etc/X11/xorg.conf

Code: Select all

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 352.63  (buildmeister@swio-display-x64-rhel04-11)  Sat Nov  7 22:00:19 PST 2015


Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "Module"
    Load           "dbe"
    Load           "extmod"
    Load           "type1"
    Load           "freetype"
    Load           "glx"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Keyboard0"
    Driver         "keyboard"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    HorizSync       28.0 - 33.0
    VertRefresh     43.0 - 72.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BusID     "0:3:0"
    BoardName   "GRID K520"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "AllowEmptyInitialConfiguration" "True"
    Option         "UseDisplayDevice" "None"
    SubSection     "Display"
    Modes   "1024x768" "800x600" "640x480"
        #Virtual     1280 1024
        Depth       24
    EndSubSection
EndSection
Nvidia driver installed nvidia-352

Valgrind dump

Code: Select all

==4032== Process terminating with default action of signal 11 (SIGSEGV)
==4032==  Access not within mapped region at address 0x4
==4032==    at 0xFC58699: Ogre::GLXGLSupport::refreshConfig() (in /usr/lib/x86_64-linux-gnu/OGRE-1.9.0/RenderSystem_GL.so.1.9.0)
==4032==    by 0xFC5A8E0: Ogre::GLXGLSupport::addConfig() (in /usr/lib/x86_64-linux-gnu/OGRE-1.9.0/RenderSystem_GL.so.1.9.0)
==4032==    by 0xFCA5B63: Ogre::GLRenderSystem::GLRenderSystem() (in /usr/lib/x86_64-linux-gnu/OGRE-1.9.0/RenderSystem_GL.so.1.9.0)
==4032==    by 0xFCAB103: Ogre::GLPlugin::install() (in /usr/lib/x86_64-linux-gnu/OGRE-1.9.0/RenderSystem_GL.so.1.9.0)
==4032==    by 0x559D03E: Ogre::Root::installPlugin(Ogre::Plugin*) (in /usr/lib/x86_64-linux-gnu/libOgreMain.so.1.9.0)
==4032==    by 0xFC9A775: dllStartPlugin (in /usr/lib/x86_64-linux-gnu/OGRE-1.9.0/RenderSystem_GL.so.1.9.0)
==4032==    by 0x559D25A: Ogre::Root::loadPlugin(std::string const&) (in /usr/lib/x86_64-linux-gnu/libOgreMain.so.1.9.0)
==4032==    by 0x559EA88: Ogre::Root::loadPlugins(std::string const&) (in /usr/lib/x86_64-linux-gnu/libOgreMain.so.1.9.0)
==4032==    by 0x559F999: Ogre::Root::Root(std::string const&, std::string const&, std::string const&) (in /usr/lib/x86_64-linux-gnu/libOgreMain.so.1.9.0)
.........
........
.......
==4032==  If you believe this happened as a result of a stack
==4032==  overflow in your program's main thread (unlikely but
==4032==  possible), you can try to increase the size of the
==4032==  main thread stack using the --main-stacksize= flag.
==4032==  The main thread stack size used in this run was 8388608.
==4032== 
==4032== HEAP SUMMARY:
==4032==     in use at exit: 749,635 bytes in 3,502 blocks
==4032==   total heap usage: 46,903 allocs, 43,401 frees, 674,478,287 bytes allocated
==4032== 
==4032== LEAK SUMMARY:
==4032==    definitely lost: 1 bytes in 1 blocks
==4032==    indirectly lost: 0 bytes in 0 blocks
==4032==      possibly lost: 339,804 bytes in 1,247 blocks
==4032==    still reachable: 409,830 bytes in 2,254 blocks
==4032==         suppressed: 0 bytes in 0 blocks
==4032== Rerun with --leak-check=full to see details of leaked memory
X server is run as

$ X :0
And it works again, if we run another instance of X in a different DISPLAY, but crashes on second run again.
| Lead Graphics Programmer, MPC Film, Technicolor India |
| Game Projects ( Apox, Tryst ) at BlueGiant Interactive |
| Graphics Projects ( Ogre3D based slideshow maker 'picovico : a video maker' ) at Picovico Pvt Ltd. |
| Bengaluru, India |
Post Reply