Jump to content

aehimself

Members
  • Content Count

    1085
  • Joined

  • Last visited

  • Days Won

    23

Everything posted by aehimself

  1. @mvanrijnen Did you find an effective way to debug this? My application started to do the same, with a similar call stack in the offending thread: It's important to note that this thread is not a worker of mine, I don't know what or when it was created. It also safely can be killed and won't cause any (noticable) disturbances. I also couldn't find a way to reproduce the issue, one time it just thinks it's time and then it locks up.
  2. In my experience when timing can cause errors it always can be tracked back to incorrect thread data / UI access. - Instead of just one critical section have one for each of your properties and enter / leave in every getter and setter. - Make sure none of your thread accesses any UI elements directly (e.g. Form1.Memo1.Text) - Make sure that every callback what your thread has is properly synchronized - A dialog IS a part of the VCL thread. Do not show any dialog boxes in any threads!
  3. Like we all never said “it works on my machine” 😄
  4. aehimself

    Delphi 12 is available

    Because Win7 is the upgrade of XP on kiosks and built-in devices. If even say ATMs.
  5. <Sarcasm> Considering the pricetag on Delphi they might still be saving for it xD </Sarcasm>
  6. We upgraded to Delphi 11.2 at work a few weeks before 11.3 came out and using it ever since. We have at least 15 3rd party components installed, plus our own ones derived from those. The only IDE error we have is the occasional “internal error” which can be avoided by using Shift-F9. While the quality of LSP in Delphi 11 was questionable indeed I still strongly disagree with you on this. Delphi 11 really did not suffer from any other major defects.
  7. aehimself

    PPPoW simply for Delphi XE Starter

    I'm not entirely sure if that is the case but what I understood you want to write your own program to communicate with (and maybe to control) said thremostat. To do that you'll either have to have the full protocol description used (which the manufacturer can provide) OR you have to reverse-engineer it by yourself. Be warned though - reverse-engineering even a part of a propriatery solution might be completely forbidden by the EULA and / or your regional law so make sure you are permitted to do so. If you can and would like to proceeed you don't need any Delphi application for that; just install Wireshark and connect with your PC program. That will give you enough hints to start.
  8. aehimself

    Thread Destroy with no corresponding Thread Create?

    If you have FreeOnTerminate := True and you call .Free, you can have 2 destructors but one will raise an AV as you are .Free.ing the StringStream instead of FreeAndNil.
  9. Hello, I have an application which utilizes DimPanels. A couple of days ago I was notified that there are some buttons barely visible; however they are supposed to be on a solid background. The issue is, something is being drawn different when the application is executed in an RDP window. Locally I receive a solid form while through RDP everything is transparent, revealing the component underneath: Attached is the minimum test case... it simply creates a DimPanel on the form and embeds an empty frame into it. The solution is rather easy: enable ParentBackground in the DimPanel or disable ParentBackground on the frame. My question is; does anyone know why drawing differs? DimPanelTest.7z
  10. aehimself

    Delphi 12 VCL painting differs through RDP

    Talking about the small program I attached; it is not present in the code or in the DFM - you are right about that. That means it is using the default, which is False for DoubleBuffering. At least this is how I believe it should work.
  11. aehimself

    Delphi 12 VCL painting differs through RDP

    Aaaaand jackpot! Adding Application.SingleBufferingInRemoteSessions := False solves the issue for good, no more dimmed memo is visible through RDP! The only question which I have remaining - if DoubleBuffered is false everywhere in the test application, how come enforcing single buffering makes a difference? Shouldn't that be the default, if .DoubleBuffered is false on the form and on the frame?
  12. aehimself

    Delphi 12 VCL painting differs through RDP

    Even if DoubleBuffered is on for the frame and the form, and Application.SingleBufferingInRemoteSessions is true, I still see the memo in the test application if I execute it in an RDP window. No, double buffering seems to have no effect on this particular issue.
  13. aehimself

    Delphi 12 VCL painting differs through RDP

    Interesting read! Do I understand it correctly that if you do NOT override anything, themed and un-themed controls do not use double buffering (even if set in object inspector) if a remote session is detected? If yes, it means we can completely exclude double buffering as a potentional suspect for this particular issue. But, it actually reminded me to also note: the issue only appears on the system (Windows) style. If any custom style is selected, the frame (panel?) will become solid again.
  14. aehimself

    Delphi 12 VCL painting differs through RDP

    Double buffering is a valid point as it's turned on in my main application. It is however is off in the test program, and unfortunately enabling it (and changing DoubleBufferedMode) doesn't change the behaviour.
  15. aehimself

    Delphi 12 VCL painting differs through RDP

    Logging on to the same machine with the console session does not reproduce the issue. Also, I doubt RDP is at fault, as it only affects Delphi 12 binaries.
  16. aehimself

    Delphi 12 VCL painting differs through RDP

    Confirmed. When building the same project with Delphi 11.2 the panel shows up solid, so this seems to be a Delphi 12 "issue". ...but why only through RDP? Edit: updated topic title
  17. aehimself

    Delphi 12 VCL painting differs through RDP

    Well that’s something I didn’t think of as a possible root cause, that’s why I did not mention that I am using D12 to compile. I tried on remote Windows 10 and Server 2019, both behaved the same way. I’ll check with some earlier Delphi versions.
  18. aehimself

    Delphi 12 VCL painting differs through RDP

    Settings are the highest possible as I was testing it on a local VM where connection speed isn't an issue. While the idea is good, disabling bitmap caching did not solve the issue. What I am really interested of is that in DimPanel I am not calling inherited in the overridden Paint method. How come ParentBackground has any actual effect...? Probably some weird window message to set the color, I don't know...
  19. aehimself

    Typo in TWMDPI record in Delphi 10 Seattle ?

    It seems the typo was not very long lived. Delphi 10 Seattle Delphi 10.1 Berlin Update 2
  20. aehimself

    pdf417

    The Wikipedia page @Lajos Juhász linked clearly explains you cannot use anything else other that a..z and A..Z: As for UTF8 that is used in PDF documents, which is not the same as the barcode format.
  21. aehimself

    Free profiler?

    That's a good thing!
  22. aehimself

    GetWindowHandle + Ctrl V

    The component itself already heavily relies on generics and other quality-of-life improvements later versions brought so as it is no, it won't compile. However, the base principle is SendInput and an array of TInput records which should be present / can easily be imported in D7. Since it does nothing else but translating your string into TInputs and call the WinApi method, with a little bit of work invested (which I was too lazy to do so) yes, it should work just fine.
  23. aehimself

    GetWindowHandle + Ctrl V

    In the past I had an application which imitated keypresses to type text to any field in any application using SendInput. Later the typing logic has been extracted and is now accessible as TAEVirtualKeyboard for generic unicode or TAEVirtualEnUsKeyboard for forced EN-US keyboard layouts. The backdraw is, for this to work the window and the input field has to have focus. It might be a good starting point still, though.
  24. aehimself

    Gitlab-ci & MSBUILD & Library path

    As an alternate, the path where this file is attempted to be loaed from can be changed in Program Files\Embarcadero\Studio\xx\bin\Codegear.Common.Targets inside the PropertyGroup tag. This is what we ended up using on Azure DevOps at work: Be careful, though. Changing these to a static path will result all users on the same machine to use the very same environment.proj and/or envoptions.proj. This might be, or might not be wanted.
  25. Importing an other 3rd party library seems to be a huge overkill just to use a simple mutex. I have the following code in my .dpr file before any form creations: handle := CreateMutex(nil, True, 'MyAppName'); Try If (handle = 0) Or (GetLastError = ERROR_ALREADY_EXISTS) Then Begin // TMessageDialog.ShowDialog('Only one instance can be running at a time!', dtError); handle := FindWindow('TMyApplicationMainForm', nil); If IsWindow(handle) Then Begin ShowWindow(handle, SW_RESTORE And SW_SHOW); SetForegroundWindow(handle); SetFocus(handle); End; Exit; End; // Form creations, initialization, run here originally from .dpr Finally CloseHandle(handle); End; Works like a charm, and you only need WinApi.Windows.
×