BUG: Editor crashes when monitor turned off

Started by roltemurto, Today at 10:39:57 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

roltemurto

Hello again WillLem,

Sorry for bombarding the forum board lately, but I got a new bug report.
Below I am attaching the .NET Framework error pop-up. The log file doesn't have anything up to date.
This happened after I turned my monitor off for an hour (at least this is what I am suspecting of what caused it).
When I turned it back on these errors were popped up;

Instead of this dialog box, JIT debugging would be invoked
For more details, see the end of this message.

************** Exception Text **************
System.InvalidOperationException: Bitmap region is already locked.
at: System.Drawing.Bitmap.LockBits(Rectangle rect, ImageLockMode flags, PixelFormat format, BitmapData bitmapData)
at: System.Drawing.Bitmap.LockBits(Rectangle rect, ImageLockMode flags, PixelFormat format)
at: SLXEditor.BmpModify.DrawOn(Bitmap origBmp, Bitmap newBmp, Point pos, Func`3 doDrawThisPixel, Byte alpha)
at: SLXEditor.BmpModify.DrawOn(Bitmap origBmp, Bitmap newBmp)
at: SLXEditor.Renderer.CreateLevelImageFromLayers(String dragNewPieceKey)
at: SLXEditor.Renderer.CombineLayers(String dragNewPieceKey)
at: SLXEditor.SLXEditForm.ResetLevelImage()
at: SLXEditor.SLXEditForm.NLEditForm_Resize(Object sender, EventArgs e)
at: System.EventHandler.Invoke(Object sender, EventArgs e)
at: System.Windows.Forms.Control.OnResize(EventArgs e)
at: System.Windows.Forms.Form.OnResize(EventArgs e)
at: System.Windows.Forms.Control.OnSizeChanged(EventArgs e)
at: System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight)
at: System.Windows.Forms.Control.UpdateBounds()
at: System.Windows.Forms.Control.WmWindowPosChanged(Message& m)
at: System.Windows.Forms.Control.WndProc(Message& m)
at: System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at: System.Windows.Forms.ContainerControl.WndProc(Message& m)
at: System.Windows.Forms.Form.WmWindowPosChanged(Message& m)
at: System.Windows.Forms.Form.WndProc(Message& m)
at: System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at: System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at: System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4515.0 built by: NET48REL1LAST_C
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll

SLXEditor
Assembly Version: 3.0.3.0
Win32 Version: 3.0.3.0
CodeBase: file:///X:/YEKELEMELER/OYUN/Lemmings/NeoLemmix_V12.14.0/SuperLemmix%203.0.2/SLXEditor.exe

System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4550.0 built by: NET48REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

System
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4536.0 built by: NET48REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll

System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4390.0 built by: NET48REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4590.0 built by: NET48REL1LAST_B
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll

System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4190.0 built by: NET48REL1LAST_B
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4084.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll

Accessibility
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4084.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll

mscorlib.resources
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4084.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_tr_b77a5c561934e089/mscorlib.resources.dll

System.Drawing.resources
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4084.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing.resources/v4.0_4.0.0.0_tr_b03f5f7f11d50a3a/System.Drawing.resources.dll

System.Windows.Forms.resources
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4084.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_tr_b77a5c561934e089/System.Windows.Forms.resources.dll

************** JIT Debugging **************
To enable JIT debugging, the jitDebugging value must be set in the
system.windows.forms section of the application's or machine's (machine.config)
.config file. The application must also be compiled with debugging
enabled.

For example:
<configuration> <system.windows.forms jitDebugging="true" /> </configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than being handled in this dialog box.

Luckily the editor DID allow me to save the map before exiting.
The reason I'm suspecting the monitor is due to the fact that I am using displayport for connection and I believe this connection causes resolution change during turn off and wake up.

WillLem

It appears to have been triggered by the form resizing. Your instincts are likely correct: if the resolution change occurs on wake, that could trigger a form resize.

Not sure exactly why the exception occurred though. Maybe more resolution-specific guards need to be in place.

Good to know that no data was lost, that's fortunate.