[Mono-dev] SIGSEGV error

Euan MacInnes euan_macinnes at hotmail.com
Tue Oct 9 15:21:48 EDT 2007


Hi All,
   I found a SIGSEGV error when trying to call a native .so extension on Fedora Core (an .so that is known to work, libode.so.0). The exact output of the error is here:

Stacktrace:

  at IcarusSceneEngine.BodySphere.InitialiseSimulation (IcarusSceneEngine.SceneObject) <0xffffffff>
  at IcarusSceneEngine.BodySphere.InitialiseSimulation (IcarusSceneEngine.SceneObject) <0x0000e>
  at IcarusSceneEngine.SceneObject.InitialiseSimulation (IcarusSceneEngine.SceneObject) <0x00052>
  at IcarusSceneEngine.SceneObject.InitialiseSimulation (IcarusSceneEngine.SceneObject) <0x00052>
  at IcarusSceneEngine.SceneObject.InitialiseSimulation (IcarusSceneEngine.SceneObject) <0x00052>
  at IcarusSceneEngine.SceneObject.InitialiseSimulation (IcarusSceneEngine.SceneObject) <0x00052>
  at IcarusSceneEngine.SceneObject.InitialiseSimulation (IcarusSceneEngine.SceneObject) <0x00052>
  at IcarusSceneEngine.Project.set_State (IcarusSceneEngine.ProjectState) <0x0008b>
  at (wrapper remoting-invoke-with-check) IcarusSceneEngine.Project.set_State (IcarusSceneEngine.ProjectState) <0xffffffff>
  at GameApplication.InitApplication (IcarusSceneEngine.Project) [0x015bc] in /tmp/tmp152fb040.tmp:590
  at IcarusSceneEngine.Script.Finalise (IcarusSceneEngine.Project) <0x000c1>
  at IcarusSceneEngine.LoaderThread.RunFinal (IcarusSceneEngine.Project) <0x000fb>
  at IcarusSceneEngine.LoaderManager.Finalisation (IcarusSceneEngine.Project) <0x00014>
  at Icarus.IcarusThread.Run () <0x000e2>
  at Icarus.IcarusApp.Main (string[]) <0x002f7>
  at (wrapper runtime-invoke) Icarus.IcarusApp.runtime_invoke_void_string[] (object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

        mono [0x81685e0]
        mono [0x81350c2]
        [0x8b6440]
        /usr/lib/libode.so.0.6.1 [0x2796c16]
        /usr/lib/libode.so.0.6.1 [0x26faf41]
        /lib/ld-linux.so.2 [0x758fc3]
        /lib/ld-linux.so.2 [0x7590d3]
        /lib/ld-linux.so.2 [0x75c924]
        /lib/ld-linux.so.2 [0x758c06]
        /lib/ld-linux.so.2 [0x75c192]
        /lib/libdl.so.2 [0x8d4d0d]
        /lib/ld-linux.so.2 [0x758c06]
        /lib/libdl.so.2 [0x8d538c]
        /lib/libdl.so.2(dlopen+0x44) [0x8d4c44]
        mono [0x81215bc]
        mono [0x80f8163]
        mono(mono_lookup_pinvoke_call+0x70c) [0x80f88ac]
        mono [0x80c2f57]
        mono [0x8147d42]
        mono [0x8152eda]
        mono [0x8154bfc]
        mono(mono_compile_method+0x18) [0x80929d8]
        mono [0x807bedd]
        [0x13a03e]
        [0x20b8fbb]
        [0x20b8fbb]
        [0x20b8fbb]
        [0x20b8fbb]
        [0x20b8fbb]
        [0x20b8ee4]
        [0x20b8e16]
        [0x65315ca]
        [0x20b633a]
        [0x6413904]
        [0x64137ed]
        [0x6a6ce3]
        [0x1833f0]
        [0x182f0b]
        mono [0x8155356]
        mono(mono_runtime_invoke+0x27) [0x80927b7]
        mono(mono_runtime_exec_main+0xb0) [0x80966e0]
        mono(mono_runtime_run_main+0x215) [0x8096dd5]
        mono(mono_main+0xa15) [0x8058e25]
        mono [0x8057f0e]
        /lib/libc.so.6(__libc_start_main+0xdc) [0x781f2c]
        mono [0x8057e51]

=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================


What baffles me here is why this error would appear. Based on the code, the ODE calls will not actually take place at this point in the program. Through much experimentation, all that's happening here is the "Using Tao.Ode" remark is causing this. What's really frustrating here is that this all works fine with Tao.Ode on Windows, I'm using the same compiled version on Linux,  neither Mono or .NET on Windows will come out with this error, yet Linux persists in doing this.

I've hardcoded the path in Tao.Ode.dll.config to the right libode.so.0 file in /usr/lib/, and it has been working before. The default calling convention for the Tao.Ode unit into the libode.so.0 is cdecl. I've stepped through the entire Tao.ODe code to see if it's anything with that in their unit, there's nothing in there except [Dll Import] headers, and some sequential structs/enumerations, there's no initialisation code beyond the DLL imports. This suggests somehow that the DLL import isn't matching the function, but then why cause the SIGSEGV stacktrace error...

Can anybody help/suggest a course of action?

Cheers,

Euan.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20071010/37de764c/attachment.html 


More information about the Mono-devel-list mailing list