[Mono-osx] [MonoMac] Random casting related crashes
Geoff Norton
gnorton at novell.com
Wed Mar 9 12:31:36 EST 2011
Could you please make a test case and file a bug so I can take a look?
Thanks
-g
On 2011-03-09, at 11:58 AM, Mattiello Joseph wrote:
> Over the course of testing a new app written with a MonoMac GUI we've been experiencing sporadic crashes apparently related to invalid type casting. We haven't been able to pin point an exact source so I'm curious if others have experienced the same issue or have any thoughts.
>
> This has been occurring over the course of a couple of months and we regularly update our libs Mono from binary releases and MonoMac from git.
>
> Some examples:
> #1 & #2 are in event loops and get fired very frequently and only a handful of crashes have been reported, so the occurrences are somewhat rare but often enough to be of concern.
>
> 1)
>
> NSEventMask mask = NSEventMask.AnyEvent;
> NSApplication app = NSApplication.SharedApplication;
>
> NSEvent evt = app.NextEvent(mask, NSDate.DistantPast, NSRunLoop.NSDefaultRunLoopMode, true);
> Exception Source: MonoMac
> Exception Type: System.InvalidCastException
> Exception Target Site: NSApplication.NextEvent
> Exception Message: Cannot cast from source type to destination type.
> Exception Data: none
>
> --[ Stack Trace ]------------
> MonoMac.AppKit.NSApplication.NextEvent(NSEventMask mask, NSDate expiration, String mode, Boolean deqFlag)
>
> 2)
>
> NSApplication.SharedApplication.NextEvent(NSEventMask.AnyEvent,
> NSDate.FromTimeIntervalSinceNow((double)wait / 1000.0),
> NSRunLoop.NSDefaultRunLoopMode,
> false);
>
> Exception Source: MonoMac
> Exception Type: System.InvalidCastException
> Exception Target Site: NSDate.FromTimeIntervalSinceNow
> Exception Message: Cannot cast from source type to destination type.
> Exception Data: none
>
> --[ Stack Trace ]------------
> MonoMac.Foundation.NSDate.FromTimeIntervalSinceNow(Double secs)
>
> 3)
> foreach (string path in NSWorkspace.SharedWorkspace.MountedLocalVolumePaths)
>
> Exception Source: MonoMac
> Exception Type: System.InvalidCastException
> Exception Target Site: NSWorkspace.get_NotificationCenter
> Exception Message: Cannot cast from source type to destination type.
> Exception Data: none
>
> --[ Stack Trace ]------------
> MonoMac.AppKit.NSWorkspace.get_NotificationCenter()
>
> Thanks for any feedback
> -Joe
> _______________________________________________
> Mono-osx mailing list
> Mono-osx at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-osx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-osx/attachments/20110309/267239c1/attachment.html
More information about the Mono-osx
mailing list