Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented May 1, 2020

Purpose

[SYSDM]

  • When closing System Properties page, log show
    (win32ss/user/ntuser/windc.c:749) err: [00060138] GetDC() without ReleaseDC()!
    because GetDC() is called (multiple times) without properly calling ReleaseDC() as required in order to releases a device context.
  • This module also lacks some error management in case null DC are provided (on error)
  • LiveCD Userinit, based on SYSDM is affected too

[DESK]

  • Fix missing ReleaseDC related to the spectrum (color depth)

Proposed changes

  • ReleaseDC() added
  • Error management in case of null DC
  • Overall alignement of LiveCD Userinit and SYSDM

@ghost
Copy link
Author

ghost commented May 1, 2020

Thanks @katahiromz for your comments. I've also pushed some refactoring to further improve error management.

@ghost ghost changed the title [SYSDM] Fix GetDC/ReleaseDC error management [SYSDM][DESK] Fix GetDC/ReleaseDC error management May 1, 2020
@binarymaster binarymaster added the refactoring For refactoring changes. label May 1, 2020
@ghost
Copy link
Author

ghost commented May 1, 2020

I've added LiveCD Userinit, which is based on SYSDM.

Ready for review.

katahiromz pushed a commit that referenced this pull request May 2, 2020
GetDC() is called without properly calling ReleaseDC() as required in order to releases a device context. Similar to #2707
@ghost
Copy link
Author

ghost commented May 2, 2020

All comments taken into account.
Ready for next round of review.

@ghost
Copy link
Author

ghost commented May 2, 2020

Thank you @SergeGautherie for your review. Unless I did something wrong all your comments should be included in last commit.

@ghost
Copy link
Author

ghost commented May 3, 2020

@SergeGautherie : Comments included and justification of design proposed. Regarding hSpectrum, Git did not proposed that I could reply but if GetDC fails to provide hSpectrumDC it's better to exit the OnBPPChanged without further effect, in order to be a consistent mode (prior to change) rather than half way the code processing, with execution of other instructions over a NULL context.

@ghost ghost requested a review from HBelusca May 3, 2020 10:14
@ghost ghost requested a review from HBelusca May 3, 2020 11:54
@ghost
Copy link
Author

ghost commented May 5, 2020

@HBelusca : Do you still have comments based on the last changes i've made ? Or are you OK to approve ?

@ghost
Copy link
Author

ghost commented May 7, 2020

@binarymaster : Please set the "bug fix" label too for the ReleaseDC part.
OK for approval & merge now that all comments are integrated and tested ?

@HBelusca HBelusca merged commit d635ce0 into reactos:master May 7, 2020
@ghost
Copy link
Author

ghost commented May 7, 2020

Thanks !

@ghost ghost deleted the systdmgetdc branch May 7, 2020 11:26
@binarymaster binarymaster added the bugfix For bugfix PRs. label May 7, 2020
JoachimHenze added a commit that referenced this pull request Feb 1, 2021
This fixes a regression with the AlphaBlending on single left-click
on the ros logo in general tab.
That regression was introduced by
0.4.15-dev-178-g d635ce0

So it can be seen as an addendum to (#2707).

We luckily did not have any affected releases yet.
JoachimHenze added a commit that referenced this pull request Jul 5, 2021
Fix missing ReleaseDC related to the spectrum (color depth)

We leaked one device context for each bpp change within the
desk.cpl-session, which gave the following logging when closing desk.cpl:
(win32ss/user/ntuser/windc.c:749) err: [00060138] GetDC() without ReleaseDC()!
1 time for each leak.

Partial backport of (#2707)
Fix picked from 0.4.15-dev-2867-g d635ce0
JoachimHenze added a commit that referenced this pull request Jul 5, 2021
Fix missing ReleaseDC related to the spectrum (color depth)

We leaked one device context for each bpp change within the
desk.cpl-session, which gave the following logging when closing desk.cpl:
(win32ss/user/ntuser/windc.c:749) err: [00060138] GetDC() without ReleaseDC()!
1 time for each leak.

Partial backport of (#2707)
Fix picked from 0.4.15-dev-2867-g d635ce0
JoachimHenze added a commit that referenced this pull request Jul 5, 2021
Fix missing ReleaseDC related to the spectrum (color depth)

We leaked one device context for each bpp change within the
desk.cpl-session, which gave the following logging when closing desk.cpl:
(win32ss/user/ntuser/windc.c:749) err: [00060138] GetDC() without ReleaseDC()!
1 time for each leak.

Partial backport of (#2707)
Fix picked from 0.4.15-dev-2867-g d635ce0
JoachimHenze added a commit that referenced this pull request Jul 5, 2021
Fix missing ReleaseDC related to the spectrum (color depth)

We leaked one device context for each bpp change within the
desk.cpl-session, which gave the following logging when closing desk.cpl:
(win32ss/user/ntuser/windc.c:749) err: [00060138] GetDC() without ReleaseDC()!
1 time for each leak.

Partial backport of (#2707)
Fix picked from 0.4.15-dev-2867-g d635ce0
JoachimHenze added a commit that referenced this pull request Jul 5, 2021
Fix missing ReleaseDC related to the spectrum (color depth)

We leaked one device context for each bpp change within the
desk.cpl-session, which gave the following logging when closing desk.cpl:
(win32ss/user/ntuser/windc.c:749) err: [00060138] GetDC() without ReleaseDC()!
1 time for each leak.

Partial backport of (#2707)
Fix picked from 0.4.15-dev-2867-g d635ce0
JoachimHenze added a commit that referenced this pull request Jul 5, 2021
Fix missing ReleaseDC related to the spectrum (color depth)

We leaked one device context for each bpp change within the
desk.cpl-session, which gave the following logging when closing desk.cpl:
(win32ss/user/ntuser/windc.c:749) err: [00060138] GetDC() without ReleaseDC()!
1 time for each leak.

Partial backport of (#2707)
Fix picked from 0.4.15-dev-2867-g d635ce0
JoachimHenze added a commit that referenced this pull request Jul 5, 2021
Fix missing ReleaseDC related to the spectrum (color depth)

We leaked one device context for each bpp change within the
desk.cpl-session, which gave the following logging when closing desk.cpl:
(win32ss/user/ntuser/windc.c:749) err: [00060138] GetDC() without ReleaseDC()!
1 time for each leak.

Partial backport of (#2707)
Fix picked from 0.4.15-dev-2867-g d635ce0
JoachimHenze added a commit that referenced this pull request Jul 5, 2021
Fix missing ReleaseDC related to the spectrum (color depth)

We leaked one device context for each bpp change within the
desk.cpl-session, which gave the following logging when closing desk.cpl:
(win32ss/user/ntuser/windc.c:749) err: [00060138] GetDC() without ReleaseDC()!
1 time for each leak.

Partial backport of (#2707)
Fix picked from 0.4.15-dev-2867-g d635ce0
vgalnt pushed a commit to vgalnt/reactos that referenced this pull request Feb 4, 2025
GetDC() is called without properly calling ReleaseDC() as required in order to releases a device context. Similar to reactos#2707
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix For bugfix PRs. refactoring For refactoring changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants