jeudi 30 juin 2016

System.UStrClr Access Violation


Porting an old desktop app to the modern age using RAD Studio 10.1 Berlin. App was last built in C++ Builder 6 (many, many moons ago).

Managed to sort out all the component and external library dependencies, but it appears that there is some lingering issues with the Unicode port. The app used to rely heavily on the built-in String type, which now corresponds to AnsiString.

The source code builds, but the binary throws an Access Violation somewhere before any application code executed. The error stack trace:

rtl240.@System@@UstrClr$qqrpv + 0x12
largest_pos
__linkproc__ Attributebitmaps::Initialize 0x18
__init_exit_proc
__wstartup

The largest_pos function does some numerical manipulation - no String dependencies of any kind.

Attributebitmaps is a static class, with no member called Initialize. In Delphi you use to be able to declare an Initialize and Finalize call at the unit level, but that construct is not used in C++ Builder.

Any ideas around why an error would occur in System.UStrClr? Where would you go digging to get more insight into this?


Aucun commentaire:

Enregistrer un commentaire