Conway, Walter,

Yes, unfortunately there are some issues that come about when linked with
some thumb libraries. I think Chris Toshok has been digging into these
issues but I'm unsure of the details. If you don't need thumb support, best
to disable it if possible (for now, at least).

Jeff

On Wed, Sep 28, 2011 at 6:13 PM, Conway Wieler <
[email protected]> wrote:

> Walt,
> If you have the ability to rebuild the native lib, you might want to try to
> rebuild it without Thumb instruction support ("Compile For Thumb"==NO in
> xcode build settings). We had a similar series of bizarre crashes and
> failures until we turned off Thumb support. I've seen a few places on the
> net (like
> http://stackoverflow.com/questions/4565488/how-do-i-add-a-library-compiled-in-xcode-into-monotouch-so-that-it-works-for-bothand
> http://stackoverflow.com/questions/5934121/application-with-static-library-runs-on-simulator-but-not-on-actual-device)
> that suggest Thumb should be disabled for linking with MonoTouch.
> Hope this helps!
> Conway
>
> -----Original Message-----
> From: [email protected] [mailto:
> [email protected]] On Behalf Of retlaW
> Sent: September 28, 2011 3:51 PM
> To: [email protected]
> Subject: [MonoTouch] Native code issue
>
> Hi Everyone.
>
> I am attempting to use the Wahoo Fitness lib to access their hardware ANT+
> dongle.
>
> Now for the lib itself there are some instructions for XCode.  One is that
> the info.plist needs Supported external accessory protocols, Value:
> com.momentumoftechnology.fisica and the other was that the Other Linker
> Flags key in the Linker section of the project settings needs to have this
> added :  -lstdc++ -all_load.
>
> I have added these to the -gcc_flags and have added -cxx as shown here :
>  -cxx -gcc_flags "-L${ProjectDir}/Lib -lWFConnector  -framework
> ExternalAccessory  -force_load ${ProjectDir}/Lib/libWFConnector.a
> -lstdc++
> -all_load "
>
> I have mapped the lib using btouch and included the dll into the solution
> as
> well.
>
> I have 2 test apps that use the lib.  One is a real test with a few
> projects, and the other is a stripped down version with no other projects
> included. I have also created the equivalent ObjC version of the stripped
> down app in XCode and that works as expected (so the lib itself should be
> fine).
>
> For both apps when linking "the SDK assemblies only" both will give me a
> SIGSEGV of :
>
> Native stacktrace:
>
>        0   WFConnTest                          0x001c1378
> mono_handle_native_sigsegv + 412
>        1   WFConnTest                          0x00191390
> mono_sigsegv_signal_handler + 360
>        2   libsystem_c.dylib                   0x33f1453d _sigtramp + 48
>        3   libobjc.A.dylib                     0x37d34e71
> objc_setProperty_non_gc
> + 144
>
> =================================================================
> 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.
> =================================================================
>
>
> For the Larger of the 2 apps if I "don't link" I get this error in the
> debugger:
>
> System.NullReferenceException has been thrown
> Object reference not set to an instance of an object.
>
> Then in the window it has :
> at MonoTouch.ObjCRuntime.Method.RegisterTrampolines(IntPtr one, IntPtr two,
> ...IntPtr nine)[0x00000] in <filename unknown>:0
>
> For the smaller app when I "dont link", even in debug mode it crashes and
> just closes the connection to the debugger with no output.
>
> I have searched around and will continue to do so , but at this point any
> guidance, web references, books etc that may help me in being able to
> resolve this would be greatly appreciated.
>
>
> Thank in advance,
>
>
> Walt
>
>
>
>
> --
> View this message in context:
> http://monotouch.2284126.n4.nabble.com/Native-code-issue-tp3853257p3853257.html
> Sent from the MonoTouch mailing list archive at Nabble.com.
> _______________________________________________
> MonoTouch mailing list
> [email protected]
> http://lists.ximian.com/mailman/listinfo/monotouch
> _______________________________________________
> MonoTouch mailing list
> [email protected]
> http://lists.ximian.com/mailman/listinfo/monotouch
>
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to