perryhg / csharp-sqlite

Automatically exported from code.google.com/p/csharp-sqlite
Other
0 stars 0 forks source link

csharp sqlite on wp7 Device throw "attempt to access the method failed" #160

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. The app with SQLite works on Emulator
2. Deploy the app to device, will throw  "attempt to access the method failed"
3.

What is the expected output? What do you see instead?

Throw exception  "attempt to access the method failed".

What version of the product are you using? On what operating system?

Mongo(WP7.1)

Please provide any additional information below.

Attempt to access the method failed: System.IO.FileStream.get_Name()
   at Community.CsharpSqlite.Sqlite3.winOpen(sqlite3_vfs pVfs, String zName, sqlite3_file pFile, Int32 flags, Int32& pOutFlags)
   at Community.CsharpSqlite.Sqlite3.sqlite3OsOpen(sqlite3_vfs pVfs, String zPath, sqlite3_file pFile, Int32 flags, Int32& pFlagsOut)
   at Community.CsharpSqlite.Sqlite3.sqlite3PagerOpen(sqlite3_vfs pVfs, Pager& ppPager, String zFilename, Int32 nExtra, Int32 flags, Int32 vfsFlags, dxReiniter xReinit)
   at Community.CsharpSqlite.Sqlite3.sqlite3BtreeOpen(sqlite3_vfs pVfs, String zFilename, sqlite3 db, Btree& ppBtree, Int32 flags, Int32 vfsFlags)
   at Community.CsharpSqlite.Sqlite3.openDatabase(String zFilename, sqlite3& ppDb, Int32 flags, String zVfs)
   at Community.CsharpSqlite.Sqlite3.sqlite3_open_v2(String filename, sqlite3& ppDb, Int32 flags, String zVfs)
   at Community.CsharpSqlite.SQLiteClient.SqliteConnection.Open()
   at FinanceCalculator.Phone.Data.DataHelper..cctor()
   at FinanceCalculator.Phone.ViewModels.LoanViewModel.get_RateInfos()
   at System.Reflection.RuntimeMethodInfo.InternalInvoke(RuntimeMethodInfo rtmi, Object obj, BindingFlags invokeAttr, Binder binder, Object parameters, CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean verifyAccess, StackCrawlMark& stackMark)
   at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, StackCrawlMark& stackMark)
   at System.Reflection.RuntimePropertyInfo.InternalGetValue(PropertyInfo thisProperty, Object obj, Object[] index, StackCrawlMark& stackMark)
   at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] index)
   at System.Windows.CLRPropertyListener.get_Value()
   at System.Windows.PropertyAccessPathStep.ConnectToPropertyInSource(Boolean isSourceCollectionViewCurrentItem)
   at System.Windows.PropertyAccessPathStep.ConnectToProperty()
   at System.Windows.PropertyAccessPathStep.ReConnect(Object newSource)
   at System.Windows.PropertyPathListener.ReConnect(Object source)
   at System.Windows.Data.BindingExpression.SourceAcquired()
   at System.Windows.Data.BindingExpression.System.Windows.IDataContextChangedListener.OnDataContextChanged(Object sender, DataContextChangedEventArgs e)
   at System.Windows.Data.BindingExpression.DataContextChanged(Object sender, DataContextChangedEventArgs e)
   at System.Windows.FrameworkElement.OnDataContextChanged(DataContextChangedEventArgs e)
   at System.Windows.FrameworkElement.OnAncestorDataContextChanged(DataContextChangedEventArgs e)
   at System.Windows.FrameworkElement.NotifyDataContextChanged(DataContextChangedEventArgs e)
   at System.Windows.FrameworkElement.OnTreeParentUpdated(DependencyObject newParent, Boolean bIsNewParentAlive)
   at System.Windows.DependencyObject.UpdateTreeParent(IManagedPeer oldParent, IManagedPeer newParent, Boolean bIsNewParentAlive, Boolean keepReferenceToParent)
   at MS.Internal.FrameworkCallbacks.ManagedPeerTreeUpdate(IntPtr oldParentElement, IntPtr parentElement, IntPtr childElement, Byte bIsParentAlive, Byte bKeepReferenceToParent, Byte bCanCreateParent)
   at MS.Internal.XcpImports.MeasureNative(IntPtr element, Single inWidth, Single inHeight)
   at MS.Internal.XcpImports.UIElement_Measure(UIElement element, Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.ScrollViewer.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureOverride(IntPtr nativeTarget, Double inWidth, Double inHeight, Double& outWidth, Double& outHeight)
   at MS.Internal.XcpImports.MeasureOverrideNative(IntPtr element, Single inWidth, Single inHeight, Single& outWidth, Single& outHeight)
   at MS.Internal.XcpImports.FrameworkElement_MeasureOverride(FrameworkElement element, Size availableSize)
   at Microsoft.Phone.Controls.PivotItem.MeasureOverride(Size availableSize)
   at System.Windows.FrameworkElement.MeasureOverride(IntPtr nativeTarget, Double inWidth, Double inHeight, Double& outWidth, Double& outHeight)
   at MS.Internal.XcpImports.MeasureOverrideNative(IntPtr element, Single inWidth, Single inHeight, Single& outWidth, Single& outHeight)
   at MS.Internal.XcpImports.FrameworkElement_MeasureOverride(FrameworkElement element, Size availableSize)
   at Microsoft.Phone.Controls.Pivot.MeasureOverride(Size availableSize)
   at System.Windows.FrameworkElement.MeasureOverride(IntPtr nativeTarget, Double inWidth, Double inHeight, Double& outWidth, Double& outHeight)
   at MS.Internal.XcpImports.MeasureOverrideNative(IntPtr element, Single inWidth, Single inHeight, Single& outWidth, Single& outHeight)
   at MS.Internal.XcpImports.FrameworkElement_MeasureOverride(FrameworkElement element, Size availableSize)
   at System.Windows.FrameworkElement.MeasureOverride(Size availableSize)
   at System.Windows.FrameworkElement.MeasureOverride(IntPtr nativeTarget, Double inWidth, Double inHeight, Double& outWidth, Double& outHeight)
   at MS.Internal.XcpImports.MeasureOverrideNative(IntPtr element, Single inWidth, Single inHeight, Single& outWidth, Single& outHeight)
   at MS.Internal.XcpImports.FrameworkElement_MeasureOverride(FrameworkElement element, Size availableSize)
   at Microsoft.Phone.Controls.PhoneApplicationFrame.MeasureOverride(Size availableSize)
   at System.Windows.FrameworkElement.MeasureOverride(IntPtr nativeTarget, Double inWidth, Double inHeight, Double& outWidth, Double& outHeight)

Original issue reported on code.google.com by hjf1...@gmail.com on 30 May 2012 at 2:16

GoogleCodeExporter commented 9 years ago
Here is the WP7 app.

Original comment by hjf1...@gmail.com on 30 May 2012 at 2:17

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by noah.hart@gmail.com on 2 Jun 2012 at 12:11

GoogleCodeExporter commented 9 years ago
I've managet to compile with symbols:
"SQLITE_SILVERLIGHT NET_40 TRUE WIN32 _MSC_VER NO_TCL SQLITE_ASCII 
SQLITE_DISABLE_LFS SQLITE_HAS_CODEC SQLITE_MEM_POOL SQLITE_MUTEX_OMIT 
SQLITE_OMIT_AUTHORIZATION SQLITE_OMIT_DEPRECATED SQLITE_OMIT_GET_TABLE 
SQLITE_OMIT_INCRBLOB SQLITE_OMIT_LOOKASIDE SQLITE_OMIT_SHARED_CACHE 
SQLITE_OMIT_UTF16 SQLITE_OMIT_VIRTUALTABLE SQLITE_OMIT_WAL SQLITE_OS_WIN 
SQLITE_SYSTEM_MALLOC VDBE_PROFILE_OFF  WINDOWS_PHONE NDEBUG"

What is important is to compile without "SQLITE_DEBUG", cos pFile.fs.Name 
throws that exception

Original comment by mixa...@gmail.com on 18 Jun 2012 at 2:48

GoogleCodeExporter commented 9 years ago
This issue was closed by revision b4d8154ddca8.

Original comment by noah.hart@gmail.com on 20 Jun 2012 at 10:54

GoogleCodeExporter commented 9 years ago
What is important is to compile without "SQLITE_DEBUG"
too important!I test this bug for hole day!

Original comment by knightlu...@gmail.com on 23 Jun 2012 at 1:16