mgillespie Posted September 24, 2006 Share Posted September 24, 2006 Chose not to save changes, got the following exception. This text file was created because Paint.NET crashed. Please e-mail this file to paint.net@hotmail.com so we can diagnose and fix the problem. Application version: Paint.NET v3.0 (Milestone 2 Release build 3.0.2458.3150) Time of crash: 24/09/2006 22:27:32 Application uptime: 00:00:42.7343750 OS Version: 6.0.5728.0 Service Pack 0, v.3 --- Exception while populating osType: System.ArgumentException: Enum underlying type and the object must be same type or object must be a String. Type passed in was 'System.Byte'; the enum underlying type was 'System.Int32'. at System.Enum.IsDefined(Type enumType, Object value) at PaintDotNet.SystemLayer.OS.get_Type() at PaintDotNet.Startup.UnhandledException(Exception ex) x86 .NET Framework version: 2.0.50727.128 x86 Processor: 1x Intel® Pentium® M processor 1.86GHz Physical memory: 1021 MB Exception details: System.ApplicationException: ThreadBackgroundMode() object must be manually Disposed() at PaintDotNet.SystemLayer.ThreadBackgroundMode.Finalize() ------------------------------------------------------------------------------ Quote Link to comment Share on other sites More sharing options...
mgillespie Posted September 24, 2006 Author Share Posted September 24, 2006 Should have said, running Vista, noticed the t PaintDotNet.SystemLayer.OS.get_Type() Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted September 24, 2006 Share Posted September 24, 2006 Woops, two simple bugs there. The first is not Vista related: I was calling Enum.IsDefined(Type, object) and providing a byte value (OSVERIONINFOEX.wProductType) instead of first casting to an int or OSType value (OSType is an enumeration whos underlying type is int, aka System.Int32). ThreadBackgroundMode shouldn't crash like that. I'll look into that as well. As a side note, I find it interesting that OSVERSIONINFOEX.wProductType is a byte and not a word -- I double checked the docs and that is indeed what it is. Weird. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.