<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">Hi Marcel,<br><div dir="ltr"><br></div><div dir="ltr"><br><blockquote type="cite">On Nov 14, 2022, at 5:17 AM, Marcel Taeumel <marcel.taeumel@hpi.de> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><span><div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000;text-align: left" dir="ltr">
                                        Hi Nicolas --<div><br></div><div>Hmm... we haven't touched that win32 platform graphics code in many years. It was not necessary to get that high-dpi stuff working.</div></div></span></div></blockquote><div><br></div>That’s not true.  There are lots of differences between the branch I use for Virtend (the branch is called “virtend”) and the tip.  And I can confirm that the virtend branch, built using the clang/MSVC tool chain, works fine and does not crash.<div><br></div><div>Just check out the virtend branch and look for yourself.</div><div><br><blockquote type="cite"><div dir="ltr"><span><div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000;text-align: left" dir="ltr"><div><br></div><div>Here are primitives you can try to disable:</div><div><br></div><div>DisplayScreen >> #forceDisplayUpdate (prim 231)</div><div>DisplayScreen class >> #actualScreenScaleFactor (prim #primitiveScreenScaleFactor)</div><div>DisplayScreen >> #primitiveDeferUpdates: (prim 126) -- graphics will flicker then</div><div>DisplayScreen >> #primShowRect... (prim 127) + #primRetryShowRect... (prim 127)</div><div><br></div><div>Maybe this helps. My GDI objects are stable at about 20.</div><div><br></div><div>Best,</div><div>Marcel</div><div><br></div><div class="mb_sig"></div>
                                        <blockquote class="history_container" type="cite" style="border-left-style: solid;border-width: 1px;margin-top: 20px;margin-left: 0px;padding-left: 10px;min-width: 500px">
                        <p style="color: #AAAAAA; margin-top: 10px;">Am 14.11.2022 14:00:44 schrieb Nicolas Cellier <nicolas.cellier.aka.nice@gmail.com>:</p><div style="font-family:Arial,Helvetica,sans-serif"> Hi Marcel,
<br>I understand that the bug is not so widespread, or it would be yet fixed.
<br>Still, the bug exists, I consistently reach the 10,000 GDI object limit
<br>quite fast (about 45 objects per second).
<br>Could it be revealed only in some specific image configuration?
<br>I mostly use updated old images, rather than freshly distributed...
<br>Or could it be some OS/hardware configuration?
<br>I'm on an old windows 10 version (1909) and use a dual screen (laptop +
<br>external monitor).
<br>
<br>And Tobias, I don't think that ostracizing every contributor making a
<br>mistake (if it really is one) is the best idea.
<br>The only way I know to not make a mistake at all is to not program at all.
<br>So no, we won't revoke your license, sorry, you have to keep on programming
<br>;)
<br>I already made the fix, but I guessed wrong, it did not solve the leak...
<br>
<br>Nicolas
<br>
<br>Le lun. 14 nov. 2022 à 13:43, Marcel Taeumel <marcel.taeumel@hpi.de> a
<br>écrit :
<br>
<br>>
<br>> Hi all --
<br>>
<br>> I cannot even see a crash or a growth in GDI objects in a recent OSVM
<br>> build:
<br>>
<br>> OS: Win32 10.0 X64
<br>> VM: 2022*1109*0631 (5a9222cd1)
<br>> SQ: Squeak6.0 #22114 (64 bit)
<br>>
<br>> OS: Win32 10.0 X64
<br>> VM: 2022*1109*0631 (5a9222cd1)
<br>> SQ: Squeak6.1alpha #22271 (64 bit)
<br>>
<br>> Then I tried Windows 11, all looks fine. Except that the primitive still
<br>> reports "Win32 10.0 X64" for some reason...
<br>>
<br>>     OS: Win32 10.0 X64 ... win11
<br>>     VM: 2022*0602*1410 (c9fd365)
<br>>     SQ: Squeak6.0 #22114 (64 bit)
<br>>
<br>>     OS: Win32 10.0 X64 ... win11
<br>>     VM: 2022*1109*0631 (5a9222c)
<br>>     SQ: Squeak6.0 #22114 (64 bit)
<br>>
<br>>     OS: Win32 10.0 X64 ... win11
<br>>     VM: 2022*0602*1410 (c9fd365)
<br>>     SQ: Squeak6.1alpha #22271 (64 bit)
<br>>
<br>>     OS: Win32 10.0 X64 ... win11
<br>>     VM: 2022*1109*0631 (5a9222c)
<br>>     SQ: Squeak6.1alpha #22271 (64 bit)
<br>>
<br>> ... so ... who can reproduce this issue where?
<br>>
<br>> Best,
<br>> Marcel
<br>>
<br>>
<br>> Am 14.11.2022 12:59:40 schrieb Marcel Taeumel <marcel.taeumel@hpi.de>:
<br>> Hi Tobias --
<br>>
<br>> There is no leak of GDI objects on my machine. Squeak 6.0 VMs seem to be
<br>> fine... Please let us clarify this issue first.
<br>>
<br>> Best,
<br>> Marcel
<br>>
<br>> Am 14.11.2022 12:57:17 schrieb Tobias Pape <das.linux@gmx.de>:
<br>>
<br>> Maybe someone can revoke my C-license?
<br>> It's the second time I introduced a Leak with the DPI stuff -.-
<br>>
<br>> > On 14. Nov 2022, at 12:13, Nicolas Cellier wrote:
<br>> >
<br>> > Hmm, maybe a clue:
<br>> >
<br>> > static double getDpiSystem(void)
<br>> > {
<br>> > return (double) GetDeviceCaps(GetWindowDC(stWindow), LOGPIXELSY);
<br>> > }
<br>> >
<br>> > shouldn't there be a ReleaseDC here ?
<br>>
<br>> Probably. I didn't know that this stuff acquired something, but is makes
<br>> sense.
<br>> Shall I or do you want?
<br>>
<br>> -T
<br>>
<br>> >
<br>> > Le lun. 14 nov. 2022 à 12:10, Nicolas Cellier a écrit :
<br>> > I confirm that it is a GDI LEAK.
<br>> > If I display the number of GDI objects in the task manager, I see that
<br>> the number grows up to 10,000 at which time the image hangs...
<br>> >
<br>> > Le lun. 14 nov. 2022 à 11:24, Nicolas Cellier a écrit :
<br>> > Sorry, for shorten message, continued below...
<br>> >
<br>> > Le lun. 14 nov. 2022 à 11:18, Nicolas Cellier a écrit :
<br>> > Hi all,
<br>> > as Eliot already reported in October, after a few minutes, the 64bits
<br>> image locks up on windows.
<br>> > The console reports an error from within ioShowDisplay
<br>> >
<br>> > SetDIBitsToDevice failed (0)
<br>> > width=1364,height=757,bits=7FF7471D68E8,dc=FFFFFFFF9D010B72
<br>> >
<br>> > then several other gdi calls start to fail, like
<br>> >
<br>> > CreateCursor failed (0)
<br>> >
<br>> > a bit further, SetDIBitsToDevice failed (8), the error message concerns
<br>> >
<br>> > The error message a bit further is about insufficient memory resources
<br>> to perform the SetDIBitsToDevice
<br>> >
<br>> > If I open an image, leave it alone, and observe the Squeak.exe process
<br>> in TaskManager, I clearly see a memory leak.
<br>> > The error happens after about 15 or 16Mbytes increase.
<br>> > So we should track the origin of un-released resources, and the problem
<br>> will then probably vanish.
<br>> >
<br>> > For now, it's a show-stopper for me.
<br>> >
<br>> > Nicolas
<br>>
<br>>
<br>>
<br><div dir="ltr"><div>Hi Marcel,</div><div>I understand that the bug is not so widespread, or it would be yet fixed.</div><div>Still, the bug exists, I consistently reach the 10,000 GDI object limit quite fast (about 45 objects per second).<br></div><div><div>Could it be revealed only in some specific image configuration?</div><div>I mostly use 
<br><span class="gmail-Lm gmail-ng"> updated</span>
<br>
<br>old images, rather than freshly distributed...</div><div>Or could it be some OS/hardware configuration?</div><div>I'm on an old windows 10 version (1909) and use a dual screen (laptop + external monitor).<br></div><div><br></div><div>And Tobias, I don't think that ostracizing every contributor making a mistake (if it really is one) is the best idea.</div><div>The only way I know to not make a mistake at all is to not program at all.</div><div>So no, we won't revoke your license, sorry, you have to keep on programming ;)</div><div>I already made the fix, but I guessed wrong, it did not solve the leak...<br></div><div><br></div><div>Nicolas<br></div>
<br>
<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le lun. 14 nov. 2022 à 13:43, Marcel Taeumel <<a href="mailto:marcel.taeumel@hpi.de">marcel.taeumel@hpi.de</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex;border-left: 1px solid rgb(204,204,204);padding-left: 1ex;min-width: 500px"> <div id="m_5981096374278712538__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: rgb(0,0,0);text-align: left" dir="ltr">
<br>                                        Hi all --<div><br></div><div>I cannot even see a crash or a growth in GDI objects in a recent OSVM build:</div><div><br></div><div><div><span style="font-size: 13.3333px"><span style="white-space:pre-wrap">    </span>OS: Win32 10.0 X64</span></div><div><span style="font-size: 13.3333px"><span style="white-space:pre-wrap">       </span>VM: 2022<b>1109</b>0631 (5a9222cd1)</span></div><div><span style="font-size: 13.3333px"><span style="white-space:pre-wrap">  </span>SQ: Squeak6.0 #22114 (64 bit)</span></div></div><div><span style="font-size: 13.3333px"><br></span></div><div><div><div><span style="white-space:pre-wrap">    </span>OS: Win32 10.0 X64</div><div><span style="white-space:pre-wrap">       </span>VM: 2022<b>1109</b>0631 (5a9222cd1)</div><div><span style="white-space:pre-wrap">  </span>SQ: Squeak6.1alpha #22271 (64 bit)</div></div></div><div><br></div><div><span style="font-size: 13.3333px">Then I tried Windows 11, all looks fine. Except that the primitive still reports "Win32 10.0 X64" for some reason...</span></div><div><span style="font-size: 13.3333px"><br></span></div><div><div><span style="font-size: 13.3333px">    OS: Win32 10.0 X64 ... win11</span></div><div><span style="font-size: 13.3333px">    VM: 2022<b>0602</b>1410 (c9fd365)</span></div><div><span style="font-size: 13.3333px">    SQ: Squeak6.0 #22114 (64 bit)</span></div><div><span style="font-size: 13.3333px"><br></span></div><div><span style="font-size: 13.3333px">    OS: Win32 10.0 X64 ... win11</span></div><div><span style="font-size: 13.3333px">    VM: 2022<b>1109</b>0631 (5a9222c)</span></div><div><span style="font-size: 13.3333px">    SQ: Squeak6.0 #22114 (64 bit)</span></div><div><span style="font-size: 13.3333px"><br></span></div><div><span style="font-size: 13.3333px">    OS: Win32 10.0 X64 ... win11</span></div><div><span style="font-size: 13.3333px">    VM: 2022<b>0602</b>1410 (c9fd365)</span></div><div><span style="font-size: 13.3333px">    SQ: Squeak6.1alpha #22271 (64 bit)</span></div><div><span style="font-size: 13.3333px"><br></span></div><div><span style="font-size: 13.3333px">    OS: Win32 10.0 X64 ... win11</span></div><div><span style="font-size: 13.3333px">    VM: 2022<b>1109</b>0631 (5a9222c)</span></div><div><span style="font-size: 13.3333px">    SQ: Squeak6.1alpha #22271 (64 bit)</span></div><div><span style="font-size: 13.3333px"><br></span></div><div><span style="font-size: 13.3333px">... so ... who can reproduce this issue where?</span></div><div><span style="font-size: 13.3333px"><br></span></div><div><span style="font-size: 13.3333px">Best,</span></div><div><span style="font-size: 13.3333px">Marcel</span></div></div><div><span style="font-size: 13.3333px"><br></span></div><div><span style="font-size: 13.3333px"><br></span></div><div></div>
<br>                                        <blockquote type="cite" style="border-left-style: solid;border-width: 1px;margin-top: 20px;margin-left: 0px;padding-left: 10px;min-width: 500px">
<br>                        <p style="color:rgb(170,170,170);margin-top:10px">Am 14.11.2022 12:59:40 schrieb Marcel Taeumel <<a href="mailto:marcel.taeumel@hpi.de" target="_blank">marcel.taeumel@hpi.de</a>>:</p><div style="font-family:Arial,Helvetica,sans-serif"><div id="m_5981096374278712538__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: rgb(0,0,0);text-align: left" dir="ltr">
<br>                                        Hi Tobias --<div><br></div><div>There is no leak of GDI objects on my machine. Squeak 6.0 VMs seem to be fine... Please let us clarify this issue first.</div><div><br></div><div>Best,</div><div>Marcel</div><div></div><blockquote type="cite" style="border-left-style: solid;border-width: 1px;margin-top: 20px;margin-left: 0px;padding-left: 10px;min-width: 500px">
<br>                        <p style="color:rgb(170,170,170);margin-top:10px">Am 14.11.2022 12:57:17 schrieb Tobias Pape <<a href="mailto:das.linux@gmx.de" target="_blank">das.linux@gmx.de</a>>:</p><div style="font-family:Arial,Helvetica,sans-serif"> <br>Maybe someone can revoke my C-license?<br>It's the second time I introduced a Leak with the DPI stuff -.-<br><br>> On 14. Nov 2022, at 12:13, Nicolas Cellier <u></u> wrote:<br>> <br>> Hmm, maybe a clue:<br>> <br>>     static double getDpiSystem(void)<br>>     {<br>>          return (double) GetDeviceCaps(GetWindowDC(stWindow), LOGPIXELSY);<br>>     } <br>> <br>> shouldn't there be a ReleaseDC here ?<br><br>Probably. I didn't know that this stuff acquired something, but is makes sense.<br>Shall I or do you want?<br><br>     -T<br><br>> <br>> Le lun. 14 nov. 2022 à 12:10, Nicolas Cellier <u></u> a écrit :<br>> I confirm that it is a GDI LEAK.<br>> If I display the number of GDI objects in the task manager, I see that the number grows up to 10,000 at which time the image hangs...<br>> <br>> Le lun. 14 nov. 2022 à 11:24, Nicolas Cellier <u></u> a écrit :<br>> Sorry, for shorten message, continued below...<br>> <br>> Le lun. 14 nov. 2022 à 11:18, Nicolas Cellier <u></u> a écrit :<br>> Hi all,<br>> as Eliot already reported in October, after a few minutes, the 64bits image locks up on windows.<br>> The console reports an error from within ioShowDisplay<br>> <br>>     SetDIBitsToDevice failed (0)<br>>     width=1364,height=757,bits=7FF7471D68E8,dc=FFFFFFFF9D010B72<br>> <br>> then several other gdi calls start to fail, like<br>> <br>>     CreateCursor failed (0)<br>> <br>> a bit further, SetDIBitsToDevice failed (8), the error message concerns <br>> <br>>  The error message a bit further is about insufficient memory resources to perform the SetDIBitsToDevice<br>> <br>> If I open an image, leave it alone, and observe the Squeak.exe process in TaskManager, I clearly see a memory leak.<br>> The error happens after about 15 or 16Mbytes increase.<br>> So we should track the origin of un-released resources, and the problem will then probably vanish.<br>> <br>> For now, it's a show-stopper for me.<br>> <br>> Nicolas<br><br><br><u></u><u></u><u></u><u></u></div></blockquote>
<br>                                        </div></div></blockquote></div></blockquote></div>
<br></das.linux@gmx.de></marcel.taeumel@hpi.de></marcel.taeumel@hpi.de></div></blockquote></div></span></div></blockquote></div></body></html>