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 in MP when another player spawns a vehicle #459

Closed
tritonas00 opened this Issue Nov 23, 2015 · 12 comments

Comments

Projects
None yet
3 participants
@tritonas00
Collaborator

tritonas00 commented Nov 23, 2015

Compiled latest git in Archlinux and downloaded 0.4 High Quality Pack.

Tried to login in Awesome_Gaming_Mit (f4afUID-flat_mitcity) server. (http://www.rigsofrods.com/repository/download/4932)

First attempt:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff749ed99 in Ogre::SceneNode::setVisible(bool, bool) () from /usr/lib/libOgreMain.so.1.9.0

Removed everything from packs folder, left only the map and tried again, game logins nicely.

Restored packs folder, cleaned and regen cache, logged in, but most of the players are out. While playing, one other player came in and spawned a vehicle (gavrilzeta). Game crashes.

gdb output->http://pastebin.com/qmc1WpqH
gdb bt full->http://pastebin.com/wHKaGPLZ

@tritonas00

This comment has been minimized.

Show comment
Hide comment
@tritonas00

tritonas00 Nov 23, 2015

Collaborator

Tried again, crashes upon login

http://pastebin.com/CNLTPS1k

Collaborator

tritonas00 commented Nov 23, 2015

Tried again, crashes upon login

http://pastebin.com/CNLTPS1k

@Hiradur

This comment has been minimized.

Show comment
Hide comment
@Hiradur

Hiradur Nov 23, 2015

Contributor

tritonas00 and I pinned down the problem:

players X and Y.

  • X spawns one vehicle, Y spawns the same vehicle (with the same 3d model) after that -> crash for X
    • X will always crash when trying to login again if Y doesn't remove his vehicle (!)
  • X is online but spawns no vehicle and Y spawns the same vehicle twice -> crash for player X
  • Y has the same vehicle spawned twice already when X logs in -> crash for X immediately after entering the game.

EDIT: For some reason it's now enough when another player spawns any vehicle. Not sure why it wasn't this way in the testing session where above instructions come from, no code changed between sessions.

last line from RoR:

*** Error in `./RoR': corrupted double-linked list: 0x000000001612c480 ***

gdb:

(gdb) bt
#0  0x00007f6e0e031267 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55
#1  0x00007f6e0e032eca in __GI_abort () at abort.c:89
#2  0x00007f6e0e074c53 in __libc_message (do_abort=do_abort@entry=1, fmt=fmt@entry=0x7f6e0e18d1a8 "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/posix/libc_fatal.c:175
#3  0x00007f6e0e07b468 in malloc_printerr (ptr=<optimized out>, str=0x7f6e0e1892dd "corrupted double-linked list", action=1) at malloc.c:4965
#4  malloc_consolidate (av=av@entry=0x7f6e0e3c0c00 <main_arena>) at malloc.c:4150
#5  0x00007f6e0e07da34 in _int_malloc (av=av@entry=0x7f6e0e3c0c00 <main_arena>, bytes=bytes@entry=7928) at malloc.c:3417
#6  0x00007f6e0e08050e in __GI___libc_malloc (bytes=7928) at malloc.c:2895
#7  0x00007f6e010f7c39 in ?? () from /usr/lib/nvidia-352/libGL.so.1
#8  0x00007f6dff55ab2c in ?? () from /usr/lib/nvidia-352/libnvidia-glcore.so.352.63
#9  0x00007f6dff55cecd in ?? () from /usr/lib/nvidia-352/libnvidia-glcore.so.352.63
#10 0x00007f6dff4e185d in ?? () from /usr/lib/nvidia-352/libnvidia-glcore.so.352.63
#11 0x00007f6e016b2e4f in Ogre::GLStateCacheManagerImp::deleteGLBuffer (this=<optimized out>, target=target@entry=34962, buffer=33, force=force@entry=false)
    at /home/hiradur/rigs-of-rods/source/ogre/RenderSystems/GL/src/StateCacheManager/OgreGLNullStateCacheManagerImp.cpp:177
#12 0x00007f6e016b1f5b in Ogre::GLStateCacheManager::deleteGLBuffer (this=<optimized out>, target=target@entry=34962, buffer=<optimized out>, force=force@entry=false)
    at /home/hiradur/rigs-of-rods/source/ogre/RenderSystems/GL/src/OgreGLStateCacheManager.cpp:107
#13 0x00007f6e016a5f61 in Ogre::GLHardwareVertexBuffer::~GLHardwareVertexBuffer (this=0x7f6e01927158, __in_chrg=<optimized out>)
    at /home/hiradur/rigs-of-rods/source/ogre/RenderSystems/GL/src/OgreGLHardwareVertexBuffer.cpp:61
#14 0x00007f6e016a5f99 in Ogre::GLHardwareVertexBuffer::~GLHardwareVertexBuffer (this=0x7f6e01927158, __in_chrg=<optimized out>)
    at /home/hiradur/rigs-of-rods/source/ogre/RenderSystems/GL/src/OgreGLHardwareVertexBuffer.cpp:62
#15 0x00007f6e10c7616d in Ogre::SharedPtrInfoDelete<Ogre::HardwareVertexBuffer>::~SharedPtrInfoDelete (this=<optimized out>, __in_chrg=<optimized out>)
    at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/include/OgreSharedPtr.h:78
#16 0x0000000000979b72 in Ogre::SharedPtr<Ogre::HardwareVertexBuffer>::destroy (this=0x39770d8) at /home/hiradur/rigs-of-rods/install/include/OGRE/OgreSharedPtr.h:316
#17 Ogre::SharedPtr<Ogre::HardwareVertexBuffer>::release (this=0x39770d8) at /home/hiradur/rigs-of-rods/install/include/OGRE/OgreSharedPtr.h:302
#18 Ogre::SharedPtr<Ogre::HardwareVertexBuffer>::setNull (this=0x39770d8) at /home/hiradur/rigs-of-rods/install/include/OGRE/OgreSharedPtr.h:290
#19 MyGUI::OgreVertexBuffer::destroyVertexBuffer (this=this@entry=0x3977090) at /home/hiradur/rigs-of-rods/source/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreVertexBuffer.cpp:60
#20 0x0000000000979f35 in MyGUI::OgreVertexBuffer::resizeVertexBuffer (this=this@entry=0x3977090) at /home/hiradur/rigs-of-rods/source/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreVertexBuffer.cpp:66
#21 0x0000000000979f72 in MyGUI::OgreVertexBuffer::lock (this=0x3977090) at /home/hiradur/rigs-of-rods/source/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreVertexBuffer.cpp:82
#22 0x00007f6e0fac8e02 in MyGUI::RenderItem::renderToTarget (this=0x3977010, _target=0x308cab8, _update=<optimized out>) at /home/hiradur/rigs-of-rods/source/mygui/MyGUIEngine/src/MyGUI_RenderItem.cpp:53
#23 0x00007f6e0fa84f6a in MyGUI::LayerNode::renderToTarget (this=0x3976480, _target=0x308cab8, _update=<optimized out>) at /home/hiradur/rigs-of-rods/source/mygui/MyGUIEngine/src/MyGUI_LayerNode.cpp:90
#24 0x00007f6e0fab13f6 in MyGUI::OverlappedLayer::renderToTarget (this=0x1ffed30, _target=0x308cab8, _update=false) at /home/hiradur/rigs-of-rods/source/mygui/MyGUIEngine/src/MyGUI_OverlappedLayer.cpp:154
#25 0x00007f6e0fa7db83 in MyGUI::LayerManager::renderToTarget (this=0x3093a20, _target=0x308cab8, _update=false) at /home/hiradur/rigs-of-rods/source/mygui/MyGUIEngine/src/MyGUI_LayerManager.cpp:228
#26 0x0000000000971925 in MyGUI::OgreRenderManager::renderQueueStarted (this=0x308cab0, queueGroupId=<optimized out>, invocation=..., skipThisInvocation=<optimized out>)
    at /home/hiradur/rigs-of-rods/source/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreRenderManager.cpp:231
#27 0x00007f6e10dbc525 in Ogre::SceneManager::fireRenderQueueStarted (this=<optimized out>, id=100 'd', invocation="") at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/src/OgreSceneManager.cpp:4097
#28 0x00007f6e10dbcf7f in Ogre::SceneManager::renderVisibleObjectsDefaultSequence (this=0x7f6e0236fd50) at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/src/OgreSceneManager.cpp:2339
#29 0x00007f6e10dd0756 in Ogre::SceneManager::_renderScene (this=0x7f6e0236fd50, camera=0x7f6e023797e8, vp=0x7f6e023435b8, includeOverlays=<optimized out>)
    at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/src/OgreSceneManager.cpp:1561
#30 0x00007f6e10befc31 in Ogre::Camera::_renderScene (this=0x7f6e023797e8, vp=vp@entry=0x7f6e023435b8, includeOverlays=<optimized out>) at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/src/OgreCamera.cpp:427
#31 0x00007f6e10b928e5 in Ogre::Viewport::update (this=this@entry=0x7f6e023435b8) at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/src/OgreViewport.cpp:224
#32 0x00007f6e10c60c1e in Ogre::RenderTarget::_updateViewport (this=0x7f6e0233e448, viewport=0x7f6e023435b8, updateStatistics=<optimized out>)
    at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/src/OgreRenderTarget.cpp:200
#33 0x00007f6e10c60bdb in Ogre::RenderTarget::_updateAutoUpdatedViewports (this=0x7f6e0233e448, updateStatistics=true) at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/src/OgreRenderTarget.cpp:178
#34 0x00007f6e10c606fe in Ogre::RenderTarget::updateImpl (this=0x7f6e0233e448) at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/src/OgreRenderTarget.cpp:155
#35 0x00007f6e10c61034 in Ogre::RenderTarget::update (this=0x7f6e0233e448, swap=<optimized out>) at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/src/OgreRenderTarget.cpp:613
#36 0x00007f6e10cef76f in Ogre::RenderSystem::_updateAllRenderTargets (this=0x7f6e02332fe8, swapBuffers=false) at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/src/OgreRenderSystem.cpp:126
#37 0x00007f6e10cd789a in Ogre::Root::_updateAllRenderTargets (this=this@entry=0x7f6e023294e8) at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/src/OgreRoot.cpp:1410
#38 0x00007f6e10cd7980 in Ogre::Root::renderOneFrame (this=0x7f6e023294e8) at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/src/OgreRoot.cpp:983
#39 0x000000000095f5ec in RoR::MainThread::EnterGameplayLoop (this=this@entry=0x7fff1bb82d40) at /home/hiradur/rigs-of-rods/source/rigs-of-rods-hiradur-eclipse2/source/main/main_sim/MainThread.cpp:1012
#40 0x0000000000968a1b in RoR::MainThread::Go (this=this@entry=0x7fff1bb82d40) at /home/hiradur/rigs-of-rods/source/rigs-of-rods-hiradur-eclipse2/source/main/main_sim/MainThread.cpp:536
#41 0x000000000096ae1f in main (argc=<optimized out>, argv=<optimized out>) at /home/hiradur/rigs-of-rods/source/rigs-of-rods-hiradur-eclipse2/source/main/main_sim/main.cpp:330

full bt at: http://pastebin.com/XDtK8gcD

Contributor

Hiradur commented Nov 23, 2015

tritonas00 and I pinned down the problem:

players X and Y.

  • X spawns one vehicle, Y spawns the same vehicle (with the same 3d model) after that -> crash for X
    • X will always crash when trying to login again if Y doesn't remove his vehicle (!)
  • X is online but spawns no vehicle and Y spawns the same vehicle twice -> crash for player X
  • Y has the same vehicle spawned twice already when X logs in -> crash for X immediately after entering the game.

EDIT: For some reason it's now enough when another player spawns any vehicle. Not sure why it wasn't this way in the testing session where above instructions come from, no code changed between sessions.

last line from RoR:

*** Error in `./RoR': corrupted double-linked list: 0x000000001612c480 ***

gdb:

(gdb) bt
#0  0x00007f6e0e031267 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55
#1  0x00007f6e0e032eca in __GI_abort () at abort.c:89
#2  0x00007f6e0e074c53 in __libc_message (do_abort=do_abort@entry=1, fmt=fmt@entry=0x7f6e0e18d1a8 "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/posix/libc_fatal.c:175
#3  0x00007f6e0e07b468 in malloc_printerr (ptr=<optimized out>, str=0x7f6e0e1892dd "corrupted double-linked list", action=1) at malloc.c:4965
#4  malloc_consolidate (av=av@entry=0x7f6e0e3c0c00 <main_arena>) at malloc.c:4150
#5  0x00007f6e0e07da34 in _int_malloc (av=av@entry=0x7f6e0e3c0c00 <main_arena>, bytes=bytes@entry=7928) at malloc.c:3417
#6  0x00007f6e0e08050e in __GI___libc_malloc (bytes=7928) at malloc.c:2895
#7  0x00007f6e010f7c39 in ?? () from /usr/lib/nvidia-352/libGL.so.1
#8  0x00007f6dff55ab2c in ?? () from /usr/lib/nvidia-352/libnvidia-glcore.so.352.63
#9  0x00007f6dff55cecd in ?? () from /usr/lib/nvidia-352/libnvidia-glcore.so.352.63
#10 0x00007f6dff4e185d in ?? () from /usr/lib/nvidia-352/libnvidia-glcore.so.352.63
#11 0x00007f6e016b2e4f in Ogre::GLStateCacheManagerImp::deleteGLBuffer (this=<optimized out>, target=target@entry=34962, buffer=33, force=force@entry=false)
    at /home/hiradur/rigs-of-rods/source/ogre/RenderSystems/GL/src/StateCacheManager/OgreGLNullStateCacheManagerImp.cpp:177
#12 0x00007f6e016b1f5b in Ogre::GLStateCacheManager::deleteGLBuffer (this=<optimized out>, target=target@entry=34962, buffer=<optimized out>, force=force@entry=false)
    at /home/hiradur/rigs-of-rods/source/ogre/RenderSystems/GL/src/OgreGLStateCacheManager.cpp:107
#13 0x00007f6e016a5f61 in Ogre::GLHardwareVertexBuffer::~GLHardwareVertexBuffer (this=0x7f6e01927158, __in_chrg=<optimized out>)
    at /home/hiradur/rigs-of-rods/source/ogre/RenderSystems/GL/src/OgreGLHardwareVertexBuffer.cpp:61
#14 0x00007f6e016a5f99 in Ogre::GLHardwareVertexBuffer::~GLHardwareVertexBuffer (this=0x7f6e01927158, __in_chrg=<optimized out>)
    at /home/hiradur/rigs-of-rods/source/ogre/RenderSystems/GL/src/OgreGLHardwareVertexBuffer.cpp:62
#15 0x00007f6e10c7616d in Ogre::SharedPtrInfoDelete<Ogre::HardwareVertexBuffer>::~SharedPtrInfoDelete (this=<optimized out>, __in_chrg=<optimized out>)
    at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/include/OgreSharedPtr.h:78
#16 0x0000000000979b72 in Ogre::SharedPtr<Ogre::HardwareVertexBuffer>::destroy (this=0x39770d8) at /home/hiradur/rigs-of-rods/install/include/OGRE/OgreSharedPtr.h:316
#17 Ogre::SharedPtr<Ogre::HardwareVertexBuffer>::release (this=0x39770d8) at /home/hiradur/rigs-of-rods/install/include/OGRE/OgreSharedPtr.h:302
#18 Ogre::SharedPtr<Ogre::HardwareVertexBuffer>::setNull (this=0x39770d8) at /home/hiradur/rigs-of-rods/install/include/OGRE/OgreSharedPtr.h:290
#19 MyGUI::OgreVertexBuffer::destroyVertexBuffer (this=this@entry=0x3977090) at /home/hiradur/rigs-of-rods/source/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreVertexBuffer.cpp:60
#20 0x0000000000979f35 in MyGUI::OgreVertexBuffer::resizeVertexBuffer (this=this@entry=0x3977090) at /home/hiradur/rigs-of-rods/source/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreVertexBuffer.cpp:66
#21 0x0000000000979f72 in MyGUI::OgreVertexBuffer::lock (this=0x3977090) at /home/hiradur/rigs-of-rods/source/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreVertexBuffer.cpp:82
#22 0x00007f6e0fac8e02 in MyGUI::RenderItem::renderToTarget (this=0x3977010, _target=0x308cab8, _update=<optimized out>) at /home/hiradur/rigs-of-rods/source/mygui/MyGUIEngine/src/MyGUI_RenderItem.cpp:53
#23 0x00007f6e0fa84f6a in MyGUI::LayerNode::renderToTarget (this=0x3976480, _target=0x308cab8, _update=<optimized out>) at /home/hiradur/rigs-of-rods/source/mygui/MyGUIEngine/src/MyGUI_LayerNode.cpp:90
#24 0x00007f6e0fab13f6 in MyGUI::OverlappedLayer::renderToTarget (this=0x1ffed30, _target=0x308cab8, _update=false) at /home/hiradur/rigs-of-rods/source/mygui/MyGUIEngine/src/MyGUI_OverlappedLayer.cpp:154
#25 0x00007f6e0fa7db83 in MyGUI::LayerManager::renderToTarget (this=0x3093a20, _target=0x308cab8, _update=false) at /home/hiradur/rigs-of-rods/source/mygui/MyGUIEngine/src/MyGUI_LayerManager.cpp:228
#26 0x0000000000971925 in MyGUI::OgreRenderManager::renderQueueStarted (this=0x308cab0, queueGroupId=<optimized out>, invocation=..., skipThisInvocation=<optimized out>)
    at /home/hiradur/rigs-of-rods/source/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreRenderManager.cpp:231
#27 0x00007f6e10dbc525 in Ogre::SceneManager::fireRenderQueueStarted (this=<optimized out>, id=100 'd', invocation="") at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/src/OgreSceneManager.cpp:4097
#28 0x00007f6e10dbcf7f in Ogre::SceneManager::renderVisibleObjectsDefaultSequence (this=0x7f6e0236fd50) at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/src/OgreSceneManager.cpp:2339
#29 0x00007f6e10dd0756 in Ogre::SceneManager::_renderScene (this=0x7f6e0236fd50, camera=0x7f6e023797e8, vp=0x7f6e023435b8, includeOverlays=<optimized out>)
    at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/src/OgreSceneManager.cpp:1561
#30 0x00007f6e10befc31 in Ogre::Camera::_renderScene (this=0x7f6e023797e8, vp=vp@entry=0x7f6e023435b8, includeOverlays=<optimized out>) at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/src/OgreCamera.cpp:427
#31 0x00007f6e10b928e5 in Ogre::Viewport::update (this=this@entry=0x7f6e023435b8) at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/src/OgreViewport.cpp:224
#32 0x00007f6e10c60c1e in Ogre::RenderTarget::_updateViewport (this=0x7f6e0233e448, viewport=0x7f6e023435b8, updateStatistics=<optimized out>)
    at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/src/OgreRenderTarget.cpp:200
#33 0x00007f6e10c60bdb in Ogre::RenderTarget::_updateAutoUpdatedViewports (this=0x7f6e0233e448, updateStatistics=true) at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/src/OgreRenderTarget.cpp:178
#34 0x00007f6e10c606fe in Ogre::RenderTarget::updateImpl (this=0x7f6e0233e448) at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/src/OgreRenderTarget.cpp:155
#35 0x00007f6e10c61034 in Ogre::RenderTarget::update (this=0x7f6e0233e448, swap=<optimized out>) at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/src/OgreRenderTarget.cpp:613
#36 0x00007f6e10cef76f in Ogre::RenderSystem::_updateAllRenderTargets (this=0x7f6e02332fe8, swapBuffers=false) at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/src/OgreRenderSystem.cpp:126
#37 0x00007f6e10cd789a in Ogre::Root::_updateAllRenderTargets (this=this@entry=0x7f6e023294e8) at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/src/OgreRoot.cpp:1410
#38 0x00007f6e10cd7980 in Ogre::Root::renderOneFrame (this=0x7f6e023294e8) at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/src/OgreRoot.cpp:983
#39 0x000000000095f5ec in RoR::MainThread::EnterGameplayLoop (this=this@entry=0x7fff1bb82d40) at /home/hiradur/rigs-of-rods/source/rigs-of-rods-hiradur-eclipse2/source/main/main_sim/MainThread.cpp:1012
#40 0x0000000000968a1b in RoR::MainThread::Go (this=this@entry=0x7fff1bb82d40) at /home/hiradur/rigs-of-rods/source/rigs-of-rods-hiradur-eclipse2/source/main/main_sim/MainThread.cpp:536
#41 0x000000000096ae1f in main (argc=<optimized out>, argv=<optimized out>) at /home/hiradur/rigs-of-rods/source/rigs-of-rods-hiradur-eclipse2/source/main/main_sim/main.cpp:330

full bt at: http://pastebin.com/XDtK8gcD

@Hiradur Hiradur added this to the 0.4.6.0 milestone Nov 23, 2015

@Hiradur Hiradur changed the title from Random crashes in multiplayer (Linux) to Random crashes in multiplayer Nov 23, 2015

@Hiradur

This comment has been minimized.

Show comment
Hide comment
@Hiradur

Hiradur Nov 23, 2015

Contributor

Windows with D3D9 is also affected.

Contributor

Hiradur commented Nov 23, 2015

Windows with D3D9 is also affected.

@tritonas00

This comment has been minimized.

Show comment
Hide comment
@tritonas00

tritonas00 Nov 25, 2015

Collaborator

The vehicle doesn't have to be spawned twice, only once can trigger the crash.

Collaborator

tritonas00 commented Nov 25, 2015

The vehicle doesn't have to be spawned twice, only once can trigger the crash.

@Hiradur

This comment has been minimized.

Show comment
Hide comment
@Hiradur

Hiradur Nov 30, 2015

Contributor

bt with MALLOC_CHECK_ env var set to 2:

#0  0x00007ffff45c6267 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55
#1  0x00007ffff45c7eca in __GI_abort () at abort.c:89
#2  0x00007ffff4610ed1 in malloc_printerr (ptr=<optimized out>, str=<optimized out>, action=<optimized out>) at malloc.c:4969
#3  free_check (mem=0x642, caller=0x642) at hooks.c:298
#4  0x00007ffff4615947 in __GI___libc_free (mem=<optimized out>) at malloc.c:2924
#5  0x00007ffff60c0876 in __gnu_cxx::new_allocator<MyGUI::CharInfo>::deallocate (this=<optimized out>, __p=<optimized out>) at /usr/include/c++/5/ext/new_allocator.h:110
#6  __gnu_cxx::__alloc_traits<std::allocator<MyGUI::CharInfo> >::deallocate (__a=..., __n=<optimized out>, __p=<optimized out>) at /usr/include/c++/5/ext/alloc_traits.h:185
#7  std::_Vector_base<MyGUI::CharInfo, std::allocator<MyGUI::CharInfo> >::_M_deallocate (__n=<optimized out>, __p=<optimized out>, this=<optimized out>)
    at /usr/include/c++/5/bits/stl_vector.h:178
#8  std::_Vector_base<MyGUI::CharInfo, std::allocator<MyGUI::CharInfo> >::~_Vector_base (this=<optimized out>, __in_chrg=<optimized out>)
    at /usr/include/c++/5/bits/stl_vector.h:160
#9  std::vector<MyGUI::CharInfo, std::allocator<MyGUI::CharInfo> >::~vector (this=<optimized out>, __in_chrg=<optimized out>) at /usr/include/c++/5/bits/stl_vector.h:425
#10 MyGUI::LineInfo::~LineInfo (this=<optimized out>, __in_chrg=<optimized out>) at /home/hiradur/rigs-of-rods/source/mygui/MyGUIEngine/include/MyGUI_TextViewData.h:114
#11 std::_Destroy<MyGUI::LineInfo> (__pointer=<optimized out>) at /usr/include/c++/5/bits/stl_construct.h:93
#12 std::_Destroy_aux<false>::__destroy<MyGUI::LineInfo*> (__last=<optimized out>, __first=0x86a1640) at /usr/include/c++/5/bits/stl_construct.h:103
#13 std::_Destroy<MyGUI::LineInfo*> (__last=<optimized out>, __first=<optimized out>) at /usr/include/c++/5/bits/stl_construct.h:126
#14 std::_Destroy<MyGUI::LineInfo*, MyGUI::LineInfo> (__last=0x86a1668, __first=0x86a1640) at /usr/include/c++/5/bits/stl_construct.h:151
#15 std::vector<MyGUI::LineInfo, std::allocator<MyGUI::LineInfo> >::_M_erase_at_end (this=0x9a4d908, __pos=0x86a1640) at /usr/include/c++/5/bits/stl_vector.h:1438
#16 std::vector<MyGUI::LineInfo, std::allocator<MyGUI::LineInfo> >::clear (this=0x9a4d908) at /usr/include/c++/5/bits/stl_vector.h:1212
#17 MyGUI::TextView::update (this=0x9a4d8f8, _text=..., _font=0x953f6f0, _height=19, _align=..., _format=..., _maxWidth=-1)
    at /home/hiradur/rigs-of-rods/source/mygui/MyGUIEngine/src/MyGUI_TextView.cpp:120
#18 0x00007ffff5fe1786 in MyGUI::EditText::updateRawData (this=<optimized out>) at /home/hiradur/rigs-of-rods/source/mygui/MyGUIEngine/src/MyGUI_EditText.cpp:524
#19 0x00007ffff60a3fe4 in MyGUI::SimpleText::doRender (this=0x9a4d7c0) at /home/hiradur/rigs-of-rods/source/mygui/MyGUIEngine/src/MyGUI_SimpleText.cpp:44
#20 0x00007ffff605de32 in MyGUI::RenderItem::renderToTarget (this=0x9a63360, _target=0x15755a0, _update=<optimized out>)
    at /home/hiradur/rigs-of-rods/source/mygui/MyGUIEngine/src/MyGUI_RenderItem.cpp:62
#21 0x00007ffff6019f92 in MyGUI::LayerNode::renderToTarget (this=0x9a60a80, _target=0x15755a0, _update=<optimized out>)
    at /home/hiradur/rigs-of-rods/source/mygui/MyGUIEngine/src/MyGUI_LayerNode.cpp:93
#22 0x00000000006952e1 in MyGUI::RTTLayer::renderToTarget (this=0x13c93e0, _target=<optimized out>, _update=false)
    at /home/hiradur/rigs-of-rods/source/rigs-of-rods-hiradur-eclipse2/source/main/gui/RTTLayer.cpp:57
#23 0x00007ffff6012b83 in MyGUI::LayerManager::renderToTarget (this=0x13440c0, _target=0x1345c98, _update=false)
    at /home/hiradur/rigs-of-rods/source/mygui/MyGUIEngine/src/MyGUI_LayerManager.cpp:228
#24 0x00000000009731e5 in MyGUI::OgreRenderManager::renderQueueStarted (this=0x1345c90, queueGroupId=<optimized out>, invocation=..., skipThisInvocation=<optimized out>)
    at /home/hiradur/rigs-of-rods/source/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreRenderManager.cpp:231
#25 0x00007ffff7559525 in Ogre::SceneManager::fireRenderQueueStarted (this=<optimized out>, id=100 'd', invocation="")
    at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/src/OgreSceneManager.cpp:4097
#26 0x00007ffff7559f7f in Ogre::SceneManager::renderVisibleObjectsDefaultSequence (this=0x7fffe89c4d50)
    at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/src/OgreSceneManager.cpp:2339
#27 0x00007ffff756d756 in Ogre::SceneManager::_renderScene (this=0x7fffe89c4d50, camera=0x7fffe89ce7e8, vp=0x7fffe89985b8, includeOverlays=<optimized out>)
    at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/src/OgreSceneManager.cpp:1561
#28 0x00007ffff738cc31 in Ogre::Camera::_renderScene (this=0x7fffe89ce7e8, vp=vp@entry=0x7fffe89985b8, includeOverlays=<optimized out>)
    at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/src/OgreCamera.cpp:427
#29 0x00007ffff732f8e5 in Ogre::Viewport::update (this=this@entry=0x7fffe89985b8) at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/src/OgreViewport.cpp:224
#30 0x00007ffff73fdc1e in Ogre::RenderTarget::_updateViewport (this=0x7fffe8993448, viewport=0x7fffe89985b8, updateStatistics=<optimized out>)
    at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/src/OgreRenderTarget.cpp:200
#31 0x00007ffff73fdbdb in Ogre::RenderTarget::_updateAutoUpdatedViewports (this=0x7fffe8993448, updateStatistics=true)
    at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/src/OgreRenderTarget.cpp:178
#32 0x00007ffff73fd6fe in Ogre::RenderTarget::updateImpl (this=0x7fffe8993448) at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/src/OgreRenderTarget.cpp:155
#33 0x00007ffff73fe034 in Ogre::RenderTarget::update (this=0x7fffe8993448, swap=<optimized out>)
    at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/src/OgreRenderTarget.cpp:613
#34 0x00007ffff748c76f in Ogre::RenderSystem::_updateAllRenderTargets (this=0x7fffe8987fe8, swapBuffers=false)
    at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/src/OgreRenderSystem.cpp:126
#35 0x00007ffff747489a in Ogre::Root::_updateAllRenderTargets (this=this@entry=0x7fffe897e4e8) at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/src/OgreRoot.cpp:1410
#36 0x00007ffff7474980 in Ogre::Root::renderOneFrame (this=0x7fffe897e4e8) at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/src/OgreRoot.cpp:983
#37 0x0000000000960d0a in RoR::MainThread::EnterGameplayLoop (this=this@entry=0x7fffffffdcc0)
    at /home/hiradur/rigs-of-rods/source/rigs-of-rods-hiradur-eclipse2/source/main/main_sim/MainThread.cpp:1020
#38 0x000000000096a2cd in RoR::MainThread::Go (this=this@entry=0x7fffffffdcc0)
    at /home/hiradur/rigs-of-rods/source/rigs-of-rods-hiradur-eclipse2/source/main/main_sim/MainThread.cpp:544
#39 0x000000000096c6e5 in main (argc=<optimized out>, argv=<optimized out>)
    at /home/hiradur/rigs-of-rods/source/rigs-of-rods-hiradur-eclipse2/source/main/main_sim/main.cpp:330

The crash may have been introduced by the GUI overhaul.

Contributor

Hiradur commented Nov 30, 2015

bt with MALLOC_CHECK_ env var set to 2:

#0  0x00007ffff45c6267 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55
#1  0x00007ffff45c7eca in __GI_abort () at abort.c:89
#2  0x00007ffff4610ed1 in malloc_printerr (ptr=<optimized out>, str=<optimized out>, action=<optimized out>) at malloc.c:4969
#3  free_check (mem=0x642, caller=0x642) at hooks.c:298
#4  0x00007ffff4615947 in __GI___libc_free (mem=<optimized out>) at malloc.c:2924
#5  0x00007ffff60c0876 in __gnu_cxx::new_allocator<MyGUI::CharInfo>::deallocate (this=<optimized out>, __p=<optimized out>) at /usr/include/c++/5/ext/new_allocator.h:110
#6  __gnu_cxx::__alloc_traits<std::allocator<MyGUI::CharInfo> >::deallocate (__a=..., __n=<optimized out>, __p=<optimized out>) at /usr/include/c++/5/ext/alloc_traits.h:185
#7  std::_Vector_base<MyGUI::CharInfo, std::allocator<MyGUI::CharInfo> >::_M_deallocate (__n=<optimized out>, __p=<optimized out>, this=<optimized out>)
    at /usr/include/c++/5/bits/stl_vector.h:178
#8  std::_Vector_base<MyGUI::CharInfo, std::allocator<MyGUI::CharInfo> >::~_Vector_base (this=<optimized out>, __in_chrg=<optimized out>)
    at /usr/include/c++/5/bits/stl_vector.h:160
#9  std::vector<MyGUI::CharInfo, std::allocator<MyGUI::CharInfo> >::~vector (this=<optimized out>, __in_chrg=<optimized out>) at /usr/include/c++/5/bits/stl_vector.h:425
#10 MyGUI::LineInfo::~LineInfo (this=<optimized out>, __in_chrg=<optimized out>) at /home/hiradur/rigs-of-rods/source/mygui/MyGUIEngine/include/MyGUI_TextViewData.h:114
#11 std::_Destroy<MyGUI::LineInfo> (__pointer=<optimized out>) at /usr/include/c++/5/bits/stl_construct.h:93
#12 std::_Destroy_aux<false>::__destroy<MyGUI::LineInfo*> (__last=<optimized out>, __first=0x86a1640) at /usr/include/c++/5/bits/stl_construct.h:103
#13 std::_Destroy<MyGUI::LineInfo*> (__last=<optimized out>, __first=<optimized out>) at /usr/include/c++/5/bits/stl_construct.h:126
#14 std::_Destroy<MyGUI::LineInfo*, MyGUI::LineInfo> (__last=0x86a1668, __first=0x86a1640) at /usr/include/c++/5/bits/stl_construct.h:151
#15 std::vector<MyGUI::LineInfo, std::allocator<MyGUI::LineInfo> >::_M_erase_at_end (this=0x9a4d908, __pos=0x86a1640) at /usr/include/c++/5/bits/stl_vector.h:1438
#16 std::vector<MyGUI::LineInfo, std::allocator<MyGUI::LineInfo> >::clear (this=0x9a4d908) at /usr/include/c++/5/bits/stl_vector.h:1212
#17 MyGUI::TextView::update (this=0x9a4d8f8, _text=..., _font=0x953f6f0, _height=19, _align=..., _format=..., _maxWidth=-1)
    at /home/hiradur/rigs-of-rods/source/mygui/MyGUIEngine/src/MyGUI_TextView.cpp:120
#18 0x00007ffff5fe1786 in MyGUI::EditText::updateRawData (this=<optimized out>) at /home/hiradur/rigs-of-rods/source/mygui/MyGUIEngine/src/MyGUI_EditText.cpp:524
#19 0x00007ffff60a3fe4 in MyGUI::SimpleText::doRender (this=0x9a4d7c0) at /home/hiradur/rigs-of-rods/source/mygui/MyGUIEngine/src/MyGUI_SimpleText.cpp:44
#20 0x00007ffff605de32 in MyGUI::RenderItem::renderToTarget (this=0x9a63360, _target=0x15755a0, _update=<optimized out>)
    at /home/hiradur/rigs-of-rods/source/mygui/MyGUIEngine/src/MyGUI_RenderItem.cpp:62
#21 0x00007ffff6019f92 in MyGUI::LayerNode::renderToTarget (this=0x9a60a80, _target=0x15755a0, _update=<optimized out>)
    at /home/hiradur/rigs-of-rods/source/mygui/MyGUIEngine/src/MyGUI_LayerNode.cpp:93
#22 0x00000000006952e1 in MyGUI::RTTLayer::renderToTarget (this=0x13c93e0, _target=<optimized out>, _update=false)
    at /home/hiradur/rigs-of-rods/source/rigs-of-rods-hiradur-eclipse2/source/main/gui/RTTLayer.cpp:57
#23 0x00007ffff6012b83 in MyGUI::LayerManager::renderToTarget (this=0x13440c0, _target=0x1345c98, _update=false)
    at /home/hiradur/rigs-of-rods/source/mygui/MyGUIEngine/src/MyGUI_LayerManager.cpp:228
#24 0x00000000009731e5 in MyGUI::OgreRenderManager::renderQueueStarted (this=0x1345c90, queueGroupId=<optimized out>, invocation=..., skipThisInvocation=<optimized out>)
    at /home/hiradur/rigs-of-rods/source/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreRenderManager.cpp:231
#25 0x00007ffff7559525 in Ogre::SceneManager::fireRenderQueueStarted (this=<optimized out>, id=100 'd', invocation="")
    at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/src/OgreSceneManager.cpp:4097
#26 0x00007ffff7559f7f in Ogre::SceneManager::renderVisibleObjectsDefaultSequence (this=0x7fffe89c4d50)
    at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/src/OgreSceneManager.cpp:2339
#27 0x00007ffff756d756 in Ogre::SceneManager::_renderScene (this=0x7fffe89c4d50, camera=0x7fffe89ce7e8, vp=0x7fffe89985b8, includeOverlays=<optimized out>)
    at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/src/OgreSceneManager.cpp:1561
#28 0x00007ffff738cc31 in Ogre::Camera::_renderScene (this=0x7fffe89ce7e8, vp=vp@entry=0x7fffe89985b8, includeOverlays=<optimized out>)
    at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/src/OgreCamera.cpp:427
#29 0x00007ffff732f8e5 in Ogre::Viewport::update (this=this@entry=0x7fffe89985b8) at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/src/OgreViewport.cpp:224
#30 0x00007ffff73fdc1e in Ogre::RenderTarget::_updateViewport (this=0x7fffe8993448, viewport=0x7fffe89985b8, updateStatistics=<optimized out>)
    at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/src/OgreRenderTarget.cpp:200
#31 0x00007ffff73fdbdb in Ogre::RenderTarget::_updateAutoUpdatedViewports (this=0x7fffe8993448, updateStatistics=true)
    at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/src/OgreRenderTarget.cpp:178
#32 0x00007ffff73fd6fe in Ogre::RenderTarget::updateImpl (this=0x7fffe8993448) at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/src/OgreRenderTarget.cpp:155
#33 0x00007ffff73fe034 in Ogre::RenderTarget::update (this=0x7fffe8993448, swap=<optimized out>)
    at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/src/OgreRenderTarget.cpp:613
#34 0x00007ffff748c76f in Ogre::RenderSystem::_updateAllRenderTargets (this=0x7fffe8987fe8, swapBuffers=false)
    at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/src/OgreRenderSystem.cpp:126
#35 0x00007ffff747489a in Ogre::Root::_updateAllRenderTargets (this=this@entry=0x7fffe897e4e8) at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/src/OgreRoot.cpp:1410
#36 0x00007ffff7474980 in Ogre::Root::renderOneFrame (this=0x7fffe897e4e8) at /home/hiradur/rigs-of-rods/source/ogre/OgreMain/src/OgreRoot.cpp:983
#37 0x0000000000960d0a in RoR::MainThread::EnterGameplayLoop (this=this@entry=0x7fffffffdcc0)
    at /home/hiradur/rigs-of-rods/source/rigs-of-rods-hiradur-eclipse2/source/main/main_sim/MainThread.cpp:1020
#38 0x000000000096a2cd in RoR::MainThread::Go (this=this@entry=0x7fffffffdcc0)
    at /home/hiradur/rigs-of-rods/source/rigs-of-rods-hiradur-eclipse2/source/main/main_sim/MainThread.cpp:544
#39 0x000000000096c6e5 in main (argc=<optimized out>, argv=<optimized out>)
    at /home/hiradur/rigs-of-rods/source/rigs-of-rods-hiradur-eclipse2/source/main/main_sim/main.cpp:330

The crash may have been introduced by the GUI overhaul.

@Hiradur

This comment has been minimized.

Show comment
Hide comment
@Hiradur

Hiradur Nov 30, 2015

Contributor

RoR run in Valgrind doesn't crash but shows this error directly after the vehicle is loaded:

 ===== DONE LOADING VEHICLE
adding remote stream: 582:12
Texture: arrow_down.png: Loading 1 faces(PF_A8R8G8B8,16x16x1) Internal format is PF_A8R8G8B8,16x16x1.
==2469== Invalid read of size 8
==2469==    at 0x7B299A: Beam::setCustomLightVisible(int, bool) (Beam.cpp:6730)
==2469==    by 0x7C22C0: Beam::calcNetwork() (Beam.cpp:745)
==2469==    by 0x7F9141: BeamFactory::calcPhysics(float) (BeamFactory.cpp:879)
==2469==    by 0x57ED3A: RoRFrameListener::frameStarted(Ogre::FrameEvent const&) (RoRFrameListener.cpp:1414)
==2469==    by 0x563D273: Ogre::Root::_fireFrameStarted(Ogre::FrameEvent&) (OgreRoot.cpp:833)
==2469==    by 0x563D800: Ogre::Root::_fireFrameStarted() (OgreRoot.cpp:888)
==2469==    by 0x563D968: Ogre::Root::renderOneFrame() (OgreRoot.cpp:980)
==2469==    by 0x960D09: RoR::MainThread::EnterGameplayLoop() (MainThread.cpp:1020)
==2469==    by 0x96A2CC: RoR::MainThread::Go() (MainThread.cpp:544)
==2469==    by 0x96C6E4: main (main.cpp:330)
==2469==  Address 0x5e638fa8 is 17 bytes after a block of size 65,559 alloc'd
==2469==    at 0x4C2BBCF: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==2469==    by 0x160A1C38: ??? (in /usr/lib/nvidia-352/libGL.so.352.63)
==2469==    by 0x17DF0ED6: ??? (in /usr/lib/nvidia-352/libnvidia-glcore.so.352.63)
==2469==    by 0x17DDF584: ??? (in /usr/lib/nvidia-352/libnvidia-glcore.so.352.63)
==2469==    by 0x17EAD675: ??? (in /usr/lib/nvidia-352/libnvidia-glcore.so.352.63)
==2469==    by 0x17EADF28: ??? (in /usr/lib/nvidia-352/libnvidia-glcore.so.352.63)
==2469==    by 0x17B523D8: ??? (in /usr/lib/nvidia-352/libnvidia-glcore.so.352.63)
==2469==    by 0x17B5B463: ??? (in /usr/lib/nvidia-352/libnvidia-glcore.so.352.63)
==2469==    by 0x17B5F650: ??? (in /usr/lib/nvidia-352/libnvidia-glcore.so.352.63)
==2469==    by 0x17B79B56: ??? (in /usr/lib/nvidia-352/libnvidia-glcore.so.352.63)
==2469==    by 0x15B13D5C: Ogre::GLTexture::createInternalResourcesImpl() (OgreGLTexture.cpp:235)
==2469==    by 0x565052C: Ogre::Texture::createInternalResources() (OgreTexture.cpp:343)
==2469== 
==2469== Invalid write of size 1
==2469==    at 0x7B29A1: Beam::setCustomLightVisible(int, bool) (Beam.cpp:6731)
==2469==    by 0x7C22C0: Beam::calcNetwork() (Beam.cpp:745)
==2469==    by 0x7F9141: BeamFactory::calcPhysics(float) (BeamFactory.cpp:879)
==2469==    by 0x57ED3A: RoRFrameListener::frameStarted(Ogre::FrameEvent const&) (RoRFrameListener.cpp:1414)
==2469==    by 0x563D273: Ogre::Root::_fireFrameStarted(Ogre::FrameEvent&) (OgreRoot.cpp:833)
==2469==    by 0x563D800: Ogre::Root::_fireFrameStarted() (OgreRoot.cpp:888)
==2469==    by 0x563D968: Ogre::Root::renderOneFrame() (OgreRoot.cpp:980)
==2469==    by 0x960D09: RoR::MainThread::EnterGameplayLoop() (MainThread.cpp:1020)
==2469==    by 0x96A2CC: RoR::MainThread::Go() (MainThread.cpp:544)
==2469==    by 0x96C6E4: main (main.cpp:330)
==2469==  Address 0x5e638fc8 is 24 bytes before a block of size 10,240 alloc'd
==2469==    at 0x4C2C12F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==2469==    by 0x7A3C96: allocate (new_allocator.h:104)
==2469==    by 0x7A3C96: allocate (alloc_traits.h:360)
==2469==    by 0x7A3C96: _M_allocate (stl_vector.h:170)
==2469==    by 0x7A3C96: void std::vector<flare_t, std::allocator<flare_t> >::_M_emplace_back_aux<flare_t const&>(flare_t const&) (vector.tcc:412)
==2469==    by 0x78BD76: push_back (stl_vector.h:923)
==2469==    by 0x78BD76: RigSpawner::ProcessFlare2(RigDef::Flare2&) (RigSpawner.cpp:2586)
==2469==    by 0x7722E8: RigSpawner::SpawnRig() (RigSpawner_ProcessControl.cpp:222)
==2469==    by 0x7C6625: Beam::LoadTruck(RoR::RigLoadingProfiler*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Ogre::SceneNode*, Ogre::Vector3 const&, Ogre::Quaternion&, collision_box_t*, bool, int) (Beam.cpp:6393)
==2469==    by 0x7CD494: Beam::Beam(int, Ogre::Vector3, Ogre::Quaternion, char const*, RoR::RigLoadingProfiler*, bool, bool, collision_box_t*, bool, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const*, Skin*, bool, bool, int) (Beam.cpp:6140)
==2469==    by 0x7FC516: BeamFactory::createRemoteInstance(stream_reg_t*) (BeamFactory.cpp:336)
==2469==    by 0x7FCFEC: StreamableFactory<BeamFactory, Beam>::syncRemoteStreams() (StreamableFactory.h:110)
==2469==    by 0x7F9BED: BeamFactory::syncRemoteStreams() (BeamFactory.cpp:411)
==2469==    by 0x938BFF: NetworkStreamManager::syncRemoteStreams() (NetworkStreamManager.cpp:259)
==2469==    by 0x939014: NetworkStreamManager::update() (NetworkStreamManager.cpp:247)
==2469==    by 0x571FA7: RoRFrameListener::frameEnded(Ogre::FrameEvent const&) (RoRFrameListener.cpp:1510)

<repeats 4 times (4 iterations of the loop)>

==2469== Syscall param write(buf) points to uninitialised byte(s)
==2469==    at 0x83AD4FD: ??? (syscall-template.S:81)
==2469==    by 0x832FBFE: _IO_file_write@@GLIBC_2.2.5 (fileops.c:1251)
==2469==    by 0x83310E8: new_do_write (fileops.c:506)
==2469==    by 0x83310E8: _IO_do_write@@GLIBC_2.2.5 (fileops.c:482)
==2469==    by 0x832F47F: _IO_file_sync@@GLIBC_2.2.5 (fileops.c:862)
==2469==    by 0x8324C65: fflush (iofflush.c:41)
==2469==    by 0x17E19CAB: ??? (in /usr/lib/nvidia-352/libnvidia-glcore.so.352.63)
==2469==    by 0x17E1C2A6: ??? (in /usr/lib/nvidia-352/libnvidia-glcore.so.352.63)
==2469==    by 0x17E18A9B: ??? (in /usr/lib/nvidia-352/libnvidia-glcore.so.352.63)
==2469==    by 0x17E0CC0B: ??? (in /usr/lib/nvidia-352/libnvidia-glcore.so.352.63)
==2469==    by 0x17E0F1F1: ??? (in /usr/lib/nvidia-352/libnvidia-glcore.so.352.63)
==2469==    by 0x17F4848A: ??? (in /usr/lib/nvidia-352/libnvidia-glcore.so.352.63)
==2469==    by 0x17F4BDB1: ??? (in /usr/lib/nvidia-352/libnvidia-glcore.so.352.63)
==2469==  Address 0x4218405 is in a rw- anonymous segment
==2469== 

@only-a-ptr Could you take a look?

Contributor

Hiradur commented Nov 30, 2015

RoR run in Valgrind doesn't crash but shows this error directly after the vehicle is loaded:

 ===== DONE LOADING VEHICLE
adding remote stream: 582:12
Texture: arrow_down.png: Loading 1 faces(PF_A8R8G8B8,16x16x1) Internal format is PF_A8R8G8B8,16x16x1.
==2469== Invalid read of size 8
==2469==    at 0x7B299A: Beam::setCustomLightVisible(int, bool) (Beam.cpp:6730)
==2469==    by 0x7C22C0: Beam::calcNetwork() (Beam.cpp:745)
==2469==    by 0x7F9141: BeamFactory::calcPhysics(float) (BeamFactory.cpp:879)
==2469==    by 0x57ED3A: RoRFrameListener::frameStarted(Ogre::FrameEvent const&) (RoRFrameListener.cpp:1414)
==2469==    by 0x563D273: Ogre::Root::_fireFrameStarted(Ogre::FrameEvent&) (OgreRoot.cpp:833)
==2469==    by 0x563D800: Ogre::Root::_fireFrameStarted() (OgreRoot.cpp:888)
==2469==    by 0x563D968: Ogre::Root::renderOneFrame() (OgreRoot.cpp:980)
==2469==    by 0x960D09: RoR::MainThread::EnterGameplayLoop() (MainThread.cpp:1020)
==2469==    by 0x96A2CC: RoR::MainThread::Go() (MainThread.cpp:544)
==2469==    by 0x96C6E4: main (main.cpp:330)
==2469==  Address 0x5e638fa8 is 17 bytes after a block of size 65,559 alloc'd
==2469==    at 0x4C2BBCF: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==2469==    by 0x160A1C38: ??? (in /usr/lib/nvidia-352/libGL.so.352.63)
==2469==    by 0x17DF0ED6: ??? (in /usr/lib/nvidia-352/libnvidia-glcore.so.352.63)
==2469==    by 0x17DDF584: ??? (in /usr/lib/nvidia-352/libnvidia-glcore.so.352.63)
==2469==    by 0x17EAD675: ??? (in /usr/lib/nvidia-352/libnvidia-glcore.so.352.63)
==2469==    by 0x17EADF28: ??? (in /usr/lib/nvidia-352/libnvidia-glcore.so.352.63)
==2469==    by 0x17B523D8: ??? (in /usr/lib/nvidia-352/libnvidia-glcore.so.352.63)
==2469==    by 0x17B5B463: ??? (in /usr/lib/nvidia-352/libnvidia-glcore.so.352.63)
==2469==    by 0x17B5F650: ??? (in /usr/lib/nvidia-352/libnvidia-glcore.so.352.63)
==2469==    by 0x17B79B56: ??? (in /usr/lib/nvidia-352/libnvidia-glcore.so.352.63)
==2469==    by 0x15B13D5C: Ogre::GLTexture::createInternalResourcesImpl() (OgreGLTexture.cpp:235)
==2469==    by 0x565052C: Ogre::Texture::createInternalResources() (OgreTexture.cpp:343)
==2469== 
==2469== Invalid write of size 1
==2469==    at 0x7B29A1: Beam::setCustomLightVisible(int, bool) (Beam.cpp:6731)
==2469==    by 0x7C22C0: Beam::calcNetwork() (Beam.cpp:745)
==2469==    by 0x7F9141: BeamFactory::calcPhysics(float) (BeamFactory.cpp:879)
==2469==    by 0x57ED3A: RoRFrameListener::frameStarted(Ogre::FrameEvent const&) (RoRFrameListener.cpp:1414)
==2469==    by 0x563D273: Ogre::Root::_fireFrameStarted(Ogre::FrameEvent&) (OgreRoot.cpp:833)
==2469==    by 0x563D800: Ogre::Root::_fireFrameStarted() (OgreRoot.cpp:888)
==2469==    by 0x563D968: Ogre::Root::renderOneFrame() (OgreRoot.cpp:980)
==2469==    by 0x960D09: RoR::MainThread::EnterGameplayLoop() (MainThread.cpp:1020)
==2469==    by 0x96A2CC: RoR::MainThread::Go() (MainThread.cpp:544)
==2469==    by 0x96C6E4: main (main.cpp:330)
==2469==  Address 0x5e638fc8 is 24 bytes before a block of size 10,240 alloc'd
==2469==    at 0x4C2C12F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==2469==    by 0x7A3C96: allocate (new_allocator.h:104)
==2469==    by 0x7A3C96: allocate (alloc_traits.h:360)
==2469==    by 0x7A3C96: _M_allocate (stl_vector.h:170)
==2469==    by 0x7A3C96: void std::vector<flare_t, std::allocator<flare_t> >::_M_emplace_back_aux<flare_t const&>(flare_t const&) (vector.tcc:412)
==2469==    by 0x78BD76: push_back (stl_vector.h:923)
==2469==    by 0x78BD76: RigSpawner::ProcessFlare2(RigDef::Flare2&) (RigSpawner.cpp:2586)
==2469==    by 0x7722E8: RigSpawner::SpawnRig() (RigSpawner_ProcessControl.cpp:222)
==2469==    by 0x7C6625: Beam::LoadTruck(RoR::RigLoadingProfiler*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Ogre::SceneNode*, Ogre::Vector3 const&, Ogre::Quaternion&, collision_box_t*, bool, int) (Beam.cpp:6393)
==2469==    by 0x7CD494: Beam::Beam(int, Ogre::Vector3, Ogre::Quaternion, char const*, RoR::RigLoadingProfiler*, bool, bool, collision_box_t*, bool, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const*, Skin*, bool, bool, int) (Beam.cpp:6140)
==2469==    by 0x7FC516: BeamFactory::createRemoteInstance(stream_reg_t*) (BeamFactory.cpp:336)
==2469==    by 0x7FCFEC: StreamableFactory<BeamFactory, Beam>::syncRemoteStreams() (StreamableFactory.h:110)
==2469==    by 0x7F9BED: BeamFactory::syncRemoteStreams() (BeamFactory.cpp:411)
==2469==    by 0x938BFF: NetworkStreamManager::syncRemoteStreams() (NetworkStreamManager.cpp:259)
==2469==    by 0x939014: NetworkStreamManager::update() (NetworkStreamManager.cpp:247)
==2469==    by 0x571FA7: RoRFrameListener::frameEnded(Ogre::FrameEvent const&) (RoRFrameListener.cpp:1510)

<repeats 4 times (4 iterations of the loop)>

==2469== Syscall param write(buf) points to uninitialised byte(s)
==2469==    at 0x83AD4FD: ??? (syscall-template.S:81)
==2469==    by 0x832FBFE: _IO_file_write@@GLIBC_2.2.5 (fileops.c:1251)
==2469==    by 0x83310E8: new_do_write (fileops.c:506)
==2469==    by 0x83310E8: _IO_do_write@@GLIBC_2.2.5 (fileops.c:482)
==2469==    by 0x832F47F: _IO_file_sync@@GLIBC_2.2.5 (fileops.c:862)
==2469==    by 0x8324C65: fflush (iofflush.c:41)
==2469==    by 0x17E19CAB: ??? (in /usr/lib/nvidia-352/libnvidia-glcore.so.352.63)
==2469==    by 0x17E1C2A6: ??? (in /usr/lib/nvidia-352/libnvidia-glcore.so.352.63)
==2469==    by 0x17E18A9B: ??? (in /usr/lib/nvidia-352/libnvidia-glcore.so.352.63)
==2469==    by 0x17E0CC0B: ??? (in /usr/lib/nvidia-352/libnvidia-glcore.so.352.63)
==2469==    by 0x17E0F1F1: ??? (in /usr/lib/nvidia-352/libnvidia-glcore.so.352.63)
==2469==    by 0x17F4848A: ??? (in /usr/lib/nvidia-352/libnvidia-glcore.so.352.63)
==2469==    by 0x17F4BDB1: ??? (in /usr/lib/nvidia-352/libnvidia-glcore.so.352.63)
==2469==  Address 0x4218405 is in a rw- anonymous segment
==2469== 

@only-a-ptr Could you take a look?

@Hiradur Hiradur changed the title from Random crashes in multiplayer to Crash in MP when another player spawns a vehicle Dec 1, 2015

@only-a-ptr

This comment has been minimized.

Show comment
Hide comment
@only-a-ptr

only-a-ptr Dec 1, 2015

Member

@tritonas00 @Hiradur Thank you both very much for the investigation.

I can't promise any quick help - I'll be busy till christmas and I'm not familiar with the networking code at all.

Anyway, did you both try only with OGRE 1.9? Did you try with RoRdeps-26-Ogre1.8.1? I need to know when and what introduced this issue. I suspect it's something related to either OGRE's resource handling or Mesh/Entity/SceneNode manipulation.

Member

only-a-ptr commented Dec 1, 2015

@tritonas00 @Hiradur Thank you both very much for the investigation.

I can't promise any quick help - I'll be busy till christmas and I'm not familiar with the networking code at all.

Anyway, did you both try only with OGRE 1.9? Did you try with RoRdeps-26-Ogre1.8.1? I need to know when and what introduced this issue. I suspect it's something related to either OGRE's resource handling or Mesh/Entity/SceneNode manipulation.

@Hiradur

This comment has been minimized.

Show comment
Hide comment
@Hiradur

Hiradur Dec 1, 2015

Contributor

@only-a-ptr I also tried with the 0.4.5.1 Windows release build (Ogre 1.8) and Direct3D 9 renderer and it also crashes.

Contributor

Hiradur commented Dec 1, 2015

@only-a-ptr I also tried with the 0.4.5.1 Windows release build (Ogre 1.8) and Direct3D 9 renderer and it also crashes.

@only-a-ptr

This comment has been minimized.

Show comment
Hide comment
@only-a-ptr
Member

only-a-ptr commented Dec 1, 2015

@Hiradur Thanks!

@only-a-ptr

This comment has been minimized.

Show comment
Hide comment
@only-a-ptr

only-a-ptr Dec 9, 2015

Member

I failed to reproduce the crash on LAN under windows. I spawned 4x Gavril-Zeta X (recommended by Hiradur as reliable crash) and no problem occured.

Details: I used laptop and desktop, both Win7 64, both running fresh upstream build as "RelWithDebInfo", both using Directx9 + windowed mode. Laptop used VC2010 and connected via wifi. Desktop used VC2013[compatibility-mode-201], connected through wire and ran the rorserver (fresh upstream build) as Debug. Map: simple2

Further, I tested together with Hiradur (linux) on an online public server. We spawned 2x Gavril Zeta 2wd on each end. Hiradur crashed, I didn't. Tried both DirectX + OpenGL on windows.

Member

only-a-ptr commented Dec 9, 2015

I failed to reproduce the crash on LAN under windows. I spawned 4x Gavril-Zeta X (recommended by Hiradur as reliable crash) and no problem occured.

Details: I used laptop and desktop, both Win7 64, both running fresh upstream build as "RelWithDebInfo", both using Directx9 + windowed mode. Laptop used VC2010 and connected via wifi. Desktop used VC2013[compatibility-mode-201], connected through wire and ran the rorserver (fresh upstream build) as Debug. Map: simple2

Further, I tested together with Hiradur (linux) on an online public server. We spawned 2x Gavril Zeta 2wd on each end. Hiradur crashed, I didn't. Tried both DirectX + OpenGL on windows.

@tritonas00

This comment has been minimized.

Show comment
Hide comment
@tritonas00

tritonas00 Dec 26, 2015

Collaborator

well after compiling with this #174 (comment), i can confirm that the game no more crashes.

I stayed for about 40 mins in a server with many users, some spawned vehicles i already had and not a single crash!

Thanks @Bob-Z!

Collaborator

tritonas00 commented Dec 26, 2015

well after compiling with this #174 (comment), i can confirm that the game no more crashes.

I stayed for about 40 mins in a server with many users, some spawned vehicles i already had and not a single crash!

Thanks @Bob-Z!

Bob-Z added a commit to Bob-Z/rigs-of-rods that referenced this issue Jan 3, 2016

Bob-Z added a commit to Bob-Z/rigs-of-rods that referenced this issue Jan 5, 2016

Fix out of bounds detection for CustomLightVisible
Fixed in Beam::setCustomLightVisible and Beam::getCustomLightVisible.
This fix bug RigsOfRods#459

@tritonas00 tritonas00 closed this Jan 8, 2016

@tritonas00 tritonas00 reopened this Jan 8, 2016

@Hiradur

This comment has been minimized.

Show comment
Hide comment
@Hiradur

Hiradur Jan 10, 2016

Contributor

fixed in a1653ba

Contributor

Hiradur commented Jan 10, 2016

fixed in a1653ba

@Hiradur Hiradur closed this Jan 10, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment