Sign in Join

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

Mailing lists / lazarus / 2010-03

IDE search path for include file causes IDE hang

19 messages · 9 people · –

Reply by email Subscribe to this list Your subscription

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

Andrew Brunner

I wanted to know if anyone reported a bug that has to do with include files and the helper component that consistently crashes the IDE. I had dealt with this bug for the past few weeks. It wasn't until I ran ./startlazarus from command prompt that showed me that a unit referencing an include unit could not be found. I solved the problem by adding the path of the include file to the IDE paths in project options/paths but I wonder if a certain user segment is experiencing this issue.

This was a trivial error that was easily solved once I knew what the problem was. The fact remains that the IDE should have displayed a dialog box telling me the path needed to be added to that path option so the IDE can function properly.

I had to deal with this problem for a week and it was always crashing my Lazarus. Man... I kept doing svn updates for FPC and Lazarus and I think I'm a bit frustrated at the fact that the problem was so simple to solve, and the crash was totally avoidable. I'm thinking that if possible, we should re-think the logic of paths.

It's ok to have a seperate option but for bare minimums, behind the scenes, perhaps we could use an aggregate or at least a dialog box saying project unit "whatever.pas" includes "include.inc" and cannot be located. Please set a path reference in the IDE path options for this project.

Mattias Gaertner
to Andrew Brunner
Show quoted text 5 lines
I wanted to know if anyone reported a bug that has to do with include files and the helper component that consistently crashes the IDE. I had dealt with this bug for the past few weeks. It wasn't until I ran ./startlazarus from command prompt that showed me that a unit referencing an include unit could not be found.

I'm not sure, what you mean with "include unit".
A unit is used (by the uses section), an include file is included (by the include directive).
I guess, you mean an include file was not found?

Show quoted text 9 lines
I solved the problem by adding the path of the include file to the IDE paths in project options/paths but I wonder if a certain user segment is experiencing this issue. This was a trivial error that was easily solved once I knew what the problem was. The fact remains that the IDE should have displayed a dialog box telling me the path needed to be added to that path option so the IDE can function properly.

ok.
I need some information how to reproduce the problem. Was there an error message? What was the error message?

I can add a popup menu (quick fix item) for this message.

Show quoted text 5 lines
I had to deal with this problem for a week and it was always crashing my Lazarus. Man... I kept doing svn updates for FPC and Lazarus and I think I'm a bit frustrated at the fact that the problem was so simple to solve, and the crash was totally avoidable. I'm thinking that if possible, we should re-think the logic of paths.

Crash?

Show quoted text 5 lines
It's ok to have a seperate option but for bare minimums, behind the scenes, perhaps we could use an aggregate or at least a dialog box saying project unit "whatever.pas" includes "include.inc" and cannot be located. Please set a path reference in the IDE path options for this project.

And a button to get there.

Mattias

Andrew Brunner
to Mattias Gaertner
Mattias Gaertner wrote
I need some information how to reproduce the problem. Was there an error message? What was the error message?

The error was from internal component that utilizes the IDE paths for scanning Lazarus only units. That unit was referencing another include located not in that unit's folder but somewhere else.

Crash?

Oh yes. Symptoms were on Windows 7 and Ubuntu x64 with latest kernel push.

I'll see if I can generate a test case. By tomorrow morning.

Andrew Brunner
to Andrew Brunner

I'm struggling with this bug in Lazarus where the IDE is frequently locking up.

I run under debugger and watch this entry right before the GUI locks up...

### TCodeToolManager.HandleException: "include file not found "RSRBuilder.inc"" at Line=16 Col=28 in
"/home/atbrunner/Developer/Source/Libraries/uAppBuild.pas"

At first I just added the path to the IDE includes for this project. But finally I decided to try to add the actual inc file to the project. This error still appears right before the IDE goes unresponsive.

Any takers on fixing this bug? I keep having to restart the project and save every time I press a key.

Mattias Gaertner
to Andrew Brunner
I'm struggling with this bug in Lazarus where the IDE is frequently locking up.

I'm still waiting for your answer to my response. (Mon, 8 Mar 2010 00:51:25 +0100)

What do you mean with "locking up"?
Can you create a backtrace?
Can you reproduce the error in a small project?
How can I reproduce the error?

Show quoted text 5 lines
I run under debugger and watch this entry right before the GUI locks up... ### TCodeToolManager.HandleException: "include file not found "RSRBuilder.inc"" at Line=16 Col=28 in "/home/atbrunner/Developer/Source/Libraries/uAppBuild.pas"

An include file was not found. It is as serious as a syntax error. I doubt that it has something to do with "locking up".

At first I just added the path to the IDE includes for this project. But finally I decided to try to add the actual inc file to the project. This error still appears right before the IDE goes unresponsive.

Do you mean completely or some functions don't work?

Any takers on fixing this bug? I keep having to restart the project and save every time I press a key.

Mattias

Andrew Brunner
to Mattias Gaertner
Mattias Gaertner wrote
On Tue, 23 Mar 2010 22:04:36 -0500 Andrew Brunner wrote:

The error message is displayed on the terminal or from gdb then the hang happens.

What do you mean with "locking up"?

The system goes unresponsive. I get a force quit prompt by Ubuntu.

Can you create a backtrace?

All I see is the include file not being found (but the path is in the search paths for IDE and the actual include is added to the project) error message and all Lazarus windows freeze. I can't bt at that point either.

It's only when I answer "Force Quit" to close IDE do I see responses to by bt or backtrace entries in the terminal for GDB. Meaning GDB can't backtrace b/c the program hang. And when I close the program - gdb says no stack.

Can you reproduce the error in a small project?

I can reproduce the error in the small project but I can't get the small project to hang the IDE.

How can I reproduce the error?

I will have to re-do a small project. I did one but didn't send it (but I tried to re-install Linux and lost that sample project).

Show quoted text 7 lines
> ### TCodeToolManager.HandleException: "include file not found > "RSRBuilder.inc"" at Line=16 Col=28 in > "/home/atbrunner/Developer/Source/Libraries/uAppBuild.pas" An include file was not found. It is as serious as a syntax error. I doubt that it has something to do with "locking up".

RSRBuilder.inc was added in the project. As was the folder it resides added to the Project's IDE paths.

Show quoted text 6 lines
> At first I just added the path to the IDE includes for this project. > But finally I decided to try to add the actual inc file to the > project. ?This error still appears right before the IDE goes > unresponsive. Do you mean completely or some functions don't work?

The entire GUI and all forms/windows go white.

Luca Olivetti
to Andrew Brunner

En/na Andrew Brunner ha escrit:

The entire GUI and all forms/windows go white.

I've had this problem under windows for a while now (and it's been a while since I updated lazarus), but I thought it was a windows problem and not a lazarus one because, as strange as it may seems, I have the same problem with delphi 2.

Bye

Luca Olivetti Wetron Automatizaci?n S.A. http://www.wetron.es/ Tel. +34 93 5883004 (Ext.133) Fax +34 93 5883007
Mattias Gärtner
to Andrew Brunner: On Wed, Mar 24, 2010 at 4:04 AM, Mattias Gaertner The error message is displayed on the…

Zitat von Andrew Brunner :

Show quoted text 11 lines
On Wed, Mar 24, 2010 at 4:04 AM, Mattias Gaertner wrote: > On Tue, 23 Mar 2010 22:04:36 -0500 > Andrew Brunner wrote: The error message is displayed on the terminal or from gdb then the hang happens. > What do you mean with "locking up"? The system goes unresponsive. I get a force quit prompt by Ubuntu.

Sounds like an endless loop.
Normally you can start the IDE in gdb, and when it happens, switch to the terminal, where you started gdb and press Ctrl+C to pause the IDE. Then create a backtrace.

> Can you create a backtrace? All I see is the include file not being found (but the path is in the search paths for IDE and the actual include is added to the project)

I guess the unit belongs to your project, right?
(that means: not to a package)

Make sure,
1. the unit directory is in the "Other unit files" (Compiler Options / Paths). Check for the right upper/lowercase.
2. the directory of the include file is in the "Include Files" (Compiler Options / Paths). Check for the right upper/lowercase.
3. The include directive has the right case of upper/lower letters OR the include file is lower case on disk.
4. If the include file has the ending .inc this must be added to the include directive as well.

Show quoted text 12 lines
error message and all Lazarus windows freeze. I can't bt at that point either. It's only when I answer "Force Quit" to close IDE do I see responses to by bt or backtrace entries in the terminal for GDB. Meaning GDB can't backtrace b/c the program hang. And when I close the program - gdb says no stack. > Can you reproduce the error in a small project? I can reproduce the error in the small project but I can't get the small project to hang the IDE.

Can you send me a reduced version in private mail?

> How can I reproduce the error? I will have to re-do a small project. I did one but didn't send it (but I tried to re-install Linux and lost that sample project).

Thanks.

Show quoted text 19 lines
>> ### TCodeToolManager.HandleException: "include file not found >> "RSRBuilder.inc"" at Line=16 Col=28 in >> "/home/atbrunner/Developer/Source/Libraries/uAppBuild.pas" > > An include file was not found. It is as serious as a syntax error. > I doubt that it has something to do with "locking up". RSRBuilder.inc was added in the project. As was the folder it resides added to the Project's IDE paths. >> At first I just added the path to the IDE includes for this project. >> But finally I decided to try to add the actual inc file to the >> project. ?This error still appears right before the IDE goes >> unresponsive. > > Do you mean completely or some functions don't work? The entire GUI and all forms/windows go white.

Mattias

Mattias Gärtner
to Luca Olivetti: En/na Andrew Brunner ha escrit: I've had this problem under windows for a while now (and…

Zitat von Luca Olivetti :

Show quoted text 8 lines
En/na Andrew Brunner ha escrit: > The entire GUI and all forms/windows go white. I've had this problem under windows for a while now (and it's been a while since I updated lazarus), but I thought it was a windows problem and not a lazarus one because, as strange as it may seems, I have the same problem with delphi 2.

An endless loop can be anywhere.
When an include file is not found, then many codetools stop much earlier. Normally this makes endless loops less probable. Let's hope I get an example to reproduce the problem.

Mattias

Héctor Fiandor Rosario
to Luca Olivetti: En/na Andrew Brunner ha escrit: I've had this problem under windows for a while now (and…

Dear coleagues:

I am using a Lazarus/FreePascal.

I have in a directory an Excel file and I want to move to a subdirectory. Is it possible with FP?

thanks in advance

yours,

Ing. H?ctor F. Fiandor

Este mensaje le ha llegado mediante el servicio de correo electronico que ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema Nacional de Salud. La persona que envia este correo asume el compromiso de usar el servicio a tales fines y cumplir con las regulaciones establecidas Infomed: http://www.sld.cu/
Andrew Brunner
to Héctor Fiandor Rosario

Sure it is...

http://lazarus-ccr.sourceforge.net/docs/lcl/fileutil/copyfile.html

2010/3/24 H?ctor Fiandor Rosario :

Show quoted text 29 lines
Dear coleagues: I am using a Lazarus/FreePascal. I have in a directory an Excel file and I want to move to a subdirectory. Is it possible with FP? thanks in advance yours, Ing. H?ctor F. Fiandor -- Este mensaje le ha llegado mediante el servicio de correo electronico que ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema Nacional de Salud. La persona que envia este correo asume el compromiso de usar el servicio a tales fines y cumplir con las regulaciones establecidas Infomed: http://www.sld.cu/ -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Andrew Brunner
to Héctor Fiandor Rosario: Dear friends: thanks for the received answers. I have copied all the instrucctions. I…

I always use copyfile and check the error and then delete the file if needed. This ensures that the file was actually copied. It's just better that way :-)

Glad to be of help. Enjoy!

2010/3/26 H?ctor Fiandor Rosario :

Show quoted text 29 lines
Dear friends: thanks for the received answers. I have copied all the instructions. I have prepared and small application and used the CopyFile option on a text file and it pretty works . Thanks very much. yours, Ing. H?ctor F. Fiandor -- Este mensaje le ha llegado mediante el servicio de correo electronico que ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema Nacional de Salud. La persona que envia este correo asume el compromiso de usar el servicio a tales fines y cumplir con las regulaciones establecidas Infomed: http://www.sld.cu/ -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Héctor Fiandor Rosario
to Henry Vermaak: 2010/3/24 H?ctor Fiandor Rosario : Use renamefile to move files:…

Dear friends:

thanks for the received answers. I have copied all the instrucctions.

I have prepared and small application and used the CopyFile option on a text file and it pretty works .

Thanks very much.

yours,

Ing. H?ctor F. Fiandor

Este mensaje le ha llegado mediante el servicio de correo electronico que ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema Nacional de Salud. La persona que envia este correo asume el compromiso de usar el servicio a tales fines y cumplir con las regulaciones establecidas Infomed: http://www.sld.cu/
waldo kitty
to Andrew Brunner: I always use copyfile and check the error and then delete the file if needed. This…
Andrew Brunner wrote
I always use copyfile and check the error and then delete the file if needed. This ensures that the file was actually copied. It's just better that way :-)

it is also required when moving files to different drives/partitions... at least, that's the way i've always done it in the DOS/OS2/Winwhatever world...

Show quoted text 9 lines
Glad to be of help. Enjoy! 2010/3/26 H?ctor Fiandor Rosario: > Dear friends: > > thanks for the received answers. I have copied all the instructions. > > I have prepared and small application and used the CopyFile option on a text > file and it pretty works .
Henry Vermaak
to waldo kitty
waldo kitty wrote 9 lines
On 3/26/2010 09:58, Andrew Brunner wrote: > > I always use copyfile and check the error and then delete the file if > needed. ?This ensures that the file was actually copied. ?It's just > better that way :-) it is also required when moving files to different drives/partitions... at least, that's the way i've always done it in the DOS/OS2/Winwhatever world...

True. The rename syscall on linux won't work if it's not on the same mountpoint, even if it's on the same partition. I always use the filesystem tools (cp, mv) to do these operations if I care about performance.

Henry

Michael Schnell
to Andrew Brunner: I always use copyfile and check the error and then delete the file if needed. This…
Andrew Brunner wrote
I always use copyfile and check the error and then delete the file if needed. This ensures that the file was actually copied. It's just better that way :-)

*Renaming* a file to a different directory does not offer any risk (either the file is in the new location or in the old one) and is much faster.

-Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20100329/04713bf5/attachment.html>

Héctor Fiandor Rosario
to Michael Schnell

Dear members:

I have prepared an application without icon, but when finished and working well, I want to add an icon. How can I do?

thanks in advance,

Ing. H?ctor F. Fiandor

Este mensaje le ha llegado mediante el servicio de correo electronico que ofrece Infomed para respaldar el cumplimiento de las misiones del Sistem a Nacional de Salud. La persona que envia este correo asume el compromiso de usar el servicio a tales fines y cumplir con las regulaciones establecidas Infomed: http://www.sld.cu/ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20100430/e8f27e26/attachment-0001.html>
Maxim Ganetsky
to Héctor Fiandor Rosario

01.05.2010 2:14, H?ctor Fiandor Rosario ?????:

Dear members: I have prepared an application without icon, but when finished and working well, I want to add an icon. How can I do?

Via Project->Project Options ("Application" tab).

Best regards, Maxim Ganetsky mailto: