Bug 52 - System.DllNotFoundException
Summary: System.DllNotFoundException
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: 3.x
Hardware: Macintosh Mac OS
: --- enhancement
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2011-07-22 16:28 UTC by Andrew Young
Modified: 2011-08-04 17:13 UTC (History)
2 users (show)

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

Screenshot of crash in simulator. (103.83 KB, image/png)
2011-07-22 16:28 UTC, Andrew Young

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:

Description Andrew Young 2011-07-22 16:28:22 UTC
Created attachment 11 [details]
Screenshot of crash in simulator.

I'm getting a DllNotFoundException when running my app in the simulator. I upgraded to OS X Lion, upgraded Xcode 4.1 for Lion and now I'm getting this exception. I noticed that if I make a copy of the iPhoneSimulator4.3.sdk folder /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk then rename it to iPhoneSimulator3.2.sdk it will work.

at (wrapper managed-to-native) Mono.Data.Sqlite.UnsafeNativeMethods:sqlite3_open_v2 (byte[],intptr&,int,intptr)
at Mono.Data.Sqlite.SQLite3.Open (System.String strFilename, SQLiteOpenFlagsEnum flags, Int32 maxPoolSize, Boolean usePool) [0x00040] in /Developer/MonoTouch/Source/mono/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/SQLite3.cs:119 
at Mono.Data.Sqlite.SqliteConnection.Open () [0x0021a] in /Developer/MonoTouch/Source/mono/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/SQLiteConnection.cs:876 
at (wrapper remoting-invoke-with-check) Mono.Data.Sqlite.SqliteConnection:Open ()
at MyApp.iPhone.Data.Local.SqlConnection.ReaderWithCommand (System.String commandString, System.Collections.Generic.Dictionary`2 parameters, System.Action`1 block) [0x0000d] in /Users/Andrew/Projects/MyApp-iphone/MyApp.iPhone.Data/Local/SqlConnection.cs:19 
at MyApp.iPhone.Data.Local.LocalService.GetHashValueFrom (LocalDictionaries dictionary, System.String key) [0x0001f] in /Users/Andrew/Projects/MyApp-iphone/MyApp.iPhone.Data/Local/LocalService.cs:22 
at MyApp.iPhone.Data.Gateway.GetDbVersion () [0x00000] in /Users/Andrew/Projects/MyApp-iphone/MyApp.iPhone.Data/Gateway.cs:17 
at MyApp.iPhone.Support.Installation.MigrateDb () [0x00000] in /Users/Andrew/Projects/MyApp-iphone/MyApp.iPhone/Support/Installation.cs:11 
at MyApp.iPhone.AppDelegate+<FinishedLaunching>c__AnonStorey0.<>m__0 () [0x0000b] in /Users/Andrew/Projects/MyApp-iphone/MyApp.iPhone/Main.cs:51 
at MonoTouch.Foundation.NSActionDispatcher.Apply () [0x00000] in /Users/plasma/Source/iphone-3/monotouch/shared/Foundation/NSAction.cs:45 
at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Users/plasma/Source/iphone-3/monotouch/UIKit/UIApplication.cs:26 
at MonoTouch.UIKit.UIApplication.Main (System.String[] args) [0x00000] in /Users/plasma/Source/iphone-3/monotouch/UIKit/UIApplication.cs:31 
at MyApp.iPhone.Application.Main (System.String[] args) [0x00000] in /Users/Andrew/Projects/MyApp-iphone/MyApp.iPhone/Main.cs:22
Comment 1 Chris Toshok 2011-07-25 22:51:29 UTC
Interesting.  Is the project configured to be using the 3.2 sdk?  It's in "$solution options" -> iPhone Build -> SDK version.
Comment 2 Andrew Young 2011-07-26 00:19:14 UTC
No. It is set to Default. The only other option in that field is 4.3.
Comment 3 Chris Toshok 2011-07-26 12:16:57 UTC
Ahh, found the issue.  I'll get a fix in git soon.
Comment 4 Andrew Young 2011-07-27 13:00:44 UTC
Awesome. Thanks. As a short term work around, renaming the folder should be ok right?

(In reply to comment #3)
> Ahh, found the issue.  I'll get a fix in git soon.
Comment 5 Chris Toshok 2011-07-27 22:02:33 UTC
Yeah, in a way that's essentially what the fix is, except wr arrive at it by using the 4.3 directory while you rename 4.3 to 3.2.
Comment 6 Chris Toshok 2011-08-04 17:11:11 UTC
Sorry about not giving you more feedback - the fix is in git (as of July 26) and will go out with the next release of monotouch.
Comment 7 Andrew Young 2011-08-04 17:13:38 UTC
Thanks. Any timeline on when the next release will be? There's a few bug fixes, including this one, that we're waiting on in the next release.