View Issue Details

IDProjectCategoryView StatusLast Update
0035965FPCRTLpublic2019-08-15 15:31
ReporterThaddy de KoningAssigned ToSven Barth 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformarmhfOSRaspbianOS VersionBuster
Product Version3.3.1Product Build42691 
Target VersionFixed in Version3.3.1 
Summary0035965: function TObject.UnitName does not work any more
DescriptionThe function function Tobject.Username does not work any more on Raspbian.
It returns either garbage or nothing at all.

This also breaks Lazarus into an unusable state.
Steps To ReproduceCompile this on Raspbian 10, armhf:

program test;
{$mode delphi}
uses classes;
begin
  Test();
  O := TObject.Create;
  writeln(O.UnitName);
end.

Outputs:

System(�
       IUnknown�FSystem��`�
                           TClassX�
Additional InformationThis is discovered by rvk in a forum topic related to not being able to use Lazarus.
Reproduced by many.
Lazarus is broken because of it,
TagsNo tags attached.
Fixed in Revision42697
FPCOldBugId
FPCTarget-
Attached Files

Activities

Thaddy de Koning

2019-08-15 07:19

reporter  

codetoolsbug.png (12,813 bytes)
codetoolsbug.png (12,813 bytes)

Thaddy de Koning

2019-08-15 07:19

reporter   ~0117677

example of one of the many issues that this causes in Lazarus.
See duscussion here https://forum.lazarus.freepascal.org/index.php/topic,46291.msg329546.html#msg329546

Sven Barth

2019-08-15 11:22

manager   ~0117682

Probably yet another RTTI related alignment problem... *sigh*

Rik van Kekem

2019-08-15 13:37

reporter   ~0117685

I tracked down the problem version.
Compiling FPC with rev.42475 gave a correct result, with rev.42476 a wrong result.
(even on Raspberry Pi Debian 9.9 Stretch / arm)
I hope this will prevent a developer from searching too much :)

[quote]Revision: 42476
Author: florian
Date: zondag 21 juli 2019 10:28:29
Message:
* more fixes to rtti after attribute branch merging
----
Modified : /trunk/compiler/ncgrtti.pas
Modified : /trunk/compiler/symconst.pas
Modified : /trunk/rtl/inc/dynarr.inc
Modified : /trunk/rtl/inc/rtti.inc
Modified : /trunk/rtl/inc/rttidecl.inc
Modified : /trunk/rtl/objpas/typinfo.pp[/quote]

Sven Barth

2019-08-15 15:30

manager   ~0117688

Last edited: 2019-08-15 15:31

View 2 revisions

@Rik van Kekem: I already know what caused it, it was the source of many headaches since I reintegrated it. The main problem is to solve it. Though this one was thankfully easy...

Please test and close if okay.

Issue History

Date Modified Username Field Change
2019-08-15 07:12 Thaddy de Koning New Issue
2019-08-15 07:19 Thaddy de Koning File Added: codetoolsbug.png
2019-08-15 07:19 Thaddy de Koning Note Added: 0117677
2019-08-15 11:21 Sven Barth Summary function Tobject.Username does not work any more => function TObject.UnitName does not work any more
2019-08-15 11:21 Sven Barth FPCTarget => -
2019-08-15 11:22 Sven Barth Note Added: 0117682
2019-08-15 13:37 Rik van Kekem Note Added: 0117685
2019-08-15 15:30 Sven Barth Assigned To => Sven Barth
2019-08-15 15:30 Sven Barth Status new => resolved
2019-08-15 15:30 Sven Barth Resolution open => fixed
2019-08-15 15:30 Sven Barth Fixed in Version => 3.3.1
2019-08-15 15:30 Sven Barth Fixed in Revision => 42697
2019-08-15 15:30 Sven Barth Note Added: 0117688
2019-08-15 15:31 Sven Barth Note Edited: 0117688 View Revisions