GitOffice/csharp-sqlite

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

Closed this issue · 0 comments

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