Lazarus - Runtime error 204 if lazarus veriosn > 0.9.16 b lazarus / 1-Linux ---------------------------------------------------------------------- RNZ · 2006-11-29 06:20 All version later 0.9.16 beta, haveon my pc Runtime error 204 on startup Code: [Select]~/lazarus $ ./lazarus Runtime error 204 at $08064AB3   $08064AB3   $08064EA2   $08064035   $080ED470   $080ED9B7   $080EEDD0   $08061D65   $08053AD9  main,  line 79 of lazarus.pp   $08053A2D ~/lazarus $ ./startlazarus Runtime error 204 at $08064AB3   $08064AB3   $08064EA2   $08064035   $080ED480   $080ED9B7   $080EEDD0   $08061D65   $08053AD9  main,  line 79 of lazarus.pp   $08053A2D My PC configuration MB Gigabyte GA-965P-S3/CPU Core 2 Duo E6300/RAM DDR-2 1 Gb OS Gentoo 2006.1 kernel 2.6.18 (nptl nptlonly) Lazarus 0.9.20 ---------------------------------------------------------------------- Vincent Snijders · 2006-11-29 07:49 Something seems to go wrong with the intialization of a unit. Because the fpc units are compiled without debug info, it is impossible to see which unit fails. Can you recompile the fpc units with debug info? ---------------------------------------------------------------------- RNZ · 2006-11-29 08:35 how can i'm recompile the fpc units with debug info? in gentoo? ---------------------------------------------------------------------- RNZ · 2006-11-29 15:09 Code: [Select]rnz@rnzws ~/lazarus $ gdb ./lazarus GNU gdb 6.5 Copyright (C) 2006 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB.  Type "show warranty" for details. This GDB was configured as "i686-pc-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1". (gdb) run Starting program: /home/rnz/lazarus/lazarus Failed to read a valid object file image from memory. [Thread debugging using libthread_db enabled] [New Thread -1212885312 (LWP 12702)] Runtime error 204 at $08064AB3   $08064AB3   $08064EA2   $08064035   $080ED470   $080ED9B7   $080EEDD0   $08061D65   $08053AD9  main,  line 79 of lazarus.pp   $08053A2D Program exited with code 0314. (gdb) ---------------------------------------------------------------------- Marc · 2006-11-30 10:46 on a command prompt in the fpc source dir do a Code: [Select]make all OPT=-gl (or a -g if you want to debug into the fcl/rtl) ---------------------------------------------------------------------- RNZ · 2006-11-30 11:31 Code: [Select]rnz@rnzws ~/lazarus $ make clean; make all make all OPT=-gl rnz@rnzws ~/lazarus $ cd ide rnz@rnzws ~/lazarus/ide $ ddd ../lazarus GNU DDD 3.3.11 (i686-pc-linux-gnu), by Dorothea LUsing host libthread_db library "/lib/libthread_db.so.1". (gdb) break lazarus.pp:79 Breakpoint 1 at 0x8053ac8: file lazarus.pp, line 79. (gdb) set args (gdb) run Failed to read a valid object file image from memory. [Thread debugging using libthread_db enabled] [New Thread -1212782912 (LWP 6096)] [Switching to Thread -1212782912 (LWP 6096)] Breakpoint 1, main () at lazarus.pp:79 (gdb) step 0x08061d28 in fpc_initializeunits () (gdb) step Single stepping until exit from function fpc_initializeunits, which has no line number information. Runtime error 204 at $08064AB3   $08064AB3   $08064EA2   $08064035   $080ED480   $080ED9B7   $080EEDD0   $08061D65   $08053AD9  main,  line 79 of lazarus.pp   $08053A2D Program exited with code 0314. (gdb) fpc_initializeunits.. what to do next? ---------------------------------------------------------------------- Vincent Snijders · 2006-11-30 13:50 You just rebuild the Lazarus sources. You first need to rebuild the FPC sources to get more debug info. ---------------------------------------------------------------------- RNZ · 2006-12-17 22:11 Code: [Select] rnz@rnzws ~/lazarus $ ./lazarus Runtime error 204 at $08064AB3   $08064AB3  SYSGETMEM,  line 955 of /var/tmp/portage/dev- lang/fpc-2.0.4/work/fpcbuild_2.0.4_exp/fpcsrc/rtl/inc/heap.inc   $08064EA2  SYSREALLOCMEM,  line 1206 of /var/tmp/portage/dev- lang/fpc-2.0.4/work/fpcbuild_2.0.4_exp/fpcsrc/rtl/inc/heap.inc   $08064035  REALLOCMEM,  line 390 of /var/tmp/portage/dev- lang/fpc-2.0.4/work/fpcbuild_2.0.4_exp/fpcsrc/rtl/inc/heap.inc   $080ED470  READTIMEZONEFILE,  line 8576 of ../unix/timezone.inc   $080ED9B7  INITLOCALTIME,  line 311 of ../unix/timezone.inc   $080EEDD0  UNIX_init,  line 1285 of ../unix/unix.pp   $08061D65  fpc_initializeunits,  line 612 of /var/tmp/portage/dev- lang/fpc-2.0.4/work/fpcbuild_2.0.4_exp/fpcsrc/rtl/inc/system.inc   $08053AD9  main,  line 80 of lazarus.pp   $08053A2D ---------------------------------------------------------------------- Vincent Snijders · 2006-12-18 10:38 This is useful information. It seems to allocate a negative number of bytes in READTIMEZONEFILE. Can you try to compile and run the following program? Code: [Select] program test; uses unix; begin   writeln('Test'); end. ---------------------------------------------------------------------- RNZ · 2006-12-20 23:51 Test program - compiled and worked ok: Code: [Select]rnz@rnzws ~/fpc-test $ cat test.pp program test; uses unix; begin   writeln('Test'); end. rnz@rnzws ~/fpc-test $ fpc test.pp Free Pascal Compiler version 2.0.4 [2006/12/18] for i386 Copyright (c) 1993-2006 by Florian Klaempfl Target OS: Linux for i386 Compiling test.pp Linking test 7 Lines compiled, 0.0 sec rnz@rnzws ~/fpc-test $ ./test Test rnz@rnzws ~/fpc-test $ Vincent, what do next? ---------------------------------------------------------------------- Vincent Snijders · 2006-12-21 08:13 It is a pity that the test program works. I have no knowlegde about the timezone initialization on freebsd, so I cannot see where the bug is. Because the test program worked and Lazarus didn't, maybe there is some memory corruption going on. Can you try compiling lazarus with OPT='-ghl'? ---------------------------------------------------------------------- RNZ · 2006-12-21 10:17 I'm update to gentoo-kernel-2.6.18-r4 and now runtime error - no. ---------------------------------------------------------------------- Vincent Snijders · 2006-12-21 10:44 So, the update of gentoo fixed your crash? ---------------------------------------------------------------------- RNZ · 2006-12-21 11:02 I think update kernel or glib (to 2.12.5) - solve problem ---------------------------------------------------------------------- Vincent Snijders · 2006-12-21 12:10 Good :-) ---------------------------------------------------------------------- sembei · 2006-12-25 23:38 I had the same problem.  The solution was to create the files /etc/timezone and /etc/zoneinfo, that were missing in my system for unknown reason. Previous versions of lazarus where working ok in the same system. I think that lazarus/fpc should throw a more detailed error message when in this situation.