Sign in Join

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

Mailing lists / lazarus / 2001-03

Bugs in lazarus

6 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Mattias Gaertner
to FoodTechnologist: There are (or were 4 days ago) some bugs in Lazarus 1. Ide failed to save form with unit.…
> If there were try..excepts you would not found the bug and reported it > and I would not fixed it. But without them, I fixed it. Therefore I

will

Show quoted text 19 lines
> not add try..excepts to code without a raise. Course, brackets should be like {$ifndef DEBUG} try {$endif} .......... {$ifndef DEBUG} except end; {$endif} or even {$ifdef NOCRUSH} try {$endif} .......... {$ifdef NOCRUSH} except end; {$endif}

If we put try..excepts ends; in this part of code, a user won't notice that there is a bug. Unhandled bugs can produce inconsistency and in the case of the code tools loss of code. Hence the alternative would look like:

try
except
  MessageDlg('There is a bug in the code tools.'
       +' Please kill lazarus to avoid further inconsistency.'
       +' Your code can already be damaged.',
        ...);
end;

This looks somewhat nicer than a crash. But there will be no lineinfo output and your bugreport will not be very helpful, which reduces the chance to find the bug.
Are you sure, you want this?

Mattias

Reply by email

FoodTechnologist
to FoodTechnologist: There are (or were 4 days ago) some bugs in Lazarus 1. Ide failed to save form with unit.…
If there were try..excepts you would not found the bug and reported it and I would not fixed it. But without them, I fixed it. Therefore I will not add try..excepts to code without a raise.
Course, brackets should be like
{$ifndef DEBUG}
try
{$endif}
..........
{$ifndef DEBUG}
except end;
{$endif}
or even
{$ifdef NOCRUSH}
try
{$endif}
..........
{$ifdef NOCRUSH}
except end;
{$endif}

Reply by email

Mattias Gaertner
to FoodTechnologist: There are (or were 4 days ago) some bugs in Lazarus 1. Ide failed to save form with unit.…
Show quoted text 8 lines
> This looks somewhat nicer than a crash. But there will be no lineinfo > output and your bugreport will not be very helpful, which reduces the > chance to find the bug. > Are you sure, you want this? Sure! Besides, 1. 70 % of these bugs, I think, can be easily ignored and normal work will continue.

That's right, but how do you know which one is serious?

Show quoted text 6 lines
2. After finding a bug there are three ways: 1. repair it 2. send buginfo. 3. Ignore it 3. If you find a serious bug you can recompile lazarus and then send a log. 4. 98 % of logs is in writelns. So, you'll loose a small part without Access Violation message.

I planned to make the IDE error tolerable, when it is usable. e.g. when most central parts have left the alpha state. If you are already using the IDE for real projects, then I will add the try..excepts.

There are some other minor bugs. 1. My brother said, that he will not concern this project as a serious while he will be able to place timer on the form. So, non-visual

components can be

usefull.

Is that all? Just the non-visual components?

May be, it will be reasonable to make fake components (TFakeTimer etc.), which will be somewhat like buttons (TFakeTimer=class(TButton)), and when

form

is saved, it'll be possible to remove all FAKEs.

There is no need for fake components. There is not much missing to activate non-visual components. The problem is the missing clipping. Without clipping the icons will slow down the form designing. But, for your brother, I will see if I can get this things to work.

2. !!!! Compiler is defaulting as /opt/fpc/ppc386. I have never had it there (only in /usr/bin). Lazarus crushes in this case. Course, I can

open

options dialog, but only after opening lazarus begins searching compiler

at that

place where it is stated. If settings are correct, but dialogue hasn't

been

called, lazarus would use default settings

-You are right. The /usr/bin is more common than /opt/fpc/. I will add it. -It is planned to set the default compiler path in the environment options. -The current IDE should not crash if the compiler could not be found. It should write the message
ERROR: a directory component in "/opt/fpc/ppc386" does not exist or is a dangling symlink..
This works currently only under Linux.
-I committed some compiling bugfixes on tuesday. Perhaps you have an old version. If not, then please send me some more hints to find the bug.

Mattias

Reply by email

FoodTechnologist
to FoodTechnologist: There are (or were 4 days ago) some bugs in Lazarus 1. Ide failed to save form with unit.…
This looks somewhat nicer than a crash. But there will be no lineinfo output and your bugreport will not be very helpful, which reduces the chance to find the bug. Are you sure, you want this?

Sure! Besides,
1. 70 % of these bugs, I think, can be easily ignored and normal work will continue.
2. After finding a bug there are three ways: 1. repair it 2. send buginfo.3. Ignore it
3. If you find a serious bug you can recompile lazarus and then send a log.
4. 98 % of logs is in writelns. So, you'll loose a small part without Access Violation message.

There are some other minor bugs.
1. My brother said, that he will not concern this project as a serious while he will be able to place timer on the form. So, non-visual components can be usefull.
May be, it will be reasonable to make fake components (TFakeTimer etc.), which will be somewhat like buttons (TFakeTimer=class(TButton)), and when form is saved, it'll be possible to remove all FAKEs.
2. !!!! Compiler is defaulting as /opt/fpc/ppc386. I have never had it there (only in /usr/bin). Lazarus crushes in this case. Course, I can open options dialog, but only after opening lazarus begins searching compiler at that place where it is stated. If settings are correct, but dialogue hasn't been called, lazarus would use default settings

Reply by email

FoodTechnologist

There are (or were 4 days ago) some bugs in Lazarus
1. Ide failed to save form with unit. Error was in line 820 (source[Position], access violation), function ReadRawNextPascalAtom. It can be temporary (or even at all) corrected by closing the body of function in try...except end 'brackets'. Then IDE saved files and even compiled lfm to lrs fine, so forms could be used. I trink, it may be reasonable to enclose most of methods in try-except end, as some of them are not stable.
So, if one feature fails, others will still work. I can try to do it, but I can't be up-to-date.
2. IDE produce good template for source (lpr)(only disadvantage is absence Application.CreateForm). But after second form loading they are lost (zero size). May be, it'll be reasonable to open source in editor juxt after creating it.

Reply by email

Mattias Gaertner
to FoodTechnologist
Show quoted text 10 lines
There are (or were 4 days ago) some bugs in Lazarus 1. Ide failed to save form with unit. Error was in line 820 (source[Position], access violation), function ReadRawNextPascalAtom. It can be temporary (or even at all) corrected by closing the body of function in try...except end 'brackets'. Then IDE saved files and even compiled lfm to lrs fine, so forms could be used. I trink, it may be reasonable to enclose most of methods in try-except end, as some of them are not stable. So, if one feature fails, others will still work. I can try to do it, but I can't be up-to-date.

If there were try..excepts you would not found the bug and reported it and I would not fixed it. But without them, I fixed it. Therefore I will not add try..excepts to code without a raise.

2. IDE produce good template for source (lpr)(only disadvantage is absence Application.CreateForm). But after second form loading they are lost (zero size). May be, it'll be reasonable to open source in editor juxt after creating it.

Bugs fixed.
I think, the program source should be hidden as in Delphi. This should prevent programmers to add code to the program instead of to the units. Remember: Units are reusable, Programs not. But Lazarus will fully support program files. In fact, you can simply open an existing program file and Lazarus automatically recognices if it is a program and creates the lazarus project.

Note:
I'm happy, that you think the IDE created forms are usable. But I want to make sure, that nobody misunderstand usable as "go and create your applications". There are still bugs and a lot of missing basic features. Perhaps an IDE page should be added to the website which lists existing and missing features.

Mattias

Reply by email