pubpub-zz / ppInk

Fork from Gink
MIT License
842 stars 76 forks source link

ppInk always crashes on closing the toolbar #219

Closed gitfvb closed 1 year ago

gitfvb commented 2 years ago

On the first start everything is fine with ppInk, but on the following starts closing the toolbar always crashes the application with this error. I am using Win11, do you have an idea?

---------------------------
UIThreadException
---------------------------
UIThreadException

version 1.8.3.19170 built on 15/08/2022 10:38

Oops, ppInk crashed! Please include the following information if you plan to contact the developers (a copy of the following information is stored in crash.txt in the application folder):

Überlauffehler.

Stack Trace:

   bei System.Drawing.Graphics.CheckErrorStatus(Int32 status)
   bei System.Drawing.Graphics.FillPath(Brush brush, GraphicsPath path)
   bei gInk.FormDisplay.UpdateFormDisplay(Boolean draw, Boolean prepared) in E:\ppink.src\ppInk\src\FormDisplay.cs:Zeile 1134.
   bei gInk.FormDisplay.timer1_Tick(Object sender, EventArgs e) in E:\ppink.src\ppInk\src\FormDisplay.cs:Zeile 1326.
   bei System.Windows.Forms.Timer.OnTick(EventArgs e)
   bei System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
   bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

!!! Do you want to Quit ?
---------------------------
Ja   Nein   
---------------------------
pubpub-zz commented 2 years ago

Hi @gitfvb, I have two thoughts: a) Are you using multiple screen ? did you appy the procedure to prevent the issue with multiple screen resuoltion, here quoted:

There is a known issue for multiple displays of unmatched DPI settings (100%, 125%, 150%, etc.). If you use ppInk on a computer with multiple displays of unmatched DPI settings, or you encounter problems such as incorrect snapshot position, unable to drag toolbar to locations etc., please do the following as a workaround (in Windows 10 version 1903 as an example): right-click ppInk.exe, Properties, Compatibility, Change high DPI settings, Enable override high DPI scaling behavior scaling performed by: Application.

b) You may be facing the same issue as the in reported in #199. I've proposed a patch but had no time to publish it yet. Can you try this beta version: https://github.com/pubpub-zz/ppInk/issues/199#issuecomment-1272567569

Give me your feedbacks

gitfvb commented 2 years ago

Thanks @pubpub-zz, I haven't found a setting for compatibility and only have one screen... BUT that new version from the linked comment works like a charm. No issues found yet. I am only missing a button for changing the background, but that's maybe something I haven't found yet. So thank you for the quick support :-)

pubpub-zz commented 2 years ago

Do not hesitate to start the project if you enjoy it 😊