View Issue Details

IDProjectCategoryView StatusLast Update
0036509LazarusCompilerpublic2020-01-04 20:02
ReporterdevEric69 Assigned ToMartin Friebe  
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
PlatformLinux x86_64OSUbuntu  
Summary0036509: The fpDebug debugger freezes my application and IDE when I run a debug.
DescriptionI can't use fpDebug.
Steps To Reproduce- new application.
- new form with a button, and an event in which I code ShowMessage('Hello Laz. + FPC.');
- I put a breakpoint on the line.
- I start debugging.
When I click on the button, everything is definitely frozen.
Additional InformationMy OS:
Ubuntu 18.04.2 LTS 64 bits
--- . --- . ---
Lazarus version: 2.1.0
Lazarus svn revision: 62478M
Lazarus build date: 2020/01/03
Lazarus was compiled for x86_64-linux
Lazarus was compiled with fpc 3.0.4
--- . --- . ---
Lazarus' launcher in Ubuntu: : gnome-terminal -e "bash -c 'sudo -i //home/guepard/SauveWinE_etc/lazarus/lazarus --pcp=/home/guepard/SauveWinE_etc/a_projetsLaz/copieW_projetsMaison/eXe_s/e_mini_watched_dirs/tronc/primary_config_path_files_config --debug-log=/home/guepard/SauveWinE_etc/lpk_to_install_manualy/file.log --log-enable=DBG_STATE,DBG_DATA_MONITORS,DBG_ERRORS,DBG_VERBOSE,DBG_WARNINGS,DBG_BREAKPOINTS,DBG_FPDEBUG_VERBOSE,FPDBG_BREAKPOINT_ERRORS,FPDBG_BREAKPOINTS'"
--- . --- . ---
installation with last Releas FPCupDeluxe...
... with (!!!) same overriden infos for FPC and Lazarus (from memory, it's so I can debug the RTL, FPC, etc.): -O1 -gw2 -godwarfsets -gl
[question: is it still ok, if I have to compile afterwards with fpLazDebugger + Dwarf3?]
--- . --- . ---
target: Linux + x86_64
--- . --- . ---
reproductibility:
The IDE is frozen.
I attached 2 log files with fpDebug, but it's like the debugger quickly stops writing to them.
I've attached a log file created with GDB (which apparently works well): it's more "verbose".
--- . --- . ---
I have attached screenshots of the fpDebug configuration in the IDE.
--- . --- . ---
To resume:
given how little written data there is, it might be "mission impossible" to figure out where it came from...
==> don't hesitate to ask questions if you want more information, or additional tests: I'd really like to use this debugger. Nevertheless, as written, I'm not stuck: GDB works.

PS: as the debugger froze in FPC version 3.2 (my initial installation), I reinstalled by downgrading FPC version 3.0.4.
But, so it's the same thing.

Regards
TagsNo tags attached.
Fixed in Revision62491
LazTarget-
Widgetset
Attached Files

Activities

devEric69

2020-01-03 18:38

reporter  

FpDebug_visual_config.7z (266,002 bytes)

Martin Friebe

2020-01-03 20:52

manager   ~0120198

If possible can you please (all steps together, or as many of them as possible):

1) Compile the IDE with -dDebuglnLinuxDebugEvents

2) Run the IDE in a terminal. So the IDE can print to stdout.
Then instead of --debug-log=/h.....file.log --log-enable=DBG.....
use only --log-enable=DBG.....

Skipping the log file means printing to stdout. This often is unbuffered, or has a smaller buffer. So maybe more info will be written. (It can still be lost in the IDE....)

2a) amending 2
run the IDE inside gdb
    gdb //home/guepard/SauveWinE_etc/lazarus/lazarus
and in gdb
   run --pcp=/home/guepa.... rest of arg....

That way, if the IDE encounters a SIGSEGV it will be caught.

Thanks.

--------------------
[question: is it still ok, if I have to compile afterwards with fpLazDebugger + Dwarf3?]
fpdebug runs fine with dwarf 2 or 3 or mix of it.... So should be fine.

---------------------
"hangs"
refers to:
- the IDE hangs
- and the debugged app hangs
?
Your OS still works?

devEric69

2020-01-03 21:48

reporter   ~0120199

Last edited: 2020-01-03 21:49

View 2 revisions

==> thanks for the answer.

>
> "hangs"
> refers to:
> - the IDE hangs
>- and the debugged app hangs
>?

Both :-\
But, I have good news: fpDebug works now.
I have reinstalled, still with the latest FPCupDeluxe version,...:
- FPC 3.0.4
- Lazarus version: 2.0.4
...without the override in the "setup+" button of FPCupDeluxe( ie no "-O1 -gw2 -godwarfsets -gl"). Nevertheless, I'll try again with it.
Becoming paranoid, I've compiled:
- fpdebug package manually (open->use->install).
- LazDebugger package manually too (open->use->install)
because there versions were 0.0 in OPM which is wrong.
With this configuration it works fine: step by step, breakpoints, other debug windows (see annotated screenshots).

>
> If possible can you please [snip]
>

Thank you for this informations. On Monday, I'll redo some installation tests, and if it gets stuck again, I'll use your "tricks".
Now that I've found a trick, to install a good configuration where fpDebug or Gdb can alternatively debug, I'll do some tests on Monday.

ps: I think this "bug" should be deleted or canceled: It's complex, between the combinations of FPC + Laz, my compilation's override parameters in FPCupDeluxe, and the OPM's versions quirk...

FpDebug_OK.png (306,705 bytes)

Martin Friebe

2020-01-04 02:18

manager   ~0120202

>> because there versions were 0.0 in OPM which is wrong.

LazDebuggerFp / fpDebug should not be in OPM.

They are part of the default distro.. They are in the Lazarus sources.
You can install them from the Package menu > "Install/Uninstall Packages"
(actually in 2.1 they should be part of bigide)

And they are version 0.9.

devEric69

2020-01-04 14:22

reporter   ~0120209

That's right: I'm all wrong; it has nothing to do with OPM.

They indeed appear in menu > "Install/Uninstall Packages.
However, on the right side of the packages that can be installed, they were mentioned in version "0.0", on my third (and successful) reinstallation. Whereas the during the first 2 previous installations, they appeared correctly with version "0.9". Hence my last decision to "open" these packages, "compile", and "use \ install" them, one by one.
fpDebugVersion-0-0.png (108,497 bytes)   
fpDebugVersion-0-0.png (108,497 bytes)   

Martin Friebe

2020-01-04 18:55

manager   ~0120219

Good news... I just got the issue (or a matching in description issue) myself. Including (hopefully) meaningful backtraces.

Martin Friebe

2020-01-04 20:02

manager   ~0120222

Should be fixed. Please test with r62491 or higher.

Issue History

Date Modified Username Field Change
2020-01-03 18:38 devEric69 New Issue
2020-01-03 18:38 devEric69 File Added: FpDebug_visual_config.7z
2020-01-03 18:46 Jonas Maebe Project FPC => Lazarus
2020-01-03 20:34 Martin Friebe Assigned To => Martin Friebe
2020-01-03 20:34 Martin Friebe Status new => assigned
2020-01-03 20:52 Martin Friebe Note Added: 0120198
2020-01-03 21:48 devEric69 File Added: FpDebug_OK.png
2020-01-03 21:48 devEric69 Note Added: 0120199
2020-01-03 21:49 devEric69 Note Edited: 0120199 View Revisions
2020-01-04 02:18 Martin Friebe Note Added: 0120202
2020-01-04 14:22 devEric69 File Added: fpDebugVersion-0-0.png
2020-01-04 14:22 devEric69 Note Added: 0120209
2020-01-04 18:55 Martin Friebe Note Added: 0120219
2020-01-04 20:02 Martin Friebe Status assigned => resolved
2020-01-04 20:02 Martin Friebe Resolution open => fixed
2020-01-04 20:02 Martin Friebe Fixed in Revision => 62491
2020-01-04 20:02 Martin Friebe LazTarget => -
2020-01-04 20:02 Martin Friebe Note Added: 0120222