Crash when reading LFM of Frame that has custom class parent
Original Reporter info from Mantis: Martok @martok
-
Reporter name:
Original Reporter info from Mantis: Martok @martok
- Reporter name:
Description:
Lazarus mis-detects the BaseResourceType of Frames that have a class other than TFrame as their parent, and then fails to load the LFM, as it tries to construct a TForm descendant.
So, this hierarchy results in a crash:
TFrame -> TMyBaseFrame -> TFrame1 {with LFM}
I suspected it is because the intheritance is detected based on class name strings, but loading the next frame down the line does work (after skipping the previous error messages):
TFrame -> TMyBaseFrame -> TFrame1 {with LFM} -> TFrame2 {with LFM}
Steps to reproduce:
Open demo project, observe loading errors when trying to edit TFrame1.
Also, if one ignores the error messages, the LPI is "fixed" to say [ResourceBaseClass Value="Form"], so it's definitely something that gets propagated.
It doesn't matter if TMyBaseFrame is declared in the same or in another unit.