Bug 12595 - P/Invoke exception with 3rd party library
Summary: P/Invoke exception with 3rd party library
Status: VERIFIED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: 6.3.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: 6.4 (async)
Assignee: Zoltan Varga
URL:
Depends on:
Blocks:
 
Reported: 2013-06-07 11:28 UTC by Kirk Klobe
Modified: 2013-07-16 13:02 UTC (History)
6 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
VERIFIED FIXED

Description Kirk Klobe 2013-06-07 11:28:29 UTC
When running the attached solution on the device, I receive the following exception:

{System.ExecutionEngineException: Attempting to JIT compile method '(wrapper managed-to-native) FMOD.System:FMOD_System_CreateDSP (intptr,FMOD.DSP_DESCRIPTION&,intptr&)' while running with --aot-only. See http://docs.xamarin.com/ios/about/limitations for more information.

  at FMOD.System.createDSP (FMOD.DSP_DESCRIPTION& description, FMOD.DSP& dsp) [0x0000e] in /Users/kklobe/src/SoundCheckMono/FMOD_MonoTouch/fmod.cs:2230 }
Comment 3 Sebastien Pouliot 2013-07-04 14:34:30 UTC
The exception seems related to the use of:

    [MarshalAs(UnmanagedType.ByValArray,SizeConst=32)]

At least there's no exception when it's removed (and the char[] field re-typed). It also throws the same EEE when the linker is disabled.
Comment 4 Zoltan Varga 2013-07-04 17:43:24 UTC
Fixed in mono master. Can't bump master-3.0 to use it since some earlier commits to the threading code appeared to break things.
Comment 6 Zoltan Varga 2013-07-04 20:08:18 UTC
Yes, that is the problem I'm running into. I suspect 576dfed659672bef2d9f7ce2b54b07c52c84f85d or
e2ac2a9e451bd557cc8e1bf926faa5da43bb6962.
Comment 7 Zoltan Varga 2013-07-04 20:09:47 UTC
Reverted the last mono version bump for now.
Comment 8 narayanp 2013-07-16 09:44:19 UTC
Today I have checked this issue with following builds:

X.S 4.0.10(build 5)
Mono 3.1.2
Xamarin.iOS 6.3.8-10

We have open the attachec project in X.S and run the application on device, it is working fine and showing three buttons 'Record', 'Play', 'Button' and alos it is automatically recording voice and playing and analyzing.

checked on devices:
iPhone4 version 6.1.3
iPhone4 version 5.1

Changing the status to Verified.
Comment 9 Kirk Klobe 2013-07-16 12:35:45 UTC
@narayanp are you a Xamarin employee?
Comment 10 PJ 2013-07-16 13:02:15 UTC
@Kirk Klobe: narayanp works for 360logica, a Xamarin-contracted company that provides manual testing.