Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2008-05

rev 15229 and form parsing

10 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Joao Morais

Hello,

After the rev. 15229 (IDE: designer: implemented loading lists of ancestors) from Mattias, something got wrong with the parsing of one of my forms. I cannot create a sample project, don't know what is happening. Everytime I open such unit, the .lfm file is opened instead of an instance of the form. If I close the page that present the .lfm, move to the .pas and press F12, the .lfm file is opened again, and no form. Rev 15228 is ok. Tips?

Thanks.

Joao Morais

Reply by email

Mattias Gaertner
to Joao Morais
Show quoted text 10 lines
Hello, After the rev. 15229 (IDE: designer: implemented loading lists of ancestors) from Mattias, something got wrong with the parsing of one of my forms. I cannot create a sample project, don't know what is happening. Everytime I open such unit, the .lfm file is opened instead of an instance of the form. If I close the page that present the .lfm, move to the .pas and press F12, the .lfm file is opened again, and no form. Rev 15228 is ok. Tips?

Probably some sub function returned an error code without notifying the user about the error.
Start lazarus in a console with
--debug-log=log.txt
and send the log.txt to me.

Mattias

Reply by email

Joao Morais
to Mattias Gaertner
Mattias Gaertner wrote 15 lines
On Mon, 26 May 2008 17:51:59 -0300 Joao Morais wrote: > After the rev. 15229 (IDE: designer: implemented loading lists of > ancestors) from Mattias, something got wrong with the parsing of one > of my forms. I cannot create a sample project, don't know what is > happening. Everytime I open such unit, the .lfm file is opened > instead of an instance of the form. If I close the page that present > the .lfm, move to the .pas and press F12, the .lfm file is opened > again, and no form. Rev 15228 is ok. Tips? Probably some sub function returned an error code without notifying the user about the error. Start lazarus in a console with --debug-log=log.txt and send the log.txt to me.

The relevant line is:
[TJITComponentList.AddJITChildComponentFromStream] ERROR reading form stream of Class 'TOrcamentoEditForm' Error: Error reading FaturasStringGrid.ColWidths: Access violation

and the object is:
object FaturasStringGrid: TStringGrid
Left = 8
Height = 81
Width = 209
ColCount = 5
DefaultColWidth = 32
DefaultRowHeight = 16
FixedColor = clBtnFace
Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goSmoothScroll]
RowCount = 4
TabOrder = 0
ColWidths = (
32
32
27
32
32
)

       end

If I remove the ColWidths property from the .lfm, the form is streamed flawlessly.

Joao Morais

Reply by email

Joao Morais
to Mattias Gärtner
Mattias G?rtner wrote 29 lines
Zitat von Joao Morais : > the object is: > object FaturasStringGrid: TStringGrid > Left = 8 > Height = 81 > Width = 209 > ColCount = 5 > DefaultColWidth = 32 > DefaultRowHeight = 16 > FixedColor = clBtnFace > Options = [goFixedVertLine, goFixedHorzLine, goVertLine, > goHorzLine, goRangeSelect, goSmoothScroll] > RowCount = 4 > TabOrder = 0 > ColWidths = ( > 32 > 32 > 27 > 32 > 32 > ) > end > > If I remove the ColWidths property from the .lfm, the form is streamed > flawlessly. Hmm. Maybe ColWidths don't support yet to be loaded twice. Can you now create a sample project?

Now it's a bit easier.

http://bugs.freepascal.org/view.php?id=11363

Joao Morais

Reply by email

Jesus Reyes
to Joao Morais

--- Joao Morais escribi?:

Show quoted text 38 lines
Mattias G?rtner wrote: > Zitat von Joao Morais : > >> the object is: >> object FaturasStringGrid: TStringGrid >> Left = 8 >> Height = 81 >> Width = 209 >> ColCount = 5 >> DefaultColWidth = 32 >> DefaultRowHeight = 16 >> FixedColor = clBtnFace >> Options = [goFixedVertLine, goFixedHorzLine, goVertLine, >> goHorzLine, goRangeSelect, goSmoothScroll] >> RowCount = 4 >> TabOrder = 0 >> ColWidths = ( >> 32 >> 32 >> 27 >> 32 >> 32 >> ) >> end >> >> If I remove the ColWidths property from the .lfm, the form is streamed >> flawlessly. > > Hmm. Maybe ColWidths don't support yet to be loaded twice. > Can you now create a sample project? Now it's a bit easier. http://bugs.freepascal.org/view.php?id=11363 Joao Morais

Fixed in 15264, in my opinion Filer.Ancestor should have ancestor of component being streamed, instead it has ancestor's form, I made sure ancestor is a compatible grid.

Now I could resolve 11363 if I had access to the bug tracker, can somebody please do that for me?.

Jesus Reyes A.

____________________________________________________________________________________ Yahoo! Deportes Beta
?No te pierdas lo ?ltimo sobre el torneo clausura 2008! Ent?rate aqu? http://deportes.yahoo.com

Reply by email

Jesus Reyes
to Mattias Gärtner

--- Mattias G?rtner escribi?:

Show quoted text 16 lines
Zitat von Jesus Reyes : >[...] > Fixed in 15264, in my opinion Filer.Ancestor should have ancestor of > component being streamed, instead it has ancestor's form, I made sure > ancestor is a compatible grid. Can you elaborate more on this? Ancestor is only available during write, not during read. The AV happened during read, didn't it? Mattias

If being available (during read) means that Filer.Ancesor is not nil, then I think there is a problem, I did some debugging and found that is currently the case. In fact that's why it failed.

I said "instead it has ancestor's form" my foult I wanted to say "instead it has component's form".

Jesus Reyes A.

____________________________________________________________________________________ Yahoo! Deportes Beta
?No te pierdas lo ?ltimo sobre el torneo clausura 2008! Ent?rate aqu? http://deportes.yahoo.com

Reply by email

Mattias Gaertner
to Jesus Reyes
Show quoted text 23 lines
--- Mattias G?rtner escribi?: > Zitat von Jesus Reyes : > > >[...] > > Fixed in 15264, in my opinion Filer.Ancestor should have ancestor > of > > component being streamed, instead it has ancestor's form, I made > sure > > ancestor is a compatible grid. > > Can you elaborate more on this? > Ancestor is only available during write, not during read. The AV > happened during > read, didn't it? > > > Mattias If being available (during read) means that Filer.Ancesor is not nil, then I think there is a problem, I did some debugging and found that is currently the case. In fact that's why it failed.

Arrgh. This was experimental code. I removed it.

I said "instead it has ancestor's form" my foult I wanted to say "instead it has component's form".

Mattias

Reply by email