Re: [mono-android] 'this' is null / null reference exception

2012-07-27 Thread Jonathan Pryor
On Jul 27, 2012, at 12:36 PM, Matthew Leibowitz wrote: > Just a thought, it could be a result of the android gc clearing static > variables. > > I noticed this sometimes happens on lower end devices or after a memory > intensive activity. There's the little matter of how this would happen. Da

Re: [mono-android] 'this' is null / null reference exception

2012-07-27 Thread Matthew Leibowitz
Just a thought, it could be a result of the android gc clearing static variables. I noticed this sometimes happens on lower end devices or after a memory intensive activity. On Jul 27, 2012 6:16 PM, "Jonathan Pryor" wrote: > On Jun 25, 2012, at 6:49 AM, keith wrote: > > I have been getting rand

Re: [mono-android] 'this' is null / null reference exception

2012-07-27 Thread Jonathan Pryor
On Jun 25, 2012, at 6:49 AM, keith wrote: > I have been getting random null reference exceptions in my app when running > on lower end devices (galaxy ace in this case), but not on a desire s or > emulators. There are two things to check. 1. Check the Android Debug Log for process startup messa

Re: [mono-android] 'this' is null / null reference exception

2012-06-25 Thread Keith Raven
Hi Matthew Just to update that I have tested out your suggestion but sadly without success (although I can see how it could solve a number of issues like this). Any other suggestions welcome…. Just to add I have had this issue using mono for android 4.1.2 - 4.2.3 . thanks Keith Keith Raven

Re: [mono-android] 'this' is null / null reference exception

2012-06-25 Thread Keith Raven
Hi Matthew, Thanks for you quick response. Regardless of the following I like your suggestion as it seems like a good safe way to store global static type variables. I'm not sure in my case this is going to solve the issue (although hopefully I'm wrong). The reason being (apologies for not p

Re: [mono-android] 'this' is null / null reference exception

2012-06-25 Thread Matthew Leibowitz
Hi, What may be the problem is that Android is destroying you singleton class. Android does not ensure that static classes/members will keep their values. On lower end devices, the garbage collector is obviously working hard to keep memory usage at a minimum. If you wish to do something like this

[mono-android] 'this' is null / null reference exception

2012-06-25 Thread keith
Hi I have been getting random null reference exceptions in my app when running on lower end devices (galaxy ace in this case), but not on a desire s or emulators. They mostly seem to be in and around my data access to sqlite (using sqlite-net) although I haven't been able to pin point them to any