Sign in Join

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

Mailing lists / lazarus / 2010-11

Problem with revision 28344

7 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

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

tim launchbury

Hello all

When updating from svn, applying revision 28344 causes my app to fail with runtime error 202.
Is there a problem with this patch or do I need a workround or code change in my app?

It worked fine before this change.

Regards

Tim

Reply by email

Paul Ishenin
to tim launchbury
tim launchbury wrote
When updating from svn, applying revision 28344 causes my app to fail with runtime error 202. Is there a problem with this patch or do I need a workround or code change in my app?

Try to find what causes the error. It would be nice to get some back trace.

It worked fine before this change.

Yes, it is a big change. If you want to test lazarus without this change then please comment a define in your local version of lcl_defines.inc file.

Best regards,
Paul Ishenin

Reply by email

zeljko
to tim launchbury: Hello all When updating from svn, applying revision 28344 causes my app to fail with…
tim launchbury wrote 8 lines
Hello all When updating from svn, applying revision 28344 causes my app to fail with runtime error 202. Is there a problem with this patch or do I need a workround or code change in my app? It worked fine before this change.

Update to latest svn, rebuild laz , if you get any error please provide your widgetset, OS etc.. also some stack trace.

zeljko

Reply by email

zeljko
to zeljko
zeljko wrote 12 lines
On Tuesday 23 November 2010 08:27, tim launchbury wrote: > Hello all > > When updating from svn, applying revision 28344 causes my app to fail > with runtime error 202. > Is there a problem with this patch or do I need a workround or code > change in my app? > > It worked fine before this change. Update to latest svn, rebuild laz , if you get any error please provide your widgetset, OS etc.. also some stack trace.

Also, provide fpc version.

zeljko

Reply by email

tim launchbury

I have done some more investigation on this.

The offending section of code is the following

Begin {GetColor} <=== it stops here with runtime error 202 Result := Inherited Color;
End; {GetColor}

Procedure TTrackPlan.SetColor(Value: TColor);
Begin {SetColor}
If Color  Value
Then
Begin
inherited Color := Value;
If Value = clBlack
Then Font.Color := clWhite
Else Font.Color := clBlack;
//all objects
Invalidate;
End;
End; {SetColor}

If the inherited Color := Value; line is commented out then the runtime error does not occur, but the main menu is shown greyed out but still operational.

It is running on mandriva linux 2010.1 and the error occurs with fpc 2.4.2 and 2.5.1.
It is running kernel 2.6.33.7-desktop586-2mnb with pentium 4 2.8GHz.

The application is one that I have ported from delphi and tha above code is unchanged from the delphi version; it worked correctly prior to revision 28344

Regards

Tim

Reply by email

Paul Ishenin
to tim launchbury
tim launchbury wrote 25 lines
I have done some more investigation on this. The offending section of code is the following Begin {GetColor}<=== it stops here with runtime error 202 Result := Inherited Color; End; {GetColor} Procedure TTrackPlan.SetColor(Value: TColor); Begin {SetColor} If Color Value Then Begin inherited Color := Value; If Value = clBlack Then Font.Color := clWhite Else Font.Color := clBlack; //all objects Invalidate; End; End; {SetColor}

Please show the TTrackPlan declaration. From what class it inherits from and how are GetColor, SetColor and property color are declared.

Best regards,
Paul Ishenin

Reply by email

Paul Ishenin
to tim launchbury: I have done some more investigation on this. The offending section of code is the…
tim launchbury wrote 6 lines
Procedure TTrackPlan.SetColor(Value: TColor); Begin {SetColor} If Color Value Then Begin inherited Color := Value;

Btw, the error is in this line ^

Replace it with: "inherited SetColor(Value);".

And the bug is in your code, not in LCL. You probably did not notice
because TTrackPlan constructor has something like Color := clBtnFace?

Best regards,
Paul Ishenin

Reply by email