The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,854 other subscribers

Archive for the ‘Delphi’ Category

Bug Finder, A Real Win32 Extensible Passive Debugger – CodeProject

Posted by jpluimers on 2020/04/09

On my research list is [WayBack] GitHub – DareDevil73/bug-finder: Windows passive debugger.  with an article at [WayBack] Bug Finder, A Real Win32 Extensible Passive Debugger – CodeProject:

The Bug Finder is a real Win32 debugger, entirely written in Borland Delphi, which analyzes your application execution flow, so you can:

  1. Catch exceptions on the main executable, external DLLs, primary and working threads.
  2. Produce a detailed stack trace about each exception.
  3. Place a symbolic breakpoint to get, in place of a program debug break, a full stack trace log message (dynamic tracing).
  4. Produce detailed and rotative log files for a batch application behaviour inspection.
  5. Capture output of OutputDebugString API to log file (to provide extra debugging information by yourself directly into your code).
  6. Trace Process, Threads and DLLs activities.

I found documentation at [WayBackDareDevil73 … docs, but the binary dependencies and installer are on SourceForge (where the project was originally located) and CodeProject which cannot be archived so I will look into that when it pops to the top of my research list.

–jeroen

via: [WayBack] Bug Finder by Antonio Petricca (in 2013?) Have any of you tried it? – Lars Fosdal – Google+

Posted in Delphi, Development, Software Development, Windows Development | Leave a Comment »

Delphi: OldCreateOrder in inherited TDataModule might suddenly become True

Posted by jpluimers on 2020/04/08

Interesting observation that might have been in Delphi for more than a decade: [WayBack] Found something strange in Delphi again which I’ve been trying to fix for days until I discovered it’s probably a Delphi issue… – Stefaan Lesage – Google+.

I think the summary is that if you have inherited TDataModule instances, then the descendant will always have OldCreateOrder set to True.

It is reported as RAD StudioRSP-20016 TDatamodule.OldCreateOrder always resets to true on descendants, but it is present in at least Delphi 7, so likely is in the old QC database:

Uwe Raabe:
I can track this error down to Delphi 7 (really)! Cannot check Delphi 6, but Delphi 5 just doesn’t have that property.
The reason lies in TDataModule.ReadState where

FOldCreateOrder := not ModuleIsCPP;
is set.

These might be related:

–jeroen

Posted in Delphi, Development, Software Development | Leave a Comment »

Debugging Delphi applications inside a Windows Docker container – yeiei.net

Posted by jpluimers on 2020/04/07

A docker container that pulls the PA server for Windows and steps how to attach to it and a video showing how to do this: [WayBackDebugging Delphi applications inside a Windows Docker container – yeiei.net

Cool if you do Delphi server side stuff.

Via: [WayBack] Hi delphi friends! If you are planning to use Windows Docker Containers and Delphi, you’ll need to read this: https://yeiei.net/en/debugging-delphi-appl… – Juan Antonio Ruzafa – Google+

–jeroen

Read the rest of this entry »

Posted in Delphi, Development, Software Development | Leave a Comment »

In SQL Server use `SET NOCOUNT ON` so tools taking the last modified record count won’t be confused by your trigger.

Posted by jpluimers on 2020/04/07

Interesting read: Time eating bug of the day… – Fabian S. Biehn – Google+.

TL;DR: in SQL Server use SET NOCOUNT ON so tools taking the last modified record count won’t be confused by your trigger.

Source: [WayBackTime eating bug of the day: I used a TADOQuery.ExecSQL (on Berlin) for an Up…

Related: [WayBack] sql server – ADODB affected rows return trigger’s affected rows – Stack Overflow

–jeroen

Posted in Database Development, Delphi, Development, Office VBA, Scripting, Software Development, SQL, SQL Server | Leave a Comment »

Cool Delphi IDE idea: when moving a project, not just adjust absolute file paths but also search paths

Posted by jpluimers on 2020/04/02

The IDE already owns and modifies your .dproj and .dpr files (of which many users complain, but I think it is a good thing), so this is a great suggestion: [WayBack] Possibly slightly obvious but nonetheless a minor little tip to bear in mind when moving a project (.dproj/.dpr) by saving it to a new location (which I… – Walter Prins – Google+

Possibly slightly obvious but nonetheless a minor little tip to bear in mind when moving a project (.dproj/.dpr) by saving it to a new location (which I encountered this morning):

While the IDE will automatically adjust form/pas file paths for files included in the project in the .dpr for you, what it will not however do is also adjust the project “Search path” in a similar fashion, even though moving the project is guaranteed to break the project if it has project relative search paths and hence they would require adjusting.

That is to say, if you have project relative search folders specified in the “Search path” (and indeed the output folders), you will need to manually go and edit these paths in the project by hand when you change the project’s location.

(I’d argue that the IDE ought to update relative paths in the project options automatically given that it does so already for the .dpr; it would be the intuitive and graceful thing to do.)

–jeroen

Posted in Delphi, Development, Software Development | Leave a Comment »

In case I need JSONPath functionality in Delphi: grijjy/GrijjyFoundation@4ce069a · GitHub

Posted by jpluimers on 2020/03/25

From a while back, but just in case I ever need JSONPath (for JSON, or BSON Path): [WayBack] Added JSONPath functionality · grijjy/GrijjyFoundation@4ce069a · GitHub.

Via: [WayBack] Search for and extract data from your JSON documents using an XPath-like query language. Now part of our JSON and BSON library. – Erik van Bilsen – Google+

It has a small glitch on non-USA systems, so I filed an issue and provided grijjy’s Erik van Bilsen with a pull request:

–jeroen

Posted in Delphi, Development, Software Development | Leave a Comment »

The Delphi Geek: Data-driven Multithreading

Posted by jpluimers on 2020/03/18

Still on my reading list because it is relevant to many programming environments: [WayBack] The Delphi Geek: Data-driven Multithreading.

Related:

–jeroen

Posted in Delphi, Development, Software Development | Leave a Comment »

Fast-Forward »: My Lazarus External Tools (and Delphi External tools)

Posted by jpluimers on 2020/03/17

For my link archive if I want to make Explorer (for Linux caja) or console shortcuts to source or target directories: [WayBack] Fast-Forward »: My Lazarus External Tools with these XML files from [WayBack] Lazarus External Tools · GitHub:

And the Delphi equivalent from 2004: [WayBack] Fast-Forward »: My Delphi Tools, which addes “Open Source in Notepad2” and “Start Resource Explorer”.

via: [WayBack] Ondrej Kelle – Google+

–jeroen

Read the rest of this entry »

Posted in Delphi, Development, Lazarus, Software Development | Leave a Comment »

Working around [Fatal error] F2084 Internal errors like AV101E53EB-R0000000C-0

Posted by jpluimers on 2020/03/17

A few notes from my response to [WayBack] [Fatal error] F2084 Internal error : AV101E53EB-R0000000C-0 I’m getting this when trying to do some code completion. Any idea ? – Stéphane Wierzbicki – Google+:

This compiler related error usually made it go away for me either when it occurs during project compilation or when using code completion: Close the IDE. Delete your DCU files. Then restart the IDE.

Starting fresh gives a high chance if fixing this unless it is indeed a compiler related error in which case it returns. For that you need to trim down your code to see under which circumstances.

Reasoning (please shoot at it when things are wrong/missing):

Both the IDE code completion and the project compilation use the compiler. The DCU cache is shared between these compiler instances. The DCU cache depends on internal memory structures. Various pointer related errors (both from the IDE, compiler and 3rd party extensions) can damage this cache.

Especially weak IDE uses of the compiler are the find symbol and rename symbol functionalities. I’ve stopped using those about a decade ago.

Sometimes the F2084 (which I often mistype as F2048) is indeed an error in the compiler. Over the years, some of them have been fixed too. See my earlier articles on F2084.

–jeroen

Posted in Conference Topics, Conferences, Delphi, Development, Event, F2084, Software Development | Leave a Comment »

Bad surprise of the day: SysUtils.TEncoding in XE2+ defaults to ANSI, while in XE it defaulted to UTF-8.

Posted by jpluimers on 2020/03/11

Bad surprise of the day: SysUtils.TEncoding in XE2+ defaults to ANSI, while in XE it defaulted to UTF-8 .Among other things this means that TStringList… – Eric Grange – Google+

Source: Bad surprise of the day: SysUtils.TEncoding in XE2+ defaults to ANSI, while i…

Delphi

Eric Grange's profile photo

+Stefan Glienke Indeed, you’re right. The issue must be deeper somewhere. Don’t have time to investigate too much, I’m bypassing the RTL now (also have to work around the limitation that for utf-8 the TEncoding.GetString method returns an empty string if one character in the buffer isn’t utf-8)

Asbjørn Heid's profile photo

I wouldn’t trust the RTL at all with loading non-ascii text, we’ve had it hang on invalid UTF-8 codes more than once.

–jeroen

Posted in Ansi, Delphi, Development, Encoding, Software Development, UTF-8, UTF8 | Leave a Comment »