Hi Jason,
> (gdb) print face2
> $2 = (const StdMeshFace &) @0x832efac0: {Vertices = {32, 25, 2201353720}}
the problem is this ridiculously large value for the last vertex, and
the question is where it comes from. Unfortunately from the stacktrace I
cannot tell where it comes from. If you have time to spare on this,
could you try the following (I suggest in this order):
* Compile OC without optimizations enabled (-O0), and see if the crash
is still there. This should give us a bit more helpful stacktraces as
well, without those <value optimized out> labels at some places.
* In src/lib/StdMesh.cpp in line 1199, use std::sort instead of
StdMesh_tim_sort, and see if the crash is still there (just comment out
the timsort and comment in the std::sort).
* Run the whole thing in valgrind up to the point of the crash (I know
it's painful...), and show the valgrind error log. I'm only interested
in the memory errors, not the memory leak report. I suggest redirecting
the valgrind output to a file to make sure you don't lose anything.
Thanks and cheers,
Armin
The stacktrace would be a bit more helpful without optimizations in the
binary enabled.
On Mon, 2012-11-26 at 12:34 -0500, Jason Woofenden wrote:
> Philipp,
>
> Sorry for the delay, I was away for most of last week. I've just
> updated everything with aptitude, so now I'm running openclonk
> 5.3.2-1
>
> I've pasted a backtrace below (plus a little poking around in the
> frames.)
>
> Please let me know if there's further debugging I can do. I'm
> familiar with basic use of gdb, valgrind, strace, c++, etc.
>
> Thank you.
>
> - Jason
>
> Program received signal SIGSEGV, Segmentation fault.
> compare (face2=..., face1=..., this=0xbfffedd4) at
> /build/buildd-openclonk_5.3.2-1-i386-eUMTK6/openclonk-5.3.2/src/lib/StdMesh.cpp:94
> 94
> /build/buildd-openclonk_5.3.2-1-i386-eUMTK6/openclonk-5.3.2/src/lib/StdMesh.cpp:
> No such file or directory.
> (gdb) bt
> #0 compare (face2=..., face1=..., this=0xbfffedd4) at
> /build/buildd-openclonk_5.3.2-1-i386-eUMTK6/openclonk-5.3.2/src/lib/StdMesh.cpp:94
> #1 StdMeshFaceCmp (face1=..., face2=...) at
> /build/buildd-openclonk_5.3.2-1-i386-eUMTK6/openclonk-5.3.2/src/lib/StdMesh.cpp:240
> #2 0x80302f47 in binary_insertion_find (size=<optimized out>, x=...,
> dst=0x832efaa8) at
> /build/buildd-openclonk_5.3.2-1-i386-eUMTK6/openclonk-5.3.2/thirdparty/timsort/sort.h:136
> #3 binary_insertion_sort_start (dst=dst@entry=0x2, start=start@entry=1,
> size=2) at
> /build/buildd-openclonk_5.3.2-1-i386-eUMTK6/openclonk-5.3.2/thirdparty/timsort/sort.h:183
> #4 0x80303e36 in StdMesh_binary_insertion_sort (dst=0x2,
> dst@entry=0x832efaa8, size=size@entry=2) at
> /build/buildd-openclonk_5.3.2-1-i386-eUMTK6/openclonk-5.3.2/thirdparty/timsort/sort.h:195
> #5 0x80304888 in StdMesh_tim_sort (dst=0x832efaa8, size=2) at
> /build/buildd-openclonk_5.3.2-1-i386-eUMTK6/openclonk-5.3.2/thirdparty/timsort/sort.h:553
> #6 0x803070c3 in StdMeshInstance::ReorderFaces (this=0x8336b180,
> global_trans=0xbfffee80) at
> /build/buildd-openclonk_5.3.2-1-i386-eUMTK6/openclonk-5.3.2/src/lib/StdMesh.cpp:1199
> #7 0x8020e5af in C4Draw::RenderMesh (this=0x806db770, instance=...,
> sfcTarget=0x806db400, tx=353, ty=971, twdt=96, thgt=96, dwPlayerColor=0,
> pTransform=0xbffff108)
> at
> /build/buildd-openclonk_5.3.2-1-i386-eUMTK6/openclonk-5.3.2/src/graphics/C4Draw.cpp:738
> #8 0x803963bd in C4DefGraphics::Draw (this=0x82aa5a38, cgo=..., iColor=0,
> pObj=0x8136c7d0, iPhaseX=0, iPhaseY=0, trans=0xbffff108) at
> /build/buildd-openclonk_5.3.2-1-i386-eUMTK6/openclonk-5.3.2/src/object/C4DefGraphics.cpp:349
> #9 0x8038d05c in C4Def::Draw (this=0x82aa5368, cgo=..., fSelected=false,
> iColor=0, pObj=0x8136c7d0, iPhaseX=0, iPhaseY=0, trans=0xbffff108) at
> /build/buildd-openclonk_5.3.2-1-i386-eUMTK6/openclonk-5.3.2/src/object/C4Def.cpp:490
> #10 0x803c1f28 in C4Object::DrawPicture (this=0x8136c7d0, cgo=...,
> fSelected=false, pRegions=0x0, transform=0xbffff108) at
> /build/buildd-openclonk_5.3.2-1-i386-eUMTK6/openclonk-5.3.2/src/object/C4Object.cpp:2451
> #11 0x80396eee in C4GraphicsOverlay::Draw (this=0xafae4848, cgo=...,
> pForObj=0xafaaa6c0, iByPlayer=0) at
> /build/buildd-openclonk_5.3.2-1-i386-eUMTK6/openclonk-5.3.2/src/object/C4DefGraphics.cpp:957
> #12 0x803d8354 in C4Object::Draw (this=0xafaaa6c0, cgo=..., iByPlayer=0,
> eDrawMode=C4Object::ODM_Normal, offX=401, offY=1019) at
> /build/buildd-openclonk_5.3.2-1-i386-eUMTK6/openclonk-5.3.2/src/object/C4Object.cpp:2078
> #13 0x803e05a3 in C4ObjectList::DrawIfCategory (this=0x805b08c0, cgo=...,
> iPlayer=0, dwCat=32768, fInvert=false) at
> /build/buildd-openclonk_5.3.2-1-i386-eUMTK6/openclonk-5.3.2/src/object/C4ObjectList.cpp:449
> #14 0x801dadfd in C4Viewport::Draw (this=this@entry=0x834c7160, cgo0=...,
> fDrawOverlay=fDrawOverlay@entry=true) at
> /build/buildd-openclonk_5.3.2-1-i386-eUMTK6/openclonk-5.3.2/src/game/C4Viewport.cpp:292
> #15 0x801db2dd in C4Viewport::Execute (this=this@entry=0x834c7160) at
> /build/buildd-openclonk_5.3.2-1-i386-eUMTK6/openclonk-5.3.2/src/game/C4Viewport.cpp:353
> #16 0x801db82c in C4ViewportList::Execute (this=0x805ca740,
> DrawBackground=false) at
> /build/buildd-openclonk_5.3.2-1-i386-eUMTK6/openclonk-5.3.2/src/game/C4Viewport.cpp:764
> #17 0x801d863f in C4GraphicsSystem::Execute (this=0x805ca3a0) at
> /build/buildd-openclonk_5.3.2-1-i386-eUMTK6/openclonk-5.3.2/src/game/C4GraphicsSystem.cpp:139
> #18 0x801c213d in C4FullScreen::PerformUpdate (this=0x805b0b20) at
> /build/buildd-openclonk_5.3.2-1-i386-eUMTK6/openclonk-5.3.2/src/game/C4FullScreen.cpp:179
> #19 0x80153daf in C4Window::RequestUpdate (this=0x805b0b20) at
> /build/buildd-openclonk_5.3.2-1-i386-eUMTK6/openclonk-5.3.2/src/platform/C4WindowGTK.cpp:991
> #20 0x801c23d1 in C4FullScreen::Execute (this=0x805b0b20) at
> /build/buildd-openclonk_5.3.2-1-i386-eUMTK6/openclonk-5.3.2/src/game/C4FullScreen.cpp:85
> #21 0x801c0e9e in C4Application::Draw (this=this@entry=0x805b0c60) at
> /build/buildd-openclonk_5.3.2-1-i386-eUMTK6/openclonk-5.3.2/src/game/C4Application.cpp:681
> #22 0x801c1595 in Execute (this=0x806d9568, iTimeout=<optimized out>) at
> /build/buildd-openclonk_5.3.2-1-i386-eUMTK6/openclonk-5.3.2/src/game/C4Application.cpp:865
> #23 C4ApplicationGameTimer::Execute (this=0x806d9568, iTimeout=0) at
> /build/buildd-openclonk_5.3.2-1-i386-eUMTK6/openclonk-5.3.2/src/game/C4Application.cpp:845
> #24 0x80411505 in StdScheduler::ScheduleProcs (this=0x805b0c60, iTimeout=541)
> at
> /build/buildd-openclonk_5.3.2-1-i386-eUMTK6/openclonk-5.3.2/src/platform/StdScheduler.cpp:293
> #25 0x8040385b in C4AbstractApp::ScheduleProcs (this=this@entry=0x805b0c60,
> iTimeout=iTimeout@entry=-1) at
> /build/buildd-openclonk_5.3.2-1-i386-eUMTK6/openclonk-5.3.2/src/platform/C4App.cpp:39
> #26 0x80403880 in C4AbstractApp::Run (this=0x805b0c60) at
> /build/buildd-openclonk_5.3.2-1-i386-eUMTK6/openclonk-5.3.2/src/platform/C4App.cpp:27
> #27 0x80141907 in main (argc=1, argv=0xbffff804) at
> /build/buildd-openclonk_5.3.2-1-i386-eUMTK6/openclonk-5.3.2/src/game/ClonkMain.cpp:193
> (gdb) print face1
> $1 = <optimized out>
> (gdb) print face2
> $2 = (const StdMeshFace &) @0x832efac0: {Vertices = {32, 25, 2201353720}}
> (gdb) print this
> $3 = (const (anonymous namespace)::StdMeshInstanceFaceOrderingCmpPred *
> const) 0xbfffedd4
> (gdb) print *this
> $4 = {m_vertices = 0x8338b730, m_face_ordering =
> StdSubMeshInstance::FO_FarthestToNearest, m_global_trans = @0xbfffede0}
> (gdb) frame 1
> #1 StdMeshFaceCmp (face1=..., face2=...) at
> /build/buildd-openclonk_5.3.2-1-i386-eUMTK6/openclonk-5.3.2/src/lib/StdMesh.cpp:240
> 240 in
> /build/buildd-openclonk_5.3.2-1-i386-eUMTK6/openclonk-5.3.2/src/lib/StdMesh.cpp
> (gdb) print face1
> $5 = (const StdMeshFace &) @0xbfffe4ac: {Vertices = {0, 1, 2}}
> (gdb) print face2
> $6 = (const StdMeshFace &) @0x832efac0: {Vertices = {32, 25, 2201353720}}
> (gdb) frame 2
> #2 0x80302f47 in binary_insertion_find (size=<optimized out>, x=...,
> dst=0x832efaa8) at
> /build/buildd-openclonk_5.3.2-1-i386-eUMTK6/openclonk-5.3.2/thirdparty/timsort/sort.h:136
> 136
> /build/buildd-openclonk_5.3.2-1-i386-eUMTK6/openclonk-5.3.2/thirdparty/timsort/sort.h:
> No such file or directory.
> (gdb) print x
> $7 = {Vertices = {0, 1, 2}}
> (gdb) print dst
> $8 = (StdMeshFace *) 0x832efaa8
> (gdb) print *dst
> $9 = {Vertices = {0, 2, 3}}
> (gdb) frame 3
> #3 binary_insertion_sort_start (dst=dst@entry=0x2, start=start@entry=1,
> size=2) at
> /build/buildd-openclonk_5.3.2-1-i386-eUMTK6/openclonk-5.3.2/thirdparty/timsort/sort.h:183
> 183 in
> /build/buildd-openclonk_5.3.2-1-i386-eUMTK6/openclonk-5.3.2/thirdparty/timsort/sort.h
> (gdb) print dst
> $10 = (StdMeshFace *) 0x2
> (gdb) print *dst
> Cannot access memory at address 0x2
> (gdb) frame 4
> #4 0x80303e36 in StdMesh_binary_insertion_sort (dst=0x2,
> dst@entry=0x832efaa8, size=size@entry=2) at
> /build/buildd-openclonk_5.3.2-1-i386-eUMTK6/openclonk-5.3.2/thirdparty/timsort/sort.h:195
> 195 in
> /build/buildd-openclonk_5.3.2-1-i386-eUMTK6/openclonk-5.3.2/thirdparty/timsort/sort.h
> (gdb) print *dst@entry
> $16 = {Vertices = {0, 2, 3}}
> (gdb) frame 5
> #5 0x80304888 in StdMesh_tim_sort (dst=0x832efaa8, size=2) at
> /build/buildd-openclonk_5.3.2-1-i386-eUMTK6/openclonk-5.3.2/thirdparty/timsort/sort.h:553
> 553 in
> /build/buildd-openclonk_5.3.2-1-i386-eUMTK6/openclonk-5.3.2/thirdparty/timsort/sort.h
> (gdb) print *dst
> $17 = {Vertices = {0, 2, 3}}
> (gdb) frame 6
> #6 0x803070c3 in StdMeshInstance::ReorderFaces (this=0x8336b180,
> global_trans=0xbfffee80) at
> /build/buildd-openclonk_5.3.2-1-i386-eUMTK6/openclonk-5.3.2/src/lib/StdMesh.cpp:1199
> 1199
> /build/buildd-openclonk_5.3.2-1-i386-eUMTK6/openclonk-5.3.2/src/lib/StdMesh.cpp:
> No such file or directory.
> (gdb) print *this
> $18 = {Mesh = 0x81c0d0d0, Completion = 1, SharedVertices =
> {<std::_Vector_base<StdMeshVertex, std::allocator<StdMeshVertex> >> = {
> _M_impl = {<std::allocator<StdMeshVertex>> =
> {<__gnu_cxx::new_allocator<StdMeshVertex>> = {<No data fields>}, <No data
> fields>}, _M_start = 0x0, _M_finish = 0x0, _M_end_of_storage = 0x0}}, <No
> data fields>},
> AnimationNodes = {<std::_Vector_base<StdMeshInstance::AnimationNode*,
> std::allocator<StdMeshInstance::AnimationNode*> >> = {
> _M_impl = {<std::allocator<StdMeshInstance::AnimationNode*>> =
> {<__gnu_cxx::new_allocator<StdMeshInstance::AnimationNode*>> = {<No data
> fields>}, <No data fields>}, _M_start = 0xafae5160, _M_finish = 0xafae5168,
> _M_end_of_storage = 0xafae5168}}, <No data fields>}, AnimationStack =
> {<std::_Vector_base<StdMeshInstance::AnimationNode*,
> std::allocator<StdMeshInstance::AnimationNode*> >> = {
> _M_impl = {<std::allocator<StdMeshInstance::AnimationNode*>> =
> {<__gnu_cxx::new_allocator<StdMeshInstance::AnimationNode*>> = {<No data
> fields>}, <No data fields>}, _M_start = 0xafaa9a78, _M_finish = 0xafaa9a80,
> _M_end_of_storage = 0xafaa9a80}}, <No data fields>}, BoneTransforms =
> {<std::_Vector_base<StdMeshMatrix, std::allocator<StdMeshMatrix> >> = {
> _M_impl = {<std::allocator<StdMeshMatrix>> =
> {<__gnu_cxx::new_allocator<StdMeshMatrix>> = {<No data fields>}, <No data
> fields>}, _M_start = 0x83302320, _M_finish = 0x83302380, _M_end_of_storage =
> 0x83302380}}, <No data fields>},
> SubMeshInstances = {<std::_Vector_base<StdSubMeshInstance*,
> std::allocator<StdSubMeshInstance*> >> = {
> _M_impl = {<std::allocator<StdSubMeshInstance*>> =
> {<__gnu_cxx::new_allocator<StdSubMeshInstance*>> = {<No data fields>}, <No
> data fields>}, _M_start = 0x832e98a8, _M_finish = 0x832e98b0,
> _M_end_of_storage = 0x832e98b0}}, <No data fields>}, AttachChildren =
> {<std::_Vector_base<StdMeshInstance::AttachedMesh*,
> std::allocator<StdMeshInstance::AttachedMesh*> >> = {
> _M_impl = {<std::allocator<StdMeshInstance::AttachedMesh*>> =
> {<__gnu_cxx::new_allocator<StdMeshInstance::AttachedMesh*>> = {<No data
> fields>}, <No data fields>}, _M_start = 0x0, _M_finish = 0x0,
> _M_end_of_storage = 0x0}}, <No data fields>}, AttachParent = 0x0,
> BoneTransformsDirty = false}
> (gdb) print *global_trans
> $19 = {a = {{0.50000006, 0.865999997, -2.18556941e-08, 0.865999997},
> {0.432999939, -0.25000003, -0.865999997, -3.25}, {0.749000013, -0.433000028,
> 0.49999997, -5.43300009}}}
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]