[mono-android] Stacktrace From Developer Console
Jonathan Pryor
jonp at xamarin.com
Sun Jun 3 23:22:47 UTC 2012
On Jun 3, 2012, at 6:37 PM, Fencer04 wrote:
> It seems like sometimes on start the application is crashing. I can't replicate it on any of my test devices and was wondering if someone can help me out. Any help you can give me would be great.
The NullPointerException is coming from mono.MonoPackageManager, which (conveniently!) enough you have on your machine; look in e.g. $(ProjectDir)\obj\Debug\android\src\MonoPackageManager.java.
MonoPackageManager.java:27:
String filesDir = context.getFilesDir ().getAbsolutePath ();
So either `context` is null (highly unlikely), or `context.getFilesDir()` is returning null, which is in fact possible and thus quite probable:
https://github.com/android/platform_frameworks_base/blob/master/core/java/android/app/ContextImpl.java#L642
If this is the case, and you have access to the android debug log, you should see a message such as:
Unable to create files directory /...
The most probable cause is that the user is running out of disk space, though a filesystem permissions issue could be at fault as well.
- Jon
More information about the Monodroid
mailing list