Recent

Author Topic: lfm file not showing anything from main.lfm  (Read 4168 times)

ronhud

  • Full Member
  • ***
  • Posts: 105
lfm file not showing anything from main.lfm
« on: September 10, 2018, 01:26:34 pm »
When I open the Lazarus IDE and it loads the last project I worked on I get two Access Violation errors regarding main.lfm and when the source code loads the object Inspector whilst showing everything related to a Data Module in the project seems unaware of the main.lfm.   The text of main.lfm does appear in a source code window with a message 'List index(-1) out of bounds'.  I dont know whether this message applies to something within main.lfm or the IDE operation to open it.  I cant see any way to start solving this problem.

The last changes to the main form was the addition of a second line series and transformations to a chart on the main form.


Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Re: lfm file not showing anything from main.lfm
« Reply #1 on: September 10, 2018, 01:44:04 pm »
Close Lazarus and check project files and their content in file manager. Do backup of backup (*.lfm~ or backup/*.lfm etc.; depeds on your settings).
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4715
  • I like bugs.
Re: lfm file not showing anything from main.lfm
« Reply #2 on: September 10, 2018, 02:04:49 pm »
The last changes to the main form was the addition of a second line series and transformations to a chart on the main form.
If you don't have backups then you can try removing the last changes from both the Pascal and form files using some other editor.
I guess they are components of TAChart. If you can reproduce the error then please report it.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

ronhud

  • Full Member
  • ***
  • Posts: 105
Re: lfm file not showing anything from main.lfm
« Reply #3 on: September 10, 2018, 02:26:34 pm »
I tried this using Notepad but now the IDE says 'Unable to convert text form data of file "main.lfm" into binary stream. Wrong token type: Symbol expected but EOF found'  I have opened the main.lfm in a hex editor and compared it with the datamodule lfm and see an extra od oa at the end but after removing these I still get the same error re binary stream.   Should using a standard text editor cause this problem?

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4715
  • I like bugs.
Re: lfm file not showing anything from main.lfm
« Reply #4 on: September 10, 2018, 02:51:46 pm »
Should using a standard text editor cause this problem?
No, it is pure text. You have removed wrong parts of the file.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

ronhud

  • Full Member
  • ***
  • Posts: 105
Re: lfm file not showing anything from main.lfm
« Reply #5 on: September 10, 2018, 04:26:05 pm »
I have resolved the problem by creating a new form and adding a button to it then copy and pasting the full text from the problem main.lfm to this new dfm.  Then deleting the button code from the new dfm and saving it then a bit of renaming and finally have a working main.dfm.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4715
  • I like bugs.
Re: lfm file not showing anything from main.lfm
« Reply #6 on: September 10, 2018, 04:48:49 pm »
Oh, it means the .lfm file contents were ok. It would be interesting to know what caused this problem.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

ronhud

  • Full Member
  • ***
  • Posts: 105
Re: lfm file not showing anything from main.lfm
« Reply #7 on: September 11, 2018, 12:17:15 pm »
I am puzzled - my first thought was that some character had crept into the end of the file which was confusing to Lazarus.   I used a hex editor to compare a working lfm with the failing lfm but could not see any difference, as mentioned by JuhaManninen it is a pure text file.  Neither could I find anything that indicated the file length.   EOF is I understand a term that can mean different things according to the system using the file, I wonder what the IDE regards as EOF.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4715
  • I like bugs.
Re: lfm file not showing anything from main.lfm
« Reply #8 on: September 11, 2018, 12:30:20 pm »
EOF is I understand a term that can mean different things according to the system using the file, I wonder what the IDE regards as EOF.
When the file ends, it is EOF. :)
I don't think the .lfm reader is sensitive to any specific EOF marks. The problem is somewhere else.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

 

TinyPortal © 2005-2018