segfault on gentoo

Report any bugs here and we'll post fixes

Moderators: Sascha Willems, Thomas

segfault on gentoo

Postby lperkins2 » Thu Jul 09, 2015 5:35 am

I built the latest version of libNewton.so using cmake, the core libraries build fine, but when I call NewtonCreate I get the following segfault.

#0 0x00007ffff7792e36 in dgMemoryAllocator::Malloc(int) () from /usr/local/lib64/libNewton.so
#1 0x00007ffff77931c9 in dgMalloc(unsigned long, dgMemoryAllocator*) () from /usr/local/lib64/libNewton.so
#2 0x00007ffff7793817 in dgList<dgMemoryAllocator*>::dgListNode::operator new(unsigned long, dgMemoryAllocator*) () from /usr/local/lib64/libNewton.so
#3 0x00007ffff7793638 in dgList<dgMemoryAllocator*>::Append(dgMemoryAllocator* const&) () from /usr/local/lib64/libNewton.so
#4 0x00007ffff779295e in dgMemoryAllocator::dgMemoryAllocator() () from /usr/local/lib64/libNewton.so
#5 0x00007ffff78774fa in NewtonCreate () from /usr/local/lib64/libNewton.so
#6 0x0000000000400cdd in main ()
I also tried the older build system, using coreLibrary_300/projects/posix64/makefile, which builds libNewton, but cannot load it due to undefined symbols. This happens with both the version from google's repo and github.

I still have my old version (built a year ago), and it runs fine, no segfault, when I built it, I manually had to assemble the final libNewton.so to fix the unresolved symbols, which I'd rather avoid.
lperkins2
 
Posts: 39
Joined: Fri Jul 03, 2015 4:16 am

Re: segfault on gentoo

Postby d.l.i.w » Thu Jul 09, 2015 5:59 am

Does the demo sandbox work for you?
If you didn't change the cmake settings it is built by default. The binary then is in applications/demosSandbox/
d.l.i.w
 
Posts: 81
Joined: Mon Sep 26, 2011 4:35 am

Re: segfault on gentoo

Postby lperkins2 » Thu Jul 09, 2015 12:31 pm

That depends on your definition of work... It didn't compile via CMake, but (with some hammering) did from the posix64 makefile. (To build libNewton.so, I invoked CMake on just the coreLibrary_300 folder.)

As for working, it starts, the menus work, and the scenes load, well, most of them. Aside from the simple soft body (last in list), nothing collides, everything just drops through the floor. The car doesn't respond to keyboard input, and several examples result in a variety of crashes (notably parallel ray cast).

Since it's not dying on NewtonCreate(), I assume they must be specifying a malloc function to use, or something. I'll look at the sandbox code and see if there's anything obvious.
lperkins2
 
Posts: 39
Joined: Fri Jul 03, 2015 4:16 am

Re: segfault on gentoo

Postby d.l.i.w » Thu Jul 09, 2015 7:36 pm

I regularly test the cmake files on Linux and I have no problem here. Did you try with a new / clean build folder?
What does cmake output?

Keyboard input is broken on Linux atm, see my pull request on Github for a fix. It should get merged soon (Julio?).

Aside from the simple soft body (last in list), nothing collides, everything just drops through the floor

This works well for me (on Linux), so you must be doing something wrong :cry:
d.l.i.w
 
Posts: 81
Joined: Mon Sep 26, 2011 4:35 am

Re: segfault on gentoo

Postby lperkins2 » Thu Jul 09, 2015 9:21 pm

Okay, so I just tried again with a fresh checkout, it's working. I just did software updates, and I disabled all the advanced CFLAGS, and there were 4 revisions since my last attempt, so I don't know what change fixed it. Glad to know it's being regularly tested, I didn't pursue it before because in years past it's always need some help to get it to work.
lperkins2
 
Posts: 39
Joined: Fri Jul 03, 2015 4:16 am

Re: segfault on gentoo

Postby lperkins2 » Fri Jul 10, 2015 8:52 pm

Two of the demos still don't work perfectly. First is the simple boolean demo, which causes the following segfault.

Code: Select all
#0  dgPolyhedra::ConnectVertex (this=0x7fffffffc5a0, e0=e0@entry=0xbe3504f200000000, e1=e1@entry=0xbe3504f2)
    at /home/perkins/Source/ngd/coreLibrary_300/source/core/dgPolyhedra.cpp:472
#1  0x00000000005f4941 in dgBooleanMeshClipper::dgClusterFace::InsertOpenCurve (this=this@entry=0xf484f0, meshBVH=meshBVH@entry=0x7fffffffc680,
    facePerimeter=..., normal=..., origin=..., curve=...) at /home/perkins/Source/ngd/coreLibrary_300/source/meshUtil/dgMeshEffect5.cpp:2312
#2  0x00000000005f7d7d in dgBooleanMeshClipper::dgClusterFace::ClipFace (this=this@entry=0xf484f0, faceNode=0xefe700, meshBVH=meshBVH@entry=0x7fffffffc680,
    clipperMeshBVH=clipperMeshBVH@entry=0x7fffffffc600) at /home/perkins/Source/ngd/coreLibrary_300/source/meshUtil/dgMeshEffect5.cpp:2470
#3  0x00000000005f8aae in ClipCluster (clipperMeshBVH=0x7fffffffc600, meshBVH=0x7fffffffc680, clusterNode=0xf484c0, this=0x7fffffff8470)
    at /home/perkins/Source/ngd/coreLibrary_300/source/meshUtil/dgMeshEffect5.cpp:2529
#4  dgBooleanMeshClipper::ClippMesh (this=this@entry=0x7fffffffc680, otherMeshBVH=...)
    at /home/perkins/Source/ngd/coreLibrary_300/source/meshUtil/dgMeshEffect5.cpp:2887
#5  0x00000000005e8fbf in ClipMeshesAndColorize (meshB=0x7fffffffc5a0, meshA=0x7fffffffc540)
    at /home/perkins/Source/ngd/coreLibrary_300/source/meshUtil/dgMeshEffect5.cpp:2903
#6  dgMeshEffect::Intersection (this=<optimized out>, matrix=..., clipperMesh=<optimized out>)
    at /home/perkins/Source/ngd/coreLibrary_300/source/meshUtil/dgMeshEffect5.cpp:2937
#7  0x000000000053c728 in NewtonMeshIntersection (mesh=<optimized out>, clipper=<optimized out>, clipperMatrix=<optimized out>)
    at /home/perkins/Source/ngd/coreLibrary_300/source/newton/Newton.cpp:8007
#8  0x00000000004c6016 in SimpleBooleanOperations (scene=0x98f170) at /home/perkins/Source/ngd/applications/demosSandbox/sdkDemos/demos/SimpleBooleans.cpp:144
#9  0x00000000004de068 in NewtonDemos::LoadDemo (this=0x9b4660, index=21) at /home/perkins/Source/ngd/applications/demosSandbox/sdkDemos/NewtonDemos.cpp:591
#10 0x00000000004de168 in NewtonDemos::OnRunDemo (this=0x9b4660, event=...) at /home/perkins/Source/ngd/applications/demosSandbox/sdkDemos/NewtonDemos.cpp:771
#11 0x00007ffff735f476 in wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () from /usr/lib64/libwx_baseu-2.8.so.0
#12 0x00007ffff735f5e4 in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) () from /usr/lib64/libwx_baseu-2.8.so.0
#13 0x00007ffff735fd57 in wxEvtHandler::ProcessEvent(wxEvent&) () from /usr/lib64/libwx_baseu-2.8.so.0
#14 0x00007ffff7821c66 in ?? () from /usr/lib64/libwx_gtk2u_core-2.8.so.0



The second failing demo only fails when I run it on my nvidia graphics card (via bumblebee), and only when the crate hits the ground hard enough to fracture. It also segfaults. When I run it on the integrated intel 4xxx card, it works, but there are the usual weird artifacts from intel.

Code: Select all
#0  0x00007ffff661a164 in glGenLists () from /usr/lib64/opengl/nvidia/lib/libGL.so.1
#1  0x00000000004d75a0 in DemoMesh::OptimizeForRender (this=0x7fffbc002870) at /home/perkins/Source/ngd/applications/demosSandbox/sdkDemos/DemoMesh.cpp:710
#2  0x00000000004c9688 in OnReconstructMainMeshCallBack (body=<optimized out>, mainMesh=<optimized out>, fracturedCompoundCollision=0x1f36500)
    at /home/perkins/Source/ngd/applications/demosSandbox/sdkDemos/demos/StructuredConvexFracturing.cpp:119
#3  0x00000000004c9782 in OnEmitFracturedChunk (chunkBody=0x1b29500, fractureChunkMesh=0x2869540, fracturedCompoundCollision=0x1f36500)
    at /home/perkins/Source/ngd/applications/demosSandbox/sdkDemos/demos/StructuredConvexFracturing.cpp:166
#4  0x0000000000581213 in dgCollisionCompoundFractured::SpawnSingleChunk (this=this@entry=0x262cb00, myBody=myBody@entry=0x1b29280,
    myInstance=myInstance@entry=0x1f36500, chunkNode=chunkNode@entry=0x2869540)
    at /home/perkins/Source/ngd/coreLibrary_300/source/physics/dgCollisionCompoundFractured.cpp:1702
#5  0x00000000005813f7 in dgCollisionCompoundFractured::SpawnChunks (this=this@entry=0x262cb00, myBody=myBody@entry=0x1b29280,
    myInstance=myInstance@entry=0x1f36500, rootNode=rootNode@entry=0x2869540, impulseStimate2=<optimized out>, impulseStimateCut2=72899.4766)
    at /home/perkins/Source/ngd/coreLibrary_300/source/physics/dgCollisionCompoundFractured.cpp:1621
#6  0x00000000005827ac in dgCollisionCompoundFractured::CalculateContacts (this=0x262cb00, pair=<optimized out>, proxy=...)
    at /home/perkins/Source/ngd/coreLibrary_300/source/physics/dgCollisionCompoundFractured.cpp:1290
#7  0x00000000005b18f8 in dgWorld::CompoundContacts (this=this@entry=0xaf3840, pair=pair@entry=0x7ffff7f91280, proxy=...)
    at /home/perkins/Source/ngd/coreLibrary_300/source/physics/dgNarrowPhaseCollision.cpp:1070
#8  0x00000000005b5638 in dgWorld::CalculateContacts (this=0xaf3840, pair=pair@entry=0x7ffff7f91280, timestep=<optimized out>,
    threadIndex=threadIndex@entry=0, ccdMode=ccdMode@entry=false, intersectionTestOnly=intersectionTestOnly@entry=false)
    at /home/perkins/Source/ngd/coreLibrary_300/source/physics/dgNarrowPhaseCollision.cpp:1178
#9  0x000000000055fc7b in dgBroadPhase::CalculatePairContacts (this=this@entry=0xaf4280, pair=pair@entry=0x7ffff7f91280, timestep=<optimized out>,
    threadID=threadID@entry=0) at /home/perkins/Source/ngd/coreLibrary_300/source/physics/dgBroadPhase.cpp:1087
#10 0x000000000055fdb0 in dgBroadPhase::AddPair (this=this@entry=0xaf4280, contact=0x21a2f40, timestep=0.00833333377, threadIndex=threadIndex@entry=0)
    at /home/perkins/Source/ngd/coreLibrary_300/source/physics/dgBroadPhase.cpp:1139
lperkins2
 
Posts: 39
Joined: Fri Jul 03, 2015 4:16 am

Re: segfault on gentoo

Postby Julio Jerez » Fri Jul 10, 2015 9:52 pm

lperkins2 wrote:Two of the demos still don't work perfectly. First is the simple boolean demo, which causes the following segfault.


That demo is an all legacy from early 2.xx when we where doing the destruction using Boolean.
we are now using the vroomed decomposition which does no required clipping of complex faces.
I left because of laziness, but it will probably be discontinued in future relapses.

also the Fracture will be changed for the newer 3.14 I am making a new contact called sticky that will simple the construction of destructive easier now is it still to complex and because of the people are no using it.
so do not worry to much for these tow demos. Vehicle is also going on some refactoring.

3.14 is coming around sometime next week.

d.l.i.w wrote:Keyboard input is broken on Linux atm, see my pull request on Github for a fix. It should get merged soon (Julio?).

yes I will merge the all, I just did not last week because of debug egg new features.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles


Return to Bugs and Fixes

Who is online

Users browsing this forum: No registered users and 7 guests

cron