Lazarus freezes when start

Bug #919832 reported by Petr Hlozek
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Lazarus
Fix Released
Unknown
lazarus (Debian)
Fix Released
Unknown
lazarus (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Lazarus won't run when you try to open it.

I tried to run it from gdb and got this:

Starting program: /usr/bin/lazarus-ide
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",
[New Thread 0x7fffeec7e700 (LWP 2354)]
[New Thread 0x7fffee47d700 (LWP 2355)]
TLazarusManager.Run starting /usr/lib/lazarus/0.9.30/lazarus ...

Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",
TMainIDE.ParseCmdLineOptions:
  PrimaryConfigPath="/home/ok2cqr/.lazarus"
  SecondaryConfigPath="/etc/lazarus"
NOTE: editor options config file not found - using defaults
NOTE: miscellaneous options file not found - using defaults
NOTE: codetools config file not found - using defaults
TMainIDE.DoNewProject A
[Thread 0x7fffeec7e700 (LWP 2354) exited]

The last line is very important. My program is creatd in Lazarus as well and I have the same prblem. Program freezes when start with the same error!
---
ApportVersion: 1.91-0ubuntu1
Architecture: amd64
DistroRelease: Ubuntu 12.04
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha amd64 (20120107)
Package: lazarus 0.9.30.2-1
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=en_CA:en
 PATH=(custom, no user)
 LANG=en_CA.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 3.2.0-10.17-generic 3.2.1
Tags: precise running-unity
Uname: Linux 3.2.0-10-generic x86_64
UpgradeStatus: Upgraded to precise on 2012-01-19 (2 days ago)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo

Revision history for this message
Petr Hlozek (ok2cqr) wrote :

It is in Ubuntu 12.04, ne problem with version in 11.10

Revision history for this message
Petr Hlozek (ok2cqr) wrote :

I just download source from Lazarus webpage, compiled and when run got this:

ubuntu1204:~/lazarus$ gdb lazarus
GNU gdb (Ubuntu/Linaro 7.3.92-0ubuntu2) 7.3.92
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/ok2cqr/lazarus/lazarus...done.
(gdb) r
Starting program: /home/ok2cqr/lazarus/lazarus
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",
[New Thread 0x7fffeec7e700 (LWP 4367)]
[New Thread 0x7fffee47d700 (LWP 4368)]
TMainIDE.ParseCmdLineOptions:
  PrimaryConfigPath="/home/ok2cqr/.lazarus"
  SecondaryConfigPath="/etc/lazarus"
[Thread 0x7fffeec7e700 (LWP 4367) exited]

and Lazarus is frozen.

Revision history for this message
Petr Hlozek (ok2cqr) wrote :

after CTRL+C in gdb got this:

^C
Program received signal SIGINT, Interrupt.
0x00007ffff7bcd7ec in __lll_lock_wait ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
(gdb) br
Breakpoint 1 at 0x7ffff7bcd7ec
(gdb) bt
#0 0x00007ffff7bcd7ec in __lll_lock_wait ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x00007ffff7bc8fdb in _L_lock_1006 ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#2 0x00007ffff7bc8f5c in pthread_mutex_lock ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#3 0x00007ffff66bad61 in g_mutex_lock ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4 0x00007ffff6bd198e in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#5 0x00007ffff667f25e in g_main_context_prepare ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#6 0x00007ffff667fa5b in ?? ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#7 0x00007ffff667fbff in g_main_context_pending ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#8 0x000000000097b206 in APPPROCESSMESSAGES (this=0x7ffff7f95fb0)
    at gtk2widgetset.inc:2393
#9 0x00000000007ba109 in PROCESSMESSAGES (this=0x7ffff7f94410)
    at include/application.inc:351
#10 0x0000000000766851 in main () at lazarus.pp:102

Revision history for this message
Paul Gevers (paul-climbing) wrote : Re: [Bug 919832] [NEW] Lazarus freezes when start

Thank you for taking the time to report this bug and helping to make
Ubuntu better.

> TLazarusManager.Run starting /usr/lib/lazarus/0.9.30/lazarus ...

As you are using Ubuntu Precise (12.04) I assume (you could run
"apport-collect 919832" to verify) that you are using lazarus 0.9.30.2
so this path seems wrong.

> PrimaryConfigPath="/home/ok2cqr/.lazarus"

I believe it is configured in the directory above. As a test I propose
you move that directory aside and see if lazarus can start. If yes, move
the directory in place again and find references to 0.9.30 and replace
them with 0.9.30.2

Please report back.

Paul

Revision history for this message
Petr Hlozek (ok2cqr) wrote :

Hello Paul,

the config path is correct. It is into my homedirectory. If i try

apport-collect 919832
Package lazarus not installed and no hook available, ignoring

I tried to remove the .lazarus directory but the problem is still the same. What is much worse, the same problem has my app compiled in Lazarus. It uses threads as well. It seems that the problem is somewhere in fpc or Lazarus itself.

I attached a screenshot where you can see how it looks like.

Revision history for this message
Paul Gevers (paul-climbing) wrote : Re: [Bug 919832] Re: Lazarus freezes when start

Hi Petr,

On 22-01-12 10:22, Petr Hlozek wrote:
> https://bugs.launchpad.net/ubuntu/+source/lazarus/+bug/919832/+attachment/2687003/+files/lazarus.png

Looking at the screenshot it looks like you have mixing of versions. You
need the latest lazarus in Ubuntu Precise which is version 0.9.30.2-1
and NOT as the top of you screen shot shows 0.9.30-3. If I am correct,
version 0.9.30-3 was build against the previous version of fpc in
Ubuntu, so it will not work with the latest fpc.

Please install the "lazarus" package and run "apport-collect 919832"
again. I would really like to see the information that that would
provide, as it will tell us which versions of different dependencies are.

Paul

Revision history for this message
Petr Hlozek (ok2cqr) wrote : Dependencies.txt

apport information

tags: added: apport-collected precise running-unity
description: updated
Revision history for this message
Petr Hlozek (ok2cqr) wrote :

The same problem after instalation lazarus package. I created simple app with a button that will start thread. After I defined UseCThread variable, program freezes when start.

Revision history for this message
Paul Gevers (paul-climbing) wrote : Re: [Bug 919832] Re: Lazarus freezes when start

> + Package: lazarus 0.9.30.2-1

Does the window header still say 0.9.30-3 as in the screen shot?

Please run the following commands and report the output:
update-alternatives --display lazarus
update-alternatives --display lazarus-ide
cat /etc/lazarus/environmentoptions.xml
ls -ald /etc/lazarus*

Paul

Revision history for this message
Petr Hlozek (ok2cqr) wrote :
Download full text (3.6 KiB)

Yes, there is still 0.9.30-3 in the title of the Lazarus window.

ok2cqr@ubuntu1204:~$ update-alternatives --display lazarus
lazarus - auto mode
  link currently points to /usr/lib/lazarus/0.9.30
/usr/lib/lazarus/0.9.30 - priority 20
  slave lazarus.cfg: /etc/lazarus-0.9.30
  slave lazbuild: /usr/lib/lazarus/0.9.30/lazbuild
  slave lazbuild.1.gz: /usr/share/man/man1/lazbuild-0.9.30.1.gz
  slave lazres: /usr/lib/lazarus/0.9.30/tools/lazres
  slave lazres.1.gz: /usr/share/man/man1/lazres-0.9.30.1.gz
  slave lrstolfm: /usr/lib/lazarus/0.9.30/tools/lrstolfm
  slave lrstolfm.1.gz: /usr/share/man/man1/lrstolfm-0.9.30.1.gz
  slave svn2revisioninc: /usr/lib/lazarus/0.9.30/tools/svn2revisioninc
  slave svn2revisioninc.1.gz: /usr/share/man/man1/svn2revisioninc-0.9.30.1.gz
  slave updatepofiles: /usr/lib/lazarus/0.9.30/tools/updatepofiles
  slave updatepofiles.1.gz: /usr/share/man/man1/updatepofiles-0.9.30.1.gz
/usr/lib/lazarus/0.9.30.2 - priority 20
  slave lazarus.cfg: /etc/lazarus-0.9.30.2
  slave lazbuild: /usr/lib/lazarus/0.9.30.2/lazbuild
  slave lazbuild.1.gz: /usr/share/man/man1/lazbuild-0.9.30.2.1.gz
  slave lazres: /usr/lib/lazarus/0.9.30.2/tools/lazres
  slave lazres.1.gz: /usr/share/man/man1/lazres-0.9.30.2.1.gz
  slave lrstolfm: /usr/lib/lazarus/0.9.30.2/tools/lrstolfm
  slave lrstolfm.1.gz: /usr/share/man/man1/lrstolfm-0.9.30.2.1.gz
  slave svn2revisioninc: /usr/lib/lazarus/0.9.30.2/tools/svn2revisioninc
  slave svn2revisioninc.1.gz: /usr/share/man/man1/svn2revisioninc-0.9.30.2.1.gz
  slave updatepofiles: /usr/lib/lazarus/0.9.30.2/tools/updatepofiles
  slave updatepofiles.1.gz: /usr/share/man/man1/updatepofiles-0.9.30.2.1.gz
Current 'best' version is '/usr/lib/lazarus/0.9.30'.

ok2cqr@ubuntu1204:~$ update-alternatives --display lazarus-ide
lazarus-ide - auto mode
  link currently points to /usr/lib/lazarus/0.9.30/startlazarus
/usr/lib/lazarus/0.9.30.2/startlazarus - priority 20
  slave lazarus.xpm: /usr/share/pixmaps/lazarus-0.9.30.2.xpm
  slave startlazarus: /usr/lib/lazarus/0.9.30.2/startlazarus
/usr/lib/lazarus/0.9.30/startlazarus - priority 20
  slave lazarus.xpm: /usr/share/pixmaps/lazarus-0.9.30.xpm
  slave startlazarus: /usr/lib/lazarus/0.9.30/startlazarus
Current 'best' version is '/usr/lib/lazarus/0.9.30.2/startlazarus'.

ok2cqr@ubuntu1204:~$ cat /etc/lazarus/environmentoptions.xml
<?xml version="1.0"?>
<CONFIG>
  <EnvironmentOptions>
    <Version Value="106"/>
    <Debugger Class="TGDBMIDebugger"/>
    <DebuggerFilename Value="/usr/bin/gdb">
    </DebuggerFilename>
    <LazarusDirectory Value="/usr/lib/lazarus/0.9.30">
      <History Count="1">
        <Item1 Value="/usr/lib/lazarus/"/>
      </History>
    </LazarusDirectory>
    <CompilerFilename Value="/usr/bin/fpc">
      <History Count="3">
        <Item1 Value="/usr/local/bin/fpc"/>
        <Item2 Value="/usr/bin/fpc"/>
        <Item3 Value="/opt/fpc/fpc"/>
      </History>
    </CompilerFilename>
    <FPCSourceDirectory Value="/usr/share/fpcsrc/$(FPCVER)/">
      <History Count="2">
        <Item1 Value="/usr/share/fpcsrc/"/>
        <Item2 Value="/usr/share/fpcsrc/$(FPCVER)/"/>
      </History>
    </FPCSourceDirectory>
    <MakeFilename>
      <History Count="1">
      ...

Read more...

Revision history for this message
Paul Gevers (paul-climbing) wrote :

> ok2cqr@ubuntu1204:~$ update-alternatives --display lazarus
> lazarus - auto mode
> Current 'best' version is '/usr/lib/lazarus/0.9.30'.

Please run the following line and choose the 0.9.30.2 option
sudo update-alternatives --config lazarus

If this fixes your problem I will file a bug in the Debian bug tracker
to improve the choice of the alternative, which I believe will probably
prevent this problem in the future. So please let us know.

Paul

Revision history for this message
Petr Hlozek (ok2cqr) wrote :

I choose 0.9.30.2 option and the same problem.

It seems more related to freepascal than to Lazarus. I'll try to install new fpc into Ubuntu 12.04, compile Lazarus and let you knwo if it helped.

Revision history for this message
Petr Hlozek (ok2cqr) wrote :

I just downloaded fpc 2.6.0 from sourceforge, compile lazarus in it and still the same problem :-(.

gdb ./startlazarus
GNU gdb (Ubuntu/Linaro 7.3.92-0ubuntu2) 7.3.92
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/ok2cqr/lazarus/startlazarus...done.
(gdb) r
Starting program: /home/ok2cqr/lazarus/startlazarus
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",
[New Thread 0x7fffeec7e700 (LWP 7560)]
[New Thread 0x7fffee47d700 (LWP 7561)]
TLazarusManager.Run DefaultDir="/home/ok2cqr/lazarus/" CustomDir="/home/ok2cqr/.lazarus/bin/"
TLazarusManager.Run starting /home/ok2cqr/lazarus/lazarus ...

Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",
TMainIDE.ParseCmdLineOptions:
  PrimaryConfigPath="/home/ok2cqr/.lazarus"
  SecondaryConfigPath="/etc/lazarus"
NOTE: editor options config file not found - using defaults
NOTE: miscellaneous options file not found - using defaults
NOTE: codetools config file not found - using defaults
TMainIDE.DoNewProject A
[Thread 0x7fffeec7e700 (LWP 7560) exited]

Revision history for this message
Petr Hlozek (ok2cqr) wrote :

^C
Program received signal SIGINT, Interrupt.
0x0000000000542011 in SYSTEM_FPSYSCALL$INT64$INT64$INT64$INT64$INT64$$INT64 ()
(gdb) bt
#0 0x0000000000542011 in SYSTEM_FPSYSCALL$INT64$INT64$INT64$INT64$INT64$$INT64 ()
#1 0x00000000005425f0 in SYSTEM_FPWAITPID$LONGINT$PCINT$LONGINT$$LONGINT ()
#2 0x00007ffff7f85ae0 in ?? ()
#3 0x00000000005eb487 in UNIX_WAITPROCESS$LONGINT$$LONGINT ()
#4 0x00007fff00007f00 in ?? ()
#5 0x00007ffff7f65720 in ?? ()
#6 0x0000000000541c60 in pango_context_list_families@plt ()
#7 0x000000000064c734 in PROCESS_TPROCESS_$__WAITONEXIT$$BOOLEAN ()
#8 0x00007ffff7f6d180 in ?? ()
#9 0x000000000059b9c5 in WAITONEXIT (this=0x7ffff7fef9c0) at lazarusmanager.pas:393
#10 0x000000000059b4fd in RUN (this=0x7ffff7f6d180) at lazarusmanager.pas:347
#11 0x0000000000541e1d in main () at startlazarus.lpr:47

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in lazarus (Ubuntu):
status: New → Confirmed
Revision history for this message
Patrick Chevalley (pch) wrote :

This as been fixed upstream. Reason is thread management change in glib2 2.31.
See http://bugs.freepascal.org/view.php?id=21129

The fix is available here:
http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=rev&root=lazarus&revision=35051

It apply without problem to Lazarus 0.9.30.2 source and for me this fix the problem.

Revision history for this message
Petr Hlozek (ok2cqr) wrote :

Hello,

please apply this patch. Author is Zeljan Rikalo. Thank you!

It will fix the bug caused by changes in threads in new glib library version.

Petr

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "gtk2widgetset.inc.patch" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Changed in lazarus:
status: Unknown → Fix Released
Revision history for this message
Petr Hlozek (ok2cqr) wrote :

I already posted here a patch. How can I help to get it into Precise release? My program depends on that. Without it, it won't work.

Changed in lazarus (Debian):
status: Unknown → New
Revision history for this message
Paul Gevers (paul-climbing) wrote :

I will try to create a debdiff for this patch bug, so that we can universe-sponsors. I will create a package in my ppa to test the working: https://launchpad.net/~paul-climbing/+archive/testing-area

Changed in lazarus (Ubuntu):
assignee: nobody → Paul Gevers (paul-climbing)
Revision history for this message
Petr Hlozek (ok2cqr) wrote :

Hello Paul,

thank you! Please drop here a line when you finish. I'll test it immediately.

Petr

Revision history for this message
Paul Gevers (paul-climbing) wrote :

The package is built in my PPA from where you can install it, but in the mean time Debian has released a new version of lazarus which fixes this bug, so we should pull it into Ubuntu. I filled a sync request just moments ago [1].

[1] https://bugs.launchpad.net/bugs/932285

Changed in lazarus (Ubuntu):
assignee: Paul Gevers (paul-climbing) → nobody
Changed in lazarus (Debian):
status: New → Fix Released
Revision history for this message
Paul Gevers (paul-climbing) wrote :

Lazarus 0.9.30.2-2 contains the patch reported in this bug, so I consider this bug fixed. Please reopen if this does not work for you.

Changed in lazarus (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
linux-man (caldas-lopes) wrote :

0.9.30.2-2 and 0.9.30.2-2ubuntu1~ppa1p are still freezing on precise amd64.

Revision history for this message
Petr Hlozek (ok2cqr) wrote :

Here no problem at all. Lazarus starts withou any problem. Debugging is broken but my project is compiling fine. Thank you for great work Paul!

Revision history for this message
linux-man (caldas-lopes) wrote :

I can only use 0.9.31. All other versions freeze without error messages.

Revision history for this message
linux-man (caldas-lopes) wrote :

After reinstalling all and a make 0.9.30.2-2 works.
One really old bug still exists: Some lpk files are still missing on debs, like rx.lpk. Why?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.