starik222 / BooruDatasetTagManager

MIT License
1.39k stars 123 forks source link

[BUG] Crash when preview window open and settings window closing (v2.1.0) #115

Closed jojje closed 7 months ago

jojje commented 7 months ago

To reproduce:

  1. Ensure: Settings > UI > Image preview location = Separate window
  2. File > Load Folder
  3. Select an image and open the preview window (CTRL+P)
  4. Open Settings > Settings... and click Cancel or Save.

Instant crash

************** Exception Text **************
System.ArgumentException: Parameter is not valid.
   at System.Drawing.Image.get_Width()
   at System.Drawing.Image.get_Size()
   at System.Windows.Forms.PictureBox.ImageRectangleFromSizeMode(PictureBoxSizeMode mode)
   at System.Windows.Forms.PictureBox.OnPaint(PaintEventArgs pe)
   at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
   at System.Windows.Forms.Control.WmPaint(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, WM msg, IntPtr wparam, IntPtr lparam)
starik222 commented 7 months ago

Fixed in 2.1.1