<html><head></head><body><div>Hi Michalis,</div><div><br></div><div><span><pre>On Sun, 2021-11-07 at 01:41 +0100, Michalis Kamburelis wrote:</pre></span></div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div>I see it fails at<br></div><div><br></div><div> TTestGame Time:00.136 N:1 E:1 F:0 I:0<br></div><div> 00.028 TestGameData Error: EAssertionFailed<br></div><div> Exception: Assertion failed (castledebugtransform.pas, line 504)<br></div><div> at $00CB1A14 TDEBUGTRANSFORMBOX__DESTROY, line 454 of<br></div><div>/<<PKGBUILDDIR>>/src/game/castledebugtransform.pas<br></div><div><br></div><div>The referenced assertion is at<br></div><div><a href="https://github.com/castle-engine/castle-engine/blob/631ecfe85ccb4f6b05e8a5da8a93bdb06ed36fea/src/game/castledebugtransform.pas#L504">https://github.com/castle-engine/castle-engine/blob/631ecfe85ccb4f6b05e8a5da8a93bdb06ed36fea/src/game/castledebugtransform.pas#L504</a><br></div><div>.<br></div><div><br></div><div>Unfortunately I have no idea what is the culprit. This same assertion,<br></div></blockquote><div>I did some debug on a porter box to try to find the root cause.</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div>and the whole testcase, works on the systems where I test (including<br></div><div>Linux/x86_64, Linux/i386, Linux/Arm -- the latter on Raspberry Pi). It<br></div></blockquote><div>Sometimes, some bugs appear only on some targets. On others they may be hidden or show in a very weird manner.</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div>is tempting to suspect that this is FPC bug, although that's weak when<br></div><div>I didn't do any investigation.<br></div></blockquote><div>You may be right according to the below debugging trial. </div><pre>(gdb) r --suite=TTestCastleResources</pre><pre>Starting program: /home/mazen/castle-game-engine-7.0~alpha.1+dfsg/tests/test_castle_game_engine --suite=TTestCastleResources</pre><pre><br></pre><pre>[Thread debugging using libthread_db enabled]</pre><pre>Using host libthread_db library "/lib/arm-linux-gnueabi/libthread_db.so.1".</pre><pre><br></pre><pre>Breakpoint 1, TCREATURE__CREATE (AOWNER=0xb5912dc0, AMAXLIFE=100, vmt=<incomplete type>, this=0xb4aa0740)</pre><pre> at /home/mazen/castle-game-engine-7.0~alpha.1+dfsg/src/game/castlecreatures.pas:1463</pre><pre>1463 FDebugTransform := TDebugTransform.Create(Self);</pre><pre>(gdb) c</pre><pre>Continuing.</pre><pre><br></pre><pre>Breakpoint 2, TDEBUGTRANSFORMBOX__CREATE (AOWNER=0xb4aa0740, vmt=<incomplete type>, this=0x127869c)</pre><pre> at /home/mazen/castle-game-engine-7.0~alpha.1+dfsg/src/game/castledebugtransform.pas:446</pre><pre>446 begin</pre><pre><b>(gdb) n</b></pre><pre><b>447 inherited Create(AOwner);</b></pre><pre><b>(gdb) p AOwner</b></pre><pre><b>$2 = (^TCOMPONENT) 0xb4aa0740</b></pre><pre>(gdb) n</pre><pre>448 FBoxColor := Gray;</pre><pre><b>(gdb) p Self.FParent</b></pre><pre><b>warning: can't find linker symbol for virtual table for `TDEBUGTRANSFORMBOX' value</b></pre><pre><b>$3 = (^TCASTLETRANSFORM) 0x0</b></pre><pre>(gdb) </pre><div><br></div><div>If my knowledge is good, Tcompopnent.Create should set parent to AOwner, which is not the case here.</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div><br></div><div>The latest CGE master has this assertion (and this testcase) too, so<br></div><div>it likely still fails. The old CGE 6.4 had a very different<br></div><div>castledebugtransform.pas unit, so it likely avoided the problem by<br></div><div>accident.<br></div><div><br></div><div>My simplest suggestion would be to remove armel from supported<br></div><div>architectures.</div></blockquote><div>I would have a trial to fix the issue before, maybe this can be fixed easily.</div><div>Or if it shows FPC compiler issue, the definitely this is important, even if CGE is never used by anyone.</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div> I do not have access to Linux/armel machine, so I do<br></div><div>not regularly test CGE on it. I could get access to it (I recall<br></div><div>Debian gave me temporary access to such machine in the past, for the<br></div><div>purpose of testing CGE).</div></blockquote><div>This we can arrange <img src="cid:cd307cf47ae5edf061d5ee06a99222c73f6f2e25.camel@sfr.fr-0" alt=";-)" width="16px" height="16px"></div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div> But<br></div><div><br></div><div>- Due to lack of regular testing, in a few months I could break something again.<br></div><div><br></div><div>- I do not want this to block CGE from migrating to Debian testing on<br></div><div>more popular architectures.<br></div></blockquote><div>Valid point.</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div><br></div><div>I do not think that CGE, combined with armel, is popular enough to<br></div><div>make it matter. (Though I'm eager to hear from some CGE user on armel<br></div><div>to say that I'm wrong :) ).</div></blockquote><div>I don't think anyone is going to use CGE on armel, but it is a good way to test the compiler itself as I stated above.</div><div>So this maybe worth I spend some time on it.</div><pre style="caret-color: rgb(46, 52, 54); color: rgb(46, 52, 54); font-variant-caps: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0.4); -webkit-text-stroke-width: 0px; text-decoration: none;">-- <br></pre><pre style="caret-color: rgb(46, 52, 54); color: rgb(46, 52, 54); font-variant-caps: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0.4); -webkit-text-stroke-width: 0px; text-decoration: none;">Cheers,
Abou Al Montacir</pre></body></html>