Jump to content

A.M. Hoornweg

Members
  • Content Count

    282
  • Joined

  • Last visited

  • Days Won

    6

A.M. Hoornweg last won the day on March 2

A.M. Hoornweg had the most liked content!

Community Reputation

102 Excellent

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. A.M. Hoornweg

    Debugging problem (multithreaded & Intraweb)

    Unfortunately not, when I do that, the next dialog appears immediately for the next Intraweb unit (there are several hundred). Debugging is just not do-able as long as this dialog keeps popping up.
  2. A.M. Hoornweg

    Find exception location from MAP file?

    This is very interesting, I'll certainly look into this. I'm also currently evaluating Eurekalog.
  3. Hello all, I'm trying to debug a multithreaded application that contains, among other things, the Intraweb framework. I have the Parnassus Parallel debugger installed in my Delphi 10.4.2. Sydney IDE. My problem: whenever I try to set a breakpoint in a multithreaded piece of code of my own, the Delphi debugger immediately complains that it can't find the location of some Intraweb source file. Of course it doesn't, because Intraweb doesn't come with source, so why is it asking? The big problem is that this message is impossible to get rid of. It just keeps coming again and again and I never even get the change to assign the correct thread affinity to my breakpoint. So... How the heck do I tell the Delphi debugger to not keep asking where the Intraweb sources are located?
  4. A.M. Hoornweg

    Find exception location from MAP file?

    Thanks to everybody who responded in this thread. I think I'll acquire Eurekalog or MadExcept for this project. Is any of these two particularly suited for multithreading NT services?
  5. A.M. Hoornweg

    Find exception location from MAP file?

    My service is heavily multi-threaded (see attachment) , has hundreds of threads running which pull data from a multitude of oil rigs. The communication threads use Remobjects Remoting which is also multithreaded. The service itself has a builtin http management console that is based on Intraweb, which is also a multithreaded framework. There is sooo much multithreading going on, can a tool like Eurekalog produce a stack frame if one of these threads produces an AV?
  6. Hello all, one of my (heavily multithreaded) Windows services crashed today with an access violation and Windows was decent enough to write the "fault offset" in the event log. I have a detailed linker MAP file of the application. Does anyone know a tool that will parse the MAP file to help me find the approximate error location in the source?
  7. I think it does. The two searches are not disjoint, so calling StringReplace (shortest word first) would replace "Hut" by "House" and the name "Hutt" would not exist anymore in the second search pass due to this insertion. An approach that starts by scanning the original string for all search terms would reveal two "hits" at the first letter H and then things get interesting, because it would have to decide which replacement is "better". So it needs some rules to make that decision. One rule could be to replace the longest search term.
  8. What I mean is, if you call Embarcadero's stringReplace routine multiple times, then each subsequent replace sees the insertions made by the previous call. But if you write a MultiStringReplace routine that first analyzes the string and determines everything that is to be replaced, that is not the case. It sees only the original string and not the intermediate insertions. The end result may be different.
  9. I am a bit puzzled here. How do you want to guarantee a consistent outcome? The first "search & replace" will change the string. It will remove characters and insert new ones. Which may get captured by the next search. Suppose you have a string like "Jabba the Hutt lived in a Hut" and you want to replace "Hutt" by "Alien" and "Hut" by "House". How do you decide which replacement to do first?
  10. A.M. Hoornweg

    50 Years of Pascal

    Do you mean units? Units only came in Turbo Pascal 4 AFAIK.
  11. I'll do that (create the QP), thank you. (edit) https://quality.embarcadero.com/browse/RSP-33241
  12. To each his own. For single-exe projects it is a non-issue and I wouldn't bother either if my project consisted of only a handful of modules.
  13. I haven't ported the project group from XE to Sydney yet, for now the directive is needed for XE where it applies to all units that the compiler rebuilds. I just wish Embarcadero had optimized RTTI for size from the very beginning and given us the choice wether to use it at all. Having RTTI in your code offers possible attack vectors for reverse engineering etc.
  14. I use a RTTI-stripped version of the XE libraries since ages, because when I migrated from Delphi 2009 to XE my executable sizes also grew a lot. That RTTI stripping is much easier to achieve with XE because the {$RTTI....} directive was still a global option then, so you don't need to patch any source files. Stripping RTTI is now an integral part in my Finalbuilder build scripts. Edit: I have attached an image with the executable sizes. All executables were compiled in "release mode" without any debugging info. All executables were compiled with {$WEAKLINKRTTI ON} and {$RTTI EXPLICIT METHODS([]) PROPERTIES([]) FIELDS([])} in the DPR. (1) Compiled with XE10.4.2 Sydney. (2) As (1), replaced unit "Oleserver" with a dummy unit so no unnecessary VCL code is pulled in. (3) As (2), using a RTTI-Stripped RTL/VCL. (4) Compiled with Delphi XE, replaced unit "Oleserver" with a dummy unit so no unnecessary VCL code is pulled in. (5) As (4), using a RTTI-Stripped RTL/VCL.
  15. Hello all, in my quest to port a very large project -containing dozens of COM DLL's- from Delphi XE to Sydney, the main obstacle for me was the exploding executable size. Each and every DLL in my project group had grown between 1-4 megabytes and that really added up painfully. Most of that growth, of course, is due to the new extended RTTI (which I do not use). The project was already huge before, and a doubling or tripling in size would cause deployment problems (the software is used on oil wells on remote locations and bandwidth is often costly and slow). Trying to strip off some MB's wherever I could, I started studying the MAP files to make sure no unnecessary stuff was linked in. I noticed that all of my non-visual COM DLL's nevertheless pull in huge chunks of the visual VCL, including units VCL.Forms, VCL.Themes, VCL.Imagelist etc. I am absolutely sure that I don't use these routines anywhere and still they make up over 60% of the executable's code! The underlying cause is that all of the xxxx_TLB.PAS files, which the IDE auto-generates, use a unit called OleServer which has an initialization section. No code in the unit itself is called, but the initialization section manages to pull in most of the VCL for whatever reason. As a test, I made a dummy unit "oleserver.pas" and referenced it as the first file in my COM DLL applications. The project compiled fine, and this change alone instantly reduced executable size with a whopping 1 MB. And the best thing, the project still worked as expected. So it seems to me that this whole OleServer unit is an unnecessary thing in my projects. Another thing. When I link my projects against a "stripped" version of the RTL/VCL (recompiled without extended RTTI), the size difference becomes astronomic. My DLL's have now typically lost 80% of their size, going from 2MB+ to only 400kb. With these executable size reductions I am finally able to port this project to Delphi Sydney. I am in the process of writing a tool to automate the "rtti stripping" of the RTL/VCL which I plan to release as open source. For example, projects like "inno setup" might benefit from it.
×