View Issue Details

IDProjectCategoryView StatusLast Update
0037029Lazarus-public2020-05-10 13:22
ReporterKarsten Rothemund Assigned To 
Status newResolutionopen 
Platformx86 64-linux-gtk2OSArchlinux 
Product Version2.0.8 
Summary0037029: Using TOpenDialog results in SIGESGV when program closed
DescriptionUsing TOpenDialog to select a file to load causes SIGSEGV at the end when closing the program. This does not happen, if the TOpenDialog is NOT used. It makes no difference how often the TOpenDialog is used - 1 use triggers the bug. The program itself seems to run without any problems until the main window/form is closed.
This is always the case. I added a minimal project which reproduces the behaviour (ocured on bigger project, could not identify a reason or point when it started - e.g. update of Lazarus or Archlinux).
Steps To Reproducestart program -> click "load file" button -> select file (no matter which one) -> click "close" button
Additional Informationcould not be reproduced on other platforms (only some tested).

stack trace from GDB:
Thread 1 "OpenFileTest" received signal SIGSEGV, Segmentation fault.
0x00007ffff033cee3 in ?? () from /usr/lib/
(gdb) bt
#0 0x00007ffff033cee3 in () at /usr/lib/
0000001 0x00007ffff7454dff in __call_tls_dtors () at /usr/lib/
0000002 0x00007ffff745469d in __run_exit_handlers () at /usr/lib/
0000003 0x00007ffff74546ee in () at /usr/lib/
0000004 0x00007ffff743d02a in __libc_start_main () at /usr/lib/
0000005 0x0000000000000000 in ()

looks like a problem with librsvg
TagsNo tags attached.
Fixed in Revision
WidgetsetGTK 2
Attached Files


related to 0033667 resolvedZeljan Rikalo Lazarus Exception-Klasse ┬╗External: SIGSEGV 
related to 0036992 resolvedJuha Manninen Packages SIGSEGV on application exit after calling ShowMessage() and related functions. 
related to 0036359 new Lazarus Simple project with gtk2 widget set hangs on startup 


Karsten Rothemund

2020-05-06 17:26

reporter (129,336 bytes)

Chris Rorden

2020-05-06 18:57

reporter   ~0122647

Last edited: 2020-05-06 20:32

View 2 revisions

I could not replicate this from the IDE or when running the compiled executable from the command line. I am using Lazarus 2.1 SVN 62843. Is there some property about the folders you are opening (e.g. read only, removable, etc) that might play a role? I am using Ubuntu 20.04 which deprecated GTK2. However, once the correct libraries are installed, GTK2 works fine

As described here
for Ubuntu 20.04, running "sudo apt-get install appmenu-gtk2-module" and restarting your computer helps GTK2. I wonder if archlinux has similar dependencies.

Karsten Rothemund

2020-05-07 17:21

reporter   ~0122655

Hello, there are no special properties for the folder. The folder for the project was just newly created for the minimal project I uploaded (the same with the work project where I first observed the problem): it is located in my HOME directory in subfolder for Lazarus projects; all this is on my SSD with encrypted LVM.

I will try to install appmenu-gtk-module (pacman -S appmenu-gtk-module) and try again.

Karsten Rothemund

2020-05-07 17:29

reporter   ~0122656

Installed the package and rebooted the computer, rebuilt the Lazarus project.

Result: no change; still get SIGSEGV. Backtrace is the same.

Zeljan Rikalo

2020-05-08 09:44

developer   ~0122666

You should test with fpc-3.2.0 and give feedback.

Karsten Rothemund

2020-05-08 15:52

reporter   ~0122671

Sorry, but fpc-3.2.0 is not available for Archlinux (even not in AUR) so far. So, I have to wait for this version to give feedback.

Zeljan Rikalo

2020-05-08 17:01

developer   ~0122672

But you can install 3.2.0 eg via fpcupdeluxe and try and then delete fpcupdeluxe directory when you don't need it anymore.

Sven Barth

2020-05-09 23:38

manager   ~0122687

@Karsten: I have attached a PKGBUILD for 3.2. Please note that I have not tested it.
PKGBUILD (3,189 bytes)   
# Maintainer: L <alaviss 0 at gmail dot com>
# Contributor: Sergej Pupykin <>
# Contributor: Valeriy Lyasotskiy <>
# Contributor: Jan Willemson <>
# Contributor: Hugo Ideler <>
# Contributor: BlackIkeEagle <ike DOT devolder AT gmail DOT com>
# Original PKGBUILD: Andre Naumann <>
# See

# Build docs

pkgname=('fpc-fixes' 'fpc-src-fixes')
[[ $_build_docs -ne 0 ]] && pkgname+=('fpc-docs-fixes')
arch=('i686' 'x86_64')
license=('GPL' 'LGPL' 'custom')
depends=('ncurses' 'zlib' 'expat')
# Trunk can only be built with stable version of FPC
makedepends=('fpc<9999' 'subversion')
[[ $_build_docs -ne 0 ]] && makedepends+=('texlive-core' 'texlive-htmlxml'
                                          'texlive-latexextra' 'ghostscript')

pkgver() {
  cd "${srcdir}"/fpcbuild/fpcsrc
  printf '%s.r%s' \
    $(grep -m 1 'version' Makefile.fpc | cut -d '=' -f 2) \
    $(svnversion | tr -d [A-z])

build() {
  cd "${srcdir}"/fpcbuild
  pushd fpcsrc/compiler
  fpcmake -Tall
  make NOGDB=1 OPT=' -dRelease' build

  if [[ $_build_docs -ne 0 ]]; then
    cd fpcdocs
    make -j1 FPCSRCDIR="${srcdir}"/fpcbuild/fpcsrc html

package_fpc-fixes() {
  pkgdesc="The Free Pascal Compiler is a Turbo Pascal 7.0 and Delphi compatible \
    Pascal Compiler. It comes with fully TP 7.0 compatible run-time library."

  cd "${srcdir}"/fpcbuild

  export HOME="${srcdir}"

  make -j1 PREFIX="${pkgdir}"/usr NOGDB=1 OPT=' -dRelease' install
  export PATH="${pkgdir}/usr/bin:${PATH}"

  install -Dm644 fpcsrc/rtl/COPYING.FPC \

  local _fpcarch=''
  case "$CARCH" in
      error 'Unsupported $CARCH'
      return 1
  ln -s /usr/lib/fpc/${_pkgver}/ppc${_fpcarch} "${pkgdir}"/usr/bin/
  unset _fpcarch

  install -dm755 "${pkgdir}"/etc
  "${pkgdir}"/usr/lib/fpc/${_pkgver}/samplecfg \
    "${pkgdir}"/usr/lib/fpc/${_pkgver} "${pkgdir}"/etc

  # use -fPIC by default
  echo -e '#ifdef cpux86_64\n# for x86_64 use -fPIC by default\n-Cg\n#endif' \
    >> "${pkgdir}"/etc/fpc.cfg

  mv "${pkgdir}"/usr/man "${pkgdir}"/usr/share/

  find "${pkgdir}"/etc -type f -exec sed -i "s|${pkgdir}||g" {} \;

package_fpc-src-fixes() {
  pkgdesc='Sources for the Free Pascal Compiler (required by the Lazarus IDE)'

  install -dm755 "${pkgdir}"/usr/lib/fpc

  svn export -r HEAD "${srcdir}"/fpcbuild/fpcsrc "${pkgdir}"/usr/lib/fpc/src

package_fpc-docs-fixes() {
  pkgdesc='Documentation for the Free Pascal Compiler'

  cd "${srcdir}"/fpcbuild/fpcdocs
  make PREFIX="${pkgdir}"/usr htmlinstall
PKGBUILD (3,189 bytes)   

Karsten Rothemund

2020-05-10 13:22

reporter   ~0122696

Hello Sven,

Thank you for the PKGBUILD. I have tried it but I run into this here:
[photor@Picard LAZARUS-Trunk]$ makepkg
==> Making package: fpc-fixes 3.2.0.r45317-1 (Sun May 10 13:17:15 2020)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Updating fpcbuild svn repo...
Updating '.':

Fetching external item into 'fpcsrc':
External at revision 45324.

Fetching external item into 'fpcdocs':
External at revision 1698.

At revision 1499.
==> Validating source files with sha1sums...
    fpcbuild ... Skipped
==> Extracting sources...
  -> Creating working copy of fixes_3_2 svn repo...
==> Starting pkgver()...
==> ERROR: pkgver is not allowed to contain colons, forward slashes, hyphens or whitespace.
==> ERROR: pkgver() generated an invalid version: 3.2.0-beta.r45324
[photor@Picard LAZARUS-Trunk]$

Looks as if the '-' between "3.2.0" and "beta" is the cause of trouble. I will try to find the cause of that but I have never created a PKGBUILD myself.

Issue History

Date Modified Username Field Change
2020-05-06 17:26 Karsten Rothemund New Issue
2020-05-06 17:26 Karsten Rothemund File Added:
2020-05-06 18:57 Chris Rorden Note Added: 0122647
2020-05-06 20:32 Bart Broersma Note Edited: 0122647 View Revisions
2020-05-06 21:33 Juha Manninen Relationship added related to 0033667
2020-05-06 21:38 Juha Manninen Relationship added related to 0036992
2020-05-07 07:33 Juha Manninen Relationship added related to 0036359
2020-05-07 17:21 Karsten Rothemund Note Added: 0122655
2020-05-07 17:29 Karsten Rothemund Note Added: 0122656
2020-05-08 09:44 Zeljan Rikalo Note Added: 0122666
2020-05-08 15:52 Karsten Rothemund Note Added: 0122671
2020-05-08 17:01 Zeljan Rikalo Note Added: 0122672
2020-05-09 23:38 Sven Barth Note Added: 0122687
2020-05-09 23:38 Sven Barth File Added: PKGBUILD
2020-05-10 13:22 Karsten Rothemund Note Added: 0122696