[mono-android] Mono.Data.Sqlite "Database disk image is malformed" error
Hello, I'm starting to see more "Database disk image is malformed" errors than I'm comfortable with explaining away as "one of those things". I'm using Mono for Android 4.4.54. The app data layer has been running on the platform for two years and has been very reliable. Now I'm seeing these errors every "now and then" (eg. one user per week out of a few hundred). The app reads and writes to the database on a background thread, as well as on the main thread - this has always been the case. Looking at the Sqlite docs, I *think* they're saying that at the application level you can't cause this sort of corruption - http://www.sqlite.org/lockingv3.html#how_to_corrupt Recovering data in these cases is possible sometimes. But I'm more concerned about why the error is suddenly appearing. Anybody seen this sort of thing? Any tips or advice? Thanks, Andy ___ Monodroid mailing list Monodroid@lists.ximian.com UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid
Re: [mono-android] factory.Inflate issue
hey bro in a case like this where you are calling runonuithread a lot, I would, for readability, pass to named function instead of delegate. This really improves readability. On Wed, May 15, 2013 at 1:02 PM, Paul Johnson wrote: > Hi, > > I have some code that generates the UI on the fly. The first time it runs, > it runs a treat. However when I run it again or add something to the top > view, things get messed up (the objects that need to be inflated become > *tiny* at the top but the last object is the correct size) > > My code to do this is this > > if (clearFirst) > { > RunOnUiThread(delegate { > topListLayout.**RemoveAllViewsInLayout(); > bottomListLayout.**RemoveAllViewsInLayout(); > }); > } > > if (myCircles.Count == 0) > { > > myView = factory.Inflate(Resource.**Layout.circleaddFragment, > null); > LinearLayout shell = new LinearLayout(context); > > shell.Orientation = Orientation.Horizontal; > shell.SetGravity(GravityFlags.**CenterVertical); > shell.LayoutParameters = new LinearLayout.LayoutParams(** > LinearLayout.LayoutParams.**WrapContent, LinearLayout.LayoutParams.** > WrapContent); > shell.SetPadding(0, 0, 0, > (int)GeneralUtils.**convertDpToPixel(5f, > context)); > > ImageView circleAdd = myView.FindViewById** > (Resource.Id.imageCircleAdd); > circleAdd.Click += (object sender, EventArgs e) => > createCircle(sender, e); > RunOnUiThread(() => shell.AddView(myView)); > RunOnUiThread(()=>**topListLayout.AddView(shell)); > } > else > { > RunOnUiThread(delegate { > > LinearLayout topLay = new LinearLayout(context); > topLay.LayoutParameters = new > LinearLayout.LayoutParams(**ViewGroup.LayoutParams.**WrapContent, > ViewGroup.LayoutParams.**WrapContent); > > topLay.SetPadding((int)**GeneralUtils.convertDpToPixel(**5f, context), 0, > (int)GeneralUtils.**convertDpToPixel(5f, context), 0); > foreach (Circles circle in myCircles) > { > myView = factory.Inflate(Resource.**Layout.circleFragment, > null); > > TextView txtCirc = myView.FindViewById(** > Resource.Id.textCircleName); > > txtCirc.Text = myCircles[count].ShortName; > ImageView imgCirc = myView.FindViewById > **(Resource.Id.imageCircle); > int m = new int(); > m = count; > imgCirc.Tag = m; > imgCirc.Click += displayMyCircle; > > topLay.AddView(myView); > if (count == myCircles.Count || topLay.ChildCount == 3) > { > topListLayout.AddView(topLay); > topLay = new LinearLayout(context); > topLay.Orientation = Android.Widget.Orientation.** > Horizontal; > topLay.SetGravity(**GravityFlags.CenterHorizontal) > **; > } > count++; > } > myView = > factory.Inflate(Resource.**Layout.circleaddFragment, > null); > TextView txtCircAdd = myView.FindViewById(** > Resource.Id.textCircleName); > txtCircAdd.Text = GeneralUtils.StringFromInt(** > Resource.String.circleAdd); > ImageView imgCircAdd = myView.FindViewById* > *(Resource.Id.imageCircleAdd); > imgCircAdd.Click += createCircle; > topLay.AddView(myView); > topListLayout.AddView(topLay); > }); > } > > RunOnUiThread(delegate { > count = 0; > > LinearLayout botLay = new LinearLayout(context); > botLay.LayoutParameters = new LinearLayout.LayoutParams(** > ViewGroup.LayoutParams.**WrapContent, ViewGroup.LayoutParams.** > WrapContent); > > botLay.SetPadding((int)**GeneralUtils.convertDpToPixel(**5f, context), 0, > (int)GeneralUtils.**convertDpToPixel(5f, context), 0); > foreach (Circles circle in OClientData.CirclesList) > { > myView = factory.Inflate(Resource.**Layout.circleFragment, > null); > TextView txtCirc = myView.FindViewById(** > Resource.Id.textCircleName); > > txtCirc.Text = OClientData.CirclesList[count]** > .ShortName; > ImageView imgCirc = myView.FindViewById** > (Resource.Id.imageCircle); > int m = new int(); > m = count; > imgCirc.Tag = m; > imgCirc.Click += displayPublicCircle; > > botLay.Ad
Re: [mono-android] Unit Testing for MonoDroid
Hi Sebastian, Could you please let me know if it is possible to run it with emulator and/ir physical device? Also, I want to ask how to run it withou VS, using only scripts, do you use mstest or custom runner? Thanks, Alex -- View this message in context: http://mono-for-android.1047100.n5.nabble.com/Unit-Testing-for-MonoDroid-tp5710844p5713316.html Sent from the Mono for Android mailing list archive at Nabble.com. ___ Monodroid mailing list Monodroid@lists.ximian.com UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid
Re: [mono-android] Mono.Data.Sqlite "Database disk image is malformed" error
On May 14, 2013, at 5:23 PM, Andrew Sinclair wrote: > The app data layer has been running on the platform for two years and has > been very reliable. Does your application have armeabi-v7a support? (See Project Properties > Supported architectures.) Two years ago the default CPU architecture for Mono for Android apps was armeabi (armv5). The armeabi ABI does not have any support for SMP systems. Most hardware released today is multi-core, and thus _requires_ armeabiv-v7a in order to run safely. If your app is only including the armeabi runtime, you will see "bizarre" behavior on multicore devices because you're using a non-SMP-safe runtime on an SMP machine. (Using C# `lock` won't help here, as the locks themselves won't work properly, because the targeted CPU ABI lacks the necessary support to be SMP safe!) http://docs.xamarin.com/guides/android/advanced_topics/cpu_architecture > The app reads and writes to the database on a background thread, as well as > on the main thread - this has always been the case. This is somewhat worrying: http://www.sqlite.org/threadsafe.html _How_ are you writing to the DB between your threads? Do you have a single SqliteConnection instance that you're sharing between threads (bad!), or is each thread creating and using its own SqliteConnection instance (better!)? http://forums.xamarin.com/discussion/comment/11935/#Comment_11935 http://forums.xamarin.com/discussion/comment/1646/#Comment_1646 http://forums.xamarin.com/discussion/549/sqlite-net-and-multiple-threads Thanks, - Jon ___ Monodroid mailing list Monodroid@lists.ximian.com UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid
[mono-android] Missing icon preventing deploy to Play Store
I am trying to upload an apk to the play store, and this is failing with the message "Upload failed You need to add an icon to your APK.". This is a new app and has not been uploaded before. I used aapt.exe to dump the apk's badging and get the following: package: name='foo.MyApp' versionCode='1' versionName='0.1' sdkVersion:'15' targetSdkVersion:'15' application-label:'My Application' application: label='My Application' icon='' application-debuggable launchable-activity: name='foo.myapp.MainActivity' label='Start Screen' icon='res/drawable/icon.png' (identifying details removed and remainder omitted) I'm assuming the icon='' on the third line is the problem. Things I've checked: 1. I _do_ have an icon in Resources/Drawable/Icon.png. It is 72x72x32bit and previews ok. Its build action is Android Resource. 2. In the generated obj/Release/android/AndroidManifest.xml file, the element does _not_ have an android:icon parameter. Other apps have android:icon="@drawable/icon" there. 3. My main activity seems to be attributed correctly: [Activity(MainLauncher=true, Label="@string/Title", Icon="@drawable/Icon", Theme="@android:style/Theme.Holo.Light")] public class MainActivity : Activity { // ... } 4. The app runs correctly in the debugger on the emulator and a Galaxy S2 and the expected icon is displayed. 5. When I sign the app, the console output from jarsigner.exe indicates that res/drawable/icon.png is present in the apk file. 6. I'm using Mono for Android 4.4.55 with VS2010 SP1 on Windows 8 x64. 7. I am able to build/sign/deploy other applications to the play store. I've run out of ideas on this. I'd be very grateful if anyone could suggest possible solutions for this. Thanks, Andy -- View this message in context: http://mono-for-android.1047100.n5.nabble.com/Missing-icon-preventing-deploy-to-Play-Store-tp5713320.html Sent from the Mono for Android mailing list archive at Nabble.com. ___ Monodroid mailing list Monodroid@lists.ximian.com UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid
Re: [mono-android] Missing icon preventing deploy to Play Store
On May 17, 2013, at 10:55 AM, andyjohnson0 wrote: > I am trying to upload an apk to the play store, and this is failing with the > message "Upload failed You need to add an icon to your APK.". Please see the Specify The Application Icon section at: http://docs.xamarin.com/guides/android/deployment%2C_testing%2C_and_metrics/publishing_an_application/part_1_-_preparing_an_application_for_release - Jon ___ Monodroid mailing list Monodroid@lists.ximian.com UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid
Re: [mono-android] Slow Build- und Packaging-Process & few other things after update
I have spoken to our sys-admin and he told me, no e-mails from xamarin has passed our mail-gateway since our last correspondence respectively there are no mails in the spam-filter (he has checked also). Whatever, I will send you an private email which you can use. And there is forsure no spamfilter or something. Please re-send all mails to there. -- View this message in context: http://mono-for-android.1047100.n5.nabble.com/Slow-Build-und-Packaging-Process-few-other-things-after-update-tp5713139p5713322.html Sent from the Mono for Android mailing list archive at Nabble.com. ___ Monodroid mailing list Monodroid@lists.ximian.com UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid
Re: [mono-android] Missing icon preventing deploy to Play Store
Jonathan, Yes, that solved it. Many thanks for the very quick response. Now I actually remember adding that assembly attribute to other projects, but since I don't do Android dev full-time it was a while ago... Is there a reason why the attribute isn't automatically added to Properties/AssemblyInfo.cs when the projects is created? Andy -- View this message in context: http://mono-for-android.1047100.n5.nabble.com/Missing-icon-preventing-deploy-to-Play-Store-tp5713320p5713323.html Sent from the Mono for Android mailing list archive at Nabble.com. ___ Monodroid mailing list Monodroid@lists.ximian.com UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid
Re: [mono-android] Slow Build- und Packaging-Process & few other things after update
On May 17, 2013, at 11:18 AM, JLee wrote: > I have spoken to our sys-admin and he told me, no e-mails from xamarin has > passed our mail-gateway since our last correspondence respectively there are > no mails in the spam-filter (he has checked also). Wat. Xamarin uses Google Apps for Business, so you won't see an MX record from xamarin.com; it'll be from mx.google.com, e.g. from my last message on this thread: Return-Path: Received: from melchior.home (pool-96-253-118-104.rcmdva.fios.verizon.net. [96.253.118.104]) by mx.google.com with ESMTPSA id x14sm4965635qef.5.2013.05.15.19.11.57 for ...and for good measure, immediately after my last email on this thread I had sent you the responses as a private reply to this thread. Apparently you didn't get that email either; if you had... > Whatever, I will send you an private email which you can use. And there is > forsure no spamfilter or something. > > Please re-send all mails to there. ...then you wouldn't be asking me to re-send what I already sent. WTF is going on with email? I also have not yet received a private email from you. I have also sent another message through the support system ("Is this thing on? ..."). - Jon ___ Monodroid mailing list Monodroid@lists.ximian.com UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid
Re: [mono-android] Slow Build- und Packaging-Process & few other things after update
Now, I have received your mail to the private account. The history looks authentic, so I have to apologize. I really thought, you didn't have responsed and are ignoring me. But wtf ist going on, that two e-mail-accounts did fail?! Whatever... I'll read them this evening/weekend and give feedback. I will send my answer from my private account to the last adress you've sent from (successfully). Is that ok? -- View this message in context: http://mono-for-android.1047100.n5.nabble.com/Slow-Build-und-Packaging-Process-few-other-things-after-update-tp5713139p5713325.html Sent from the Mono for Android mailing list archive at Nabble.com. ___ Monodroid mailing list Monodroid@lists.ximian.com UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid
Re: [mono-android] Slow Build- und Packaging-Process & few other things after update
On May 17, 2013, at 12:21 PM, JLee wrote: > Is that ok? That'll be fine. We are also investigating the email sending on our end, but this is very perplexing. - Jon ___ Monodroid mailing list Monodroid@lists.ximian.com UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid