-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NBug] An unexpected internal error occurred in the Win32 call: 80... #9429
Comments
This comment has been minimized.
This comment has been minimized.
1 similar comment
Was a Windows update being installed or a reboot pending? |
Not to my knowledge. This problem is happening on a regular basis. If I leave Git Extensions running overnight or over the weekend, the error happens, and it crashes. It works properly when I start it again, but it’s so annoying to have this happen all the time.
From: Michael Seibt ***@***.***>
Sent: August 2, 2021 1:55 PM
To: gitextensions/gitextensions ***@***.***>
Cc: Rob Holstein ***@***.***>; Author ***@***.***>
Subject: Re: [gitextensions/gitextensions] [NBug] An unexpected internal error occurred in the Win32 call: 80... (#9429)
Was a Windows update being installed or a reboot pending?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#9429 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABGAULB2XQ24LY7JY4INAT3T24AYRANCNFSM5BGYJ3HQ>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>.
|
@luweeewu, @Kableado, @dallf44, could you enable the exception log files (refer to #9166 (comment)) and share them after the next crash, please? |
It did not happen again, but I'll try. |
Git Extensions crashed again last night. Here are the log files as you requested.
One detail to note: When I have my view set to Show all branches, I can leave Git Extensions open for days, and it won’t crash. The crashes seem to happen if I have the view set to Show current branch only.
From: Michael Seibt ***@***.***>
Sent: August 3, 2021 1:50 PM
To: gitextensions/gitextensions ***@***.***>
Cc: Rob Holstein ***@***.***>; Mention ***@***.***>
Subject: Re: [gitextensions/gitextensions] [NBug] An unexpected internal error occurred in the Win32 call: 80... (#9429)
@luweeewu<https://github.com/luweeewu>, @Kableado<https://github.com/Kableado>, @dallf44<https://github.com/dallf44>,
could you enable the exception log files (refer to #9166 (comment)<#9166 (comment)>) and share them after the next crash, please?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#9429 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABGAULBDIL2GJKJW7MEA7EDT3BI75ANCNFSM5BGYJ3HQ>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>.
|
GH removes mail attachments. Could you paste them here? |
GitExtensions.3.5.1.12196.20210806.034820042.log |
Thank you. This will help to track down the issue.
|
I’ve been seeing the GDI objects climb over the last 2 hours or so. It was in the high 2000s when I first looked at it, and it’s now sitting at around 3193. I see it go up and down slightly, but the general trend is up.
|
Are you running the dark theme? |
The number of GDI objects increases on refresh in dark theme also with |
Yes.
From: Igor Velikorossov ***@***.***>
Sent: August 6, 2021 10:43 PM
To: gitextensions/gitextensions ***@***.***>
Cc: Rob Holstein ***@***.***>; Mention ***@***.***>
Subject: Re: [gitextensions/gitextensions] [NBug] An unexpected internal error occurred in the Win32 call: 80... (#9429)
Are you running the dark theme?
-
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#9429 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABGAULGGQWV3XY4ZUYNZSDDT3TBWDANCNFSM5BGYJ3HQ>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>.
|
While I don’t have the avatars visible, I do have the left panel and all toolbars visible.
From: Michael Seibt ***@***.***>
Sent: August 7, 2021 2:24 PM
To: gitextensions/gitextensions ***@***.***>
Cc: Rob Holstein ***@***.***>; Mention ***@***.***>
Subject: Re: [gitextensions/gitextensions] [NBug] An unexpected internal error occurred in the Win32 call: 80... (#9429)
The number of GDI objects increases on refresh in dark theme also with Show all branches and without Left Panel, Build Server Integration, Avatars, Toolbars.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#9429 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABGAULANMIR3DVMBNXHBH2TT3WQA3ANCNFSM5BGYJ3HQ>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>.
|
@NikolayXHD, it seems to be caused by a core functionality. Could you have a look? |
ok, the coming weekend |
I noticed that the number of GDI objects increases when showing all branches in dark mode, but nowhere near as catastrophically as when showing only the current branch. After a couple of days, the number of GDI objects is sitting at just over a couple hundred when showing all branches vs several thousand after a day when showing only the current branch. |
I just had a look at the GDI object count now, and it was up over 59k. This was with leaving it set to show all branches for the entire time since I left a comment yesterday morning. |
I did a quick investigation using GDIVew on the portable version of v3.5.3 With default theme:
With dark theme:
From these numbers, we could clearly see that dark theme is leaking brushes.... Approximately 10 by refresh. /cc @NikolayXHD |
We could have the 'Handle ref' and the 'kernel address' but I don't know if it could help debugging in VS: Edit (from GDIView doc):
|
Spotted maybe another GDI leak: The brushes count increase regularly when scrolling (by 8 or 10 at each page scrolled approximately) Hiding the revision graph when doing a refresh doesn't reduce a lot the the brushes increase so it's possible that we have to main leaks... |
After a little last test, hypothesis that should be verified: Even if hidden, the revision graph is calculated for the commits actually displayed when doing a refresh and so is the same reason why there is a brush leak when doing a refresh. |
Another one I think: Not a clear pattern but it seems to be most of the times 1 brush is leaked when you select a commit from the same author and 3 when from another author (but not always because in rare cases you leak also 3 for the same author). I struggle to know if the option "highlight commits from same author has an impact"... I spent also some time trying to debug the application but without success. If someone has an idea and could have a look now that we know that we leak only brushes with none 'default' theme... |
Were you able to narrow what method result in leaks?
One way of trying to find these is by commenting out code.
|
Thank you for doing the investigation btw.
|
No. I spent most of the time trying to find a pattern that could give me a clue on the piece of code to investigate.
Yes it is a good idea but l didn't want to comment half of GE code 😅 I only spent 30min trying to debug the application (especially revision graph code) but without success. And I don't know when I will be able to give it another try.... |
Haha, you'd be surprised how fast the app can run when you comment code out
;)
|
So, I can see the hard work is done - undoubtedly gdi objects are leaking. When rendering code needs a brush, the one it gets may be a system brush, or a customized newly created brush adjusted for theme settings. Because of that, the code which uses such brushes is not allowed to dispose them - system brushes are not supposed to be disposed. What I plan to do, is return a Disposable brush wrapper, which knows whether the underlying actual brush should be disposed or not. All the brush consuming code will unconditionally call Dispose() on the wrapper. Fill free to object :) |
Please test the portable build in #9566 (currently latest build is https://ci.appveyor.com/project/gitextensions/gitextensions/builds/40747903/artifacts, there may be updates though). |
Current behaviour
Program crashed sometime during the night.
Expected behaviour
Shouldn't crash.
Steps to reproduce
Leave the program running overnight.
Error Details
Additional information
Left the program running overnight.
Environment
The text was updated successfully, but these errors were encountered: