[mono-android] The program 'Mono' has exited with code 255 (0xff).

John Rayner anyerr at gmail.com
Mon Mar 28 17:38:40 EDT 2011


I recently found an issue where you can't successfully deserialize an object
if it derives from JavaObject.  The deserialization process does not
actually run the constructor and so does not properly fill in the Java
Handle field.  Might this apply to your situation?

HTH,
John

On Mon, Mar 28, 2011 at 10:33 PM, Sam Lippert <SamL at itrgroupinc.com> wrote:

> >Can you describe when your code is crashing?
> Usually after NullReferenceExceptions that inconsistently show up, even on
> objects that I've made sure are _not_ null.
>
> >Do you dynamically remove and add views in the same activity?
> No, but I do use the same activity type multiple times and attach views to
> it before exiting OnCreate()
>
> >manipulate multiple objects in memory in one action?
> Loads... I think there's a part of my application where we deserialize a
> list of over 6000 objects, parse them /all/, and display them in a ListView.
>
> >use attributes extensively?
> Yeah, especially in serialization. I have a bug filed right now that I'm
> working around: https://bugzilla.novell.com/show_bug.cgi?id=673151
>
> Have you also tried disabling linking (
> http://mono-android.net/index.php?title=Documentation/Linking -> Linker
> Behavior) in your application and all of its class libraries?
>
> Thanks,
> Sam Lippert
>
> -----Original Message-----
> From: monodroid-bounces at lists.ximian.com [mailto:
> monodroid-bounces at lists.ximian.com] On Behalf Of Amir Waldman
> Sent: Monday, March 28, 2011 4:11 PM
> To: monodroid at lists.ximian.com
> Subject: Re: [mono-android] The program 'Mono' has exited with code 255
> (0xff).
>
> It's running Android 2.2 so that can't be the problem.
>
> I wish I could zip my project. Unfortunately this is production code which
> is too complex anyway. I don't know where to begin with reproducing these
> errors in a sample project.
>
> I guess we're having similar problems here. Can you describe when your code
> is crashing? Do you dynamically remove and add views in the same activity,
> manipulate multiple objects in memory in one action or use attributes
> extensively?
>
>
> Thanks for sharing,
> Amir
>
>
>
> -----Original Message-----
> From: monodroid-bounces at lists.ximian.com
> [mailto:monodroid-bounces at lists.ximian.com] On Behalf Of Sam Lippert
> Sent: Monday, March 28, 2011 5:00 PM
> To: monodroid at lists.ximian.com
> Subject: Re: [mono-android] The program 'Mono' has exited with code 255
> (0xff).
>
> If your Galaxy S is running Android 2.1, Samsung shipped the base image
> with a buggy kernel that doesn't play nice with m4a. Getting an upgrade to
> Android 2.2 is about the only fix for that problem... or using a different
> device. :p
>
> Though if that isn't the issue, I've been having similar problems, and have
> been struggling to put together a repro project for the dev team. If the
> above issue isn't what you're running into, could you zip up your project
> and attach it to a bug report?
>
> Thanks,
> Sam Lippert
>
> -----Original Message-----
> From: monodroid-bounces at lists.ximian.com
> [mailto:monodroid-bounces at lists.ximian.com] On Behalf Of Amir Waldman
> Sent: Saturday, March 26, 2011 3:47 PM
> To: monodroid at lists.ximian.com
> Subject: [mono-android] The program 'Mono' has exited with code 255 (0xff).
>
> Lately, I've started testing my code and I'm seeing Mono for Android
> crashing too many times without a warning.
>
> Scenario: I click on buttons many times till the application crashes. No
> exception is caught!
>
> Visual Studio's Output window shows:
> In mgmain JNI_OnLoad
> ...
> The program 'Mono' has exited with code 255 (0xff).
>
>
>
> While trying to locate the so called bugs in the '...' lines that I
> removed, I couldn't find anything wrong. There are many calls that change
> properties of objects stored in memory.
>
> Can you try and help what is wrong here?
>
> 1) The code is dynamically removing and adding Android views to the same
> activity (is that wrong in Mono/Android terms?)
> 2) The code changes many 'Text' properties of C# objects stored in memory.
> This for example is a result of translating them to another language after
> they've been loaded.
>
> To sums things up, I get the feeling that I'm either doing something
> generally wrong (for example, working extensively with one Activity), or
> there's some instability with the way Mono for Android handles memory.
>
> One last thing, I'm running the same code on a PC and everything works
> perfectly well. I checked Android's CPU and memory usage before this
> happens. CPU is not stressed at all, and memory usage is about 25MB which on
> my device reached up to 50MB without crashing before.
>
> Samsung Galaxy S , Preview 14.
>
> Thank you for your comments!
>
> Amir
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________
> _______________________________________________
> Monodroid mailing list
> Monodroid at lists.ximian.com
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/mailman/private/monodroid/attachments/20110328/c0b263e7/attachment.html 


More information about the Monodroid mailing list