View Issue Details

IDProjectCategoryView StatusLast Update
0020561LazarusIDEpublic2011-10-27 09:30
ReporterMax VlasovAssigned ToMartin Friebe 
Status closedResolutionfixed 
Product Version0.9.30.1 (SVN)Product Build 
Target VersionFixed in Version0.9.31 (SVN) 
Summary0020561: Unexpected file/folder renaming are possible if one activates unresolved Call Stack item (with ??)
DescriptionThere are lines in the Call Stack window that are not resolved to symbols (showing ?? instead of source name). If one occasionally double-click them, a garbage from the executable is shown and if this file is left in the source editor and later a "save all" action is performed (as a result for example of rerunning the program) the following consequences are possible
- renaming sub-folder of the project to (... bak)
- executable is renamed to the previous name of this sub-folder and
- the IDE starts to complain about different files it can not save or access
Additional InformationReproducable on Ubuntu (on Windows editor don't open executable on double-click at such items)

- Create somewhere a folder testprojectfolder, create project testproject inside.
- Add Obj: TObject to the form and Obj.Destroy on some button click.
- Run and press the button. The program should stop due to SIGSEGV
- Open Call Stack window and press more to see lines containing ?? in the function column.
- Double click on some of such lines, the source editor should open the executable testproject with non-text garbage.
- Stop the program (Run\Stop)
- Run the program again.

After this steps
- the testprojectfolder folder is renamed to testprojectfolder.bak,
- testproject executable renamed to testprojectfolder
- the IDE says it can not save icon or something
TagsNo tags attached.
Fixed in Revision33095
WidgetsetGTK 2
Attached Files


Martin Friebe

2011-10-25 16:07

manager   ~0053428

Last edited: 2011-10-25 16:22

** 1) is the fixes branch.

- How recent a snapshot/SVN download from that branch? Which revision?
- Do you know if it happens also on 0.9.31/trunk ?
- Do you know if it happens in 0.9.30 (as released in January 2011)?

** 2)
The "??" line, what does it show in the other columns?
- grey instead of blue dot?
- running index
- Source displays an address? eg: ":081FB5E0"?
- Line is "0" ?

** 3)
The "garbage" which is shown on double click:
- Is it shown in an existing tab? That is inside an Editor showing a valid source? Inserted-into or Replacing that valid Source?
- Or shown in a new (previously not open) tab?

In the 2nd case:
- what is the filename of that tab? (statusbar, or context menu "copy filename")
- context menu: "Source" > "unit info", what is shown on the "General" tab?

** 4)
Please run the Lazarus-IDE from a terminal, (or with --debug-log=/user/home/yourname/laz_log.txt )
And attach the output/log, after such a problem occurred.

** 5)
I tried on an older fedora (but with Laz trunk) and could not reproduce

** 6)
If instead of a crash, you do hit a breakpoint (in the ButtonClick procedure). The stack may should still have "??" lines, since the buttonclick is called from the GTK system.
If you click those lines, without having had a crash, does the problem still occur?

** 7)
Please provide:
- CPU Intel, AMD, Sparc, ... 32/64 bit
- Version of your Ubuntu
- Version of gdb on your system

** 8)
Open the "debug output" window (from menu "View" > "debug window").
Important: Do open it before you start (F9) your app.

Then after your app stooped, and once the stack dialog is displayed, with "??" lines, (but before double clicking them): copy the content of this window, and attach here.

Max Vlasov

2011-10-26 15:06

reporter   ~0053459

I will try to do my best, but just to clarify, I clicked wrong when selected the version, the actual one is
Lazarus 0.9.31 r33065M FPC 2.4.2 i386-linux-gtk 2
If this change affects the list of requests, please let me know

Martin Friebe

2011-10-26 15:15

manager   ~0053461

Thanks, unfortunately pretty much the same questions.

2011-10-26 15:33 (7,624 bytes)

Max Vlasov

2011-10-26 15:36

reporter   ~0053463

** 2)
- the dots are grey (every one after More clicked in the Call Stack)
- in this More section several lines with ?? symbols, the first has 13 as index, :B79E2048 as source. Others has similar values (not anything special)

**3 )
- the "source" opens in a new tab with the name of the executable in the tab
- The contents right now looks like the contents of the clipboard ( I just copied the contents of Call Stack window and I see this contents after double clicking in the tab).
The unit info lists:
Name: rentest (the name of the executable)
Type: None
In project: no
Size: 4126 bytes (the actual exe is 26M)
Lines: 48
Path: ... (path to the executable)

**4) terminal_log.txt in the attachment. It's complete log from the start of the program during the steps I described in the description.

** 6) If I don't run the sigsegv line, the problem is still there


- This is virtualized system (VMWare), reported as Intel XEON X3440 2.53 GHz
- Ubuntu 11.04 (natty), Kernel Linux 2.6.38-8-generic, GNOME 2.32.1
- GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2

** 8)
in the attachment (debug_output_window.txt)

Martin Friebe

2011-10-26 16:43

manager   ~0053468


I added some debugln to the IDE (rev 33090). Could you update (or wait for tomorrows snapshot) and recompile with DBG_LOCATION_INFO defined:

Then resubmit the log file please.
"Debug output" window is NOT needed again.

Also: Does the issue still happen, if you create the executable under a different name, in a different folder (e.g. ./lib)? "Project Options" > "Path" (Compiler opts) > "Target FileName"

Do you have that configured currently, as the default should be in the "unit output dir" ("lib" folder); But you debug output shows it is in the main project dir.
Or do you have the "unit output folder" changed?

Martin Friebe

2011-10-26 17:00

manager   ~0053470

If you open the rentest.ico from your project file (ignore that it does not look like a text file), and then try to close the IDE (or otherwise trigger saving the project), does that work? Or is there a generic issue saving this file?

Max Vlasov

2011-10-26 17:08

reporter   ~0053471

Martin, the time for log is probably tomorrow.

Quick info

I have unit output lib/$(TargetCPU)-$(TargetOS) but always had the executable compiled in the main project dir. Can't remember when this was different.

When I rename the rentest to rentestrenamed, the problem is still there but the tab lists rentest, the renamed folder is rentest.bak, the file copied from the rentest subfolder one level up now named rentest. In other words the only trace of the renamed file is the original one (rentestrenamed) that resided in rentest subfolder, and now due to sub-folder renaming lives in rentest.bak

Max Vlasov

2011-10-26 17:10

reporter   ~0053472

Note: "When I rename the rentest to rentestrenamed" meant changing in the "Target FileName"

Martin Friebe

2011-10-26 17:14

manager   ~0053474

Good news: I was able to reproduce. It is opening the directory as file.

Probably, if that is saved, it corrupts your file-system, leading to the error on the ico file. (well that's a guess only)

Martin Friebe

2011-10-26 17:48

manager   ~0053476

Please test and close if ok

Max Vlasov

2011-10-27 09:30

reporter   ~0053494

Everything is fine in Lazarus 0.9.31 r33105M FPC 2.4.2 i386-linux-gtk 2
No source is opened when clicked at ?? items.
Thanks, Martin, closing.

Issue History

Date Modified Username Field Change
2011-10-25 14:37 Max Vlasov New Issue
2011-10-25 14:37 Max Vlasov Widgetset => GTK 2
2011-10-25 15:40 Martin Friebe Status new => assigned
2011-10-25 15:40 Martin Friebe Assigned To => Martin Friebe
2011-10-25 16:07 Martin Friebe LazTarget => -
2011-10-25 16:07 Martin Friebe Note Added: 0053428
2011-10-25 16:07 Martin Friebe Status assigned => feedback
2011-10-25 16:10 Martin Friebe Note Edited: 0053428
2011-10-25 16:10 Martin Friebe Note Edited: 0053428
2011-10-25 16:22 Martin Friebe Note Edited: 0053428
2011-10-26 15:06 Max Vlasov Note Added: 0053459
2011-10-26 15:15 Martin Friebe Note Added: 0053461
2011-10-26 15:33 Max Vlasov File Added:
2011-10-26 15:36 Max Vlasov Note Added: 0053463
2011-10-26 16:43 Martin Friebe Note Added: 0053468
2011-10-26 17:00 Martin Friebe Note Added: 0053470
2011-10-26 17:08 Max Vlasov Note Added: 0053471
2011-10-26 17:10 Max Vlasov Note Added: 0053472
2011-10-26 17:14 Martin Friebe Note Added: 0053474
2011-10-26 17:15 Martin Friebe Status feedback => assigned
2011-10-26 17:48 Martin Friebe Fixed in Revision => 33095
2011-10-26 17:48 Martin Friebe LazTarget - => 0.99.0
2011-10-26 17:48 Martin Friebe Status assigned => resolved
2011-10-26 17:48 Martin Friebe Fixed in Version => 0.9.31 (SVN)
2011-10-26 17:48 Martin Friebe Resolution open => fixed
2011-10-26 17:48 Martin Friebe Note Added: 0053476
2011-10-26 17:48 Martin Friebe Target Version => 0.99.0
2011-10-27 09:30 Max Vlasov Status resolved => closed
2011-10-27 09:30 Max Vlasov Note Added: 0053494