Jump to content

dummzeuch

Members
  • Content Count

    2634
  • Joined

  • Last visited

  • Days Won

    91

Everything posted by dummzeuch

  1. dummzeuch

    Filter Exception causing debugger errors

    Sorry, my fault, it's not the exception address (the one where it occurred) but the address which caused the exception.
  2. dummzeuch

    Filter Exception causing debugger errors

    I tried your code too, but it didn't work (Delphi 10.2.3) The ExceptionAddress was always 0. I'll go with Mahdi Safsafi's code. That worked, for 64 bits as well as 32 bits. But thanks anyway. Every hint is appreciated.
  3. dummzeuch

    Filter Exception causing debugger errors

    This does work, thanks a lot. Now I only need a readable way to add this to the code...
  4. dummzeuch

    Filter Exception causing debugger errors

    Thanks for the hints @Mahdi Safsafi and @Kas Ob.. I got it to display the exception address so far and changed the exception name to EAccessViolation. It's too late in the evening to get more work done, but I'll try to get the rest of the information too. It works for the Win32 only IDEs so far, but FDebugEvent is not available for later IDEs, so I need a different way to get the ExceptionInformation array contents for those. Of course the same applies to other hardware exceptions.
  5. dummzeuch

    Filter Exception causing debugger errors

    You have a point there. I just reverted my change with the constants and added them as comments only.
  6. dummzeuch

    Grep search empty window with 10.4.1

    I might have fixed this in the current sources. But since I have never seen this problem, I can't test it. If it works, the fix was to set StyleElements to [] to the form and all components, so the form doesn't get partially themed. This looked ugly anyway and caused some drawing problems on top of that. If you think that's an eye sore, you are probably right, but I prefer the form to work over having it look "pretty".
  7. dummzeuch

    Filter Exception causing debugger errors

    The problem(s) should now be fixed. @Stefan Glienke
  8. dummzeuch

    Filter Exception causing debugger errors

    @Stefan Glienke
  9. dummzeuch

    Filter Exception causing debugger errors

    Thanks for that. One question that I wanted to ask for a while: What do those "magic numbers" mean: $0EEDFAE6 $0EEDFAE4 $0EEDFADE I googled them and found that the last two are declared as constants in system.pas: const cNonDelphiException = $0EEDFAE4; cDelphiException = $0EEDFADE; Oddly enough the first one does not occur in system.pas, Google found it only once (Warning: This URL might not be save! It should go to a file TXLib.h which is part of "TX Library is a tiny 2D graphics library for MS Windows written in C++. This is a small sandbox for the very beginners to help them to learn basic programming principles. The documentation is in Russian." Copyright: (C) Ded (Ilya Dedinsky, http://txlib.ru) <mail@txlib.ru>" but the repository on Sourceforge to which txlib.ru links contains a different TXLib.h file.) #define EXCEPTION_CPP_BORLAND_BUILDER 0x0EEDFAE6 // Should never occur here <<<--- here #define EXCEPTION_CPP_BORLAND_DELPHI 0x0EEDFADE // Should never occur here So I guess $0EEDFAE6 is an exception number that Delphi / C++ Builder use internally. Am I right? So I could declare them as constants for readability: const cNonDelphiException = $0EEDFAE4; cCppBuilderException = $0EEDFAE6; cDelphiException = $0EEDFADE;
  10. dummzeuch

    Filter Exception causing debugger errors

    That's because I haven't decided yet how to use this information. I definitely want to.
  11. dummzeuch

    Filter Exception causing debugger errors

    Thanks that seems to fix the problem. Unfortunately when debugging GExperts itself, this still throws the exception Stefan mentioned. Apparently that's by design: The problem you see with Win64 is caused by the fix. Otherwise this would result in Project GExpertsRS102.exe raised exception class EDbkError with message 'Debug process not initialized'. in the call: Process.ReadProcessMemory(Address, SizeOf(Result), Result); No idea yet, how to solve this.
  12. dummzeuch

    Filter Exception causing debugger errors

    Is this in a particular Delphi version or in several?
  13. dummzeuch

    On the use of Interposers

    It's the same with email programs: 30 years ago, every Fidonet reader / editor (but in particular GoldEd) was able to follow specific reply threads in echo and netmail. I know of no email program today that does this properly. (Yet another branch -> down Fidonet memory lane. 😉 ) And don't get me started on quoting.
  14. dummzeuch

    Strange text effect

    Yes, I know. The problem is that the fix for 10.4 Patch 3 must also be applied to 10.4.1. For that to work, it must detect whether either of those is installed. The released DLL doesn't do that yet, but the current source code does.
  15. Regarding Find-methods: I always make them return a boolean. If I need the index too, I make that an additional out parameter. If it gets too much hassle to always pass a dummy variable, I overload that method with one that does it for me and declare it inline: function TBla.Find(const _Key: TSomeType; out _Data: TSomeOtherType): Boolean; overload; inline; var Idx: Integer; begin Result := Find(_Key, _Data, Idx); end;
  16. --------------------------- Delphi 10.4: bds.exe - Entry Point Not Found --------------------------- The procedure entry point @Deskform@TDesktopForm@AdjustLastLoadedBounds$qqrv could not be located in the dynamic link library D:\source\_Sourceforge\GExperts\Binaries\GExpertsRS104.dll. --------------------------- I just got this error when I tried to load the GExperts DLL compiled with Delphi 10.4.1 into Delphi 10.4(.0). This is probably related to the problems many have experienced when loading IDE desktops that include docked forms from older plugins. Solution: Either get the last GExperts version released for Delphi 10.4, or compile your own DLL using Delphi 10.4.
  17. Personally I see nothing wrong with using exit there. I usually add a comment to it to make it more visible. procedure SaveData2(aID: Integer; const aName: string); var i: Integer; vNewData: TDataRec; begin for i := Low(Data) to High(Data) do if Data[i].DataID = aID then begin Data[i].DataName := aName; Exit; //==> end; // Save new Data rec, if ID not found // ... end; (But people have criticized me for adding that comment.) Of course purists will tell you that exit is just a goto in disguise and that "everybody knows that "goto is considered harmful".
  18. dummzeuch

    Grep search empty window with 10.4.1

    Hm interesting. Is your Grep results window docked or undocked? I just tried it (but not with a project group but a single project) and got a different effect: The background of the results window is black. Switching to a different tab in the history list fixes that. But then other strange effects happened: The history list all of a sudden displayed the match list rather than the history. Something seems to mess with the controls or the handles in that dialog. (My bet is on the theming of the IDE.)
  19. Have you checked the map provider's license terms? Map data is usually not free. OpenStreetMap is free, but there are of course still conditions. If you have an internet connection, you can download our rendered tiles from there. You need to calculate the right coordinates, construct the download URLs, download the tiles and display them. It's not rocket science, but also not as easy as it sounds. We use an internally developed map component, which can display data from various sources (including OpenStreetMap). Developing that definitely wasn't simple. Be prepared to learn a lot about different geographical coordinate systems. Probably more than you ever wanted to know. Also, rendering map data in a way that looks nice is not simple. Our component is still far from looking nice. Using pre-rendered tiles makes that a lot easier.
  20. dummzeuch

    Grep search empty window with 10.4.1

    Are you using the new DLL for 10.4.1 ?
  21. dummzeuch

    Grep search empty window with 10.4.1

    Not that I am aware of.
  22. The usual way to get version information for a file goes like this: type TEXEVersionData = record CompanyName, FileDescription, FileVersion, InternalName, LegalCopyRight, LegalTradeMarks, OriginalFilename, ProductName, ProductVersion, Comments, PrivateBuild, SpecialBuild: string; end; function TCustomFileInfo.ReadVersionData: TEXEVersionData; type PLandCodepage = ^TLandCodepage; TLandCodepage = record wLanguage, wCodePage: Word; end; var Dummy: Cardinal; Len: Cardinal; Buf: array of Byte; pntr: Pointer; lang: string; begin Len := GetFileVersionInfoSize(PChar(Filename), Dummy); if Len = 0 then RaiseLastOSError; SetLength(Buf, Len); if not GetFileVersionInfo(PChar(Filename), 0, Len, @Buf[0]) then RaiseLastOSError; if not VerQueryValue(Buf, '\VarFileInfo\Translation\', pntr, Len) then RaiseLastOSError; lang := Format('%.4x%.4x', [PLandCodepage(pntr)^.wLanguage, PLandCodepage(pntr)^.wCodePage]); if VerQueryValue(@Buf[0], PChar('\StringFileInfo\' + lang + '\CompanyName'), pntr, Len) { and (@len <> nil)} then Result.CompanyName := PChar(pntr); if VerQueryValue(@Buf[0], PChar('\StringFileInfo\' + lang + '\FileDescription'), pntr, Len) { and (@len <> nil)} then Result.FileDescription := PChar(pntr); if VerQueryValue(@Buf[0], PChar('\StringFileInfo\' + lang + '\FileVersion'), pntr, Len) { and (@len <> nil)} then Result.FileVersion := PChar(pntr); if VerQueryValue(@Buf[0], PChar('\StringFileInfo\' + lang + '\InternalName'), pntr, Len) { and (@len <> nil)} then Result.InternalName := PChar(pntr); if VerQueryValue(@Buf[0], PChar('\StringFileInfo\' + lang + '\LegalCopyright'), pntr, Len) { and (@len <> nil)} then Result.LegalCopyRight := PChar(pntr); if VerQueryValue(@Buf[0], PChar('\StringFileInfo\' + lang + '\LegalTrademarks'), pntr, Len) { and (@len <> nil)} then Result.LegalTradeMarks := PChar(pntr); if VerQueryValue(@Buf[0], PChar('\StringFileInfo\' + lang + '\OriginalFileName'), pntr, Len) { and (@len <> nil)} then Result.OriginalFilename := PChar(pntr); if VerQueryValue(@Buf[0], PChar('\StringFileInfo\' + lang + '\ProductName'), pntr, Len) { and (@len <> nil)} then Result.ProductName := PChar(pntr); if VerQueryValue(@Buf[0], PChar('\StringFileInfo\' + lang + '\ProductVersion'), pntr, Len) { and (@len <> nil)} then Result.ProductVersion := PChar(pntr); if VerQueryValue(@Buf[0], PChar('\StringFileInfo\' + lang + '\Comments'), pntr, Len) { and (@len <> nil)} then Result.Comments := PChar(pntr); if VerQueryValue(@Buf[0], PChar('\StringFileInfo\' + lang + '\PrivateBuild'), pntr, Len) { and (@len <> nil)} then Result.PrivateBuild := PChar(pntr); if VerQueryValue(@Buf[0], PChar('\StringFileInfo\' + lang + '\SpecialBuild'), pntr, Len) { and (@len <> nil)} then Result.SpecialBuild := PChar(pntr); end; (This is based on http://stackoverflow.com/a/5539411/49925 ) This only handles the case of known strings. But you can put any additional strings into it, e.g.: LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_US 1 VERSIONINFO LOADONCALL MOVEABLE DISCARDABLE IMPURE FILEVERSION 1, 3, 6, 577 PRODUCTVERSION 1, 3, 6, 577 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK FILEOS VOS__WINDOWS32 FILETYPE VFT_APP { BLOCK "StringFileInfo" { BLOCK "040904E4" { VALUE "CompanyName", "dummzeuch.de\000" VALUE "FileDescription", "dzlib PrepBuild commandline and IDE prebuild tool\000" VALUE "FileVersion", "1.3.6.577\000" VALUE "InternalName", "PrepBuild\000" VALUE "LegalCopyright", "Copyright 2002-2020 by Thomas Mueller\000" VALUE "LegalTrademarks", "\000" VALUE "OriginalFilename", "PrepBuild.exe\000" VALUE "ProductName", "PrepBuild\000" VALUE "ProductVersion", "2020-05-31\000" VALUE "Comments", "<svn range=\"87:92\" modified=\"yes\" url=\"https://svn.osdn.net/svnroot/dzprepbuild/trunk\" />\000" VALUE "Revision", "\000" VALUE "BuildDateTime", "2020-05-31\000" } } BLOCK "VarFileInfo" { VALUE "Translation", 1033, 1252 } } This contains two additional strings: Revision (which is empty) and BuildDateTime. There could be many more. But, how do I get these strings without knowing their name? VerQueryValue requires me to pass it the name of the string I want to read, so that's not a solution.
  23. dummzeuch

    How do get all strings from a version resource

    There are some odd entries in the resources of BDS.EXE and BDS.fr: And some other executables do not have proper version info: So they do not display anything when read the usual way (like e.g. in the Properties dialog in Windows). Older Delphi versions still refer to Appmethod in the translations (this is XE8): (I definitely had too much time on my hands today. 😉
  24. dummzeuch

    How do get all strings from a version resource

    Got it to work. Now the GExperts PEInfo tool also shows all strings in all languages stored in the version info resource which includes the non-standard once like BuildDateTime:
  25. But it would probably also fail. As long as I don't know what causes this it's pointless to try.
×