Error 203 (heap overflow) running Lazarus on Arch Linux lazarus / 1-Linux ---------------------------------------------------------------------- MatiasR · 2016-09-20 21:00 Hello! I've just installed Lazarus in my Arch Linux system, and when I attepmpt to run it I get this error message: Code: [Select]Runtime error 203 at $000000000043812C   $000000000043812C   $000000000041F9BD My system is up to date, fpc works fine (I can use it from the command line), I've tried reinstalling and rebooting with no luck and I've tried with both lazarus-qt and lazarus-gtk2. I don't know what to do! Any ideas? Thanks for your time! ---------------------------------------------------------------------- Leledumbo · 2016-09-21 08:54 Where do you get it from? Does it work if you build Lazarus from source? ---------------------------------------------------------------------- marcov · 2016-09-21 08:57 Erase configuration files and start over. This comes mostly from old/corrupt configuration files ---------------------------------------------------------------------- MatiasR · 2016-09-24 00:25 Quote from: Leledumbo on September 21, 2016, 10:54:41 amWhere do you get it from? Does it work if you build Lazarus from source? I got the package from the official repositories, and the error came from the command line after I tried to launch Lazarus from there (sorry if I missunderstood the question). I don't have experience  building big programs from source, but I'm starting to think I'll have to learn and do it because it's seems to be the only option Quote from: marcov on September 21, 2016, 10:57:20 amErase configuration files and start over. This comes mostly from old/corrupt configuration files The config files located in the ./lazarus folder? I have deleted them and started over with no luck. Is there any other config file I should remove? Update: Yesterday, out of the blue, Lazarus ran. Just one time, and appeared an error message saying it couldn't find the path to the fpc compiler (I don't see why this happens, everything is properly installed). After that I couldn't make it run again (and I didn't find where Lazarus saves the compiler path in order to modify it). To be honest, I don't know if the 203 runtime error and this are related, but I thought it'd be useful to give all the info I had. Thank you both for answering! It feels good to find people willing to help! ---------------------------------------------------------------------- Phil · 2016-09-24 00:46 Quote from: MatiasR on September 24, 2016, 02:25:33 amI got the package from the official repositories, and the error came from the command line after I tried to launch Lazarus from there. By "official", I assume you mean from here, right? https://sourceforge.net/projects/lazarus/files/ What files did you download and how did you install them? How did you start lazarus from the command line? Quote from: MatiasR on September 24, 2016, 02:25:33 amUpdate: Yesterday, out of the blue, Lazarus ran. Just one time, and appeared an error message saying it couldn't find the path to the fpc compiler I wonder if that was following your deletion of ./lazarus/environmentoptions.xml. I believe that's where the path is stored. And maybe you just got an error message that came before the usual heap error. Lazarus doesn't use that much RAM, so to get a heap error seems very odd. I don't know anything about Arch Linux, but sometimes Lazarus just hangs when I start it on Ubuntu. I don't use Ubuntu for anything but testing, but it sometimes makes me wonder about how reliable Lazarus is on Linux. I never see that kind of thing on Mac or Windows. ---------------------------------------------------------------------- MatiasR · 2016-09-24 01:07 Quote from: Phil on September 24, 2016, 02:46:37 amBy "official", I assume you mean from here, right? https://sourceforge.net/projects/lazarus/files/ What files did you download and how did you install them? How did you start lazarus from the command line? 1) No, sorry if I wasn't clear. I installed them from the official Arch Linux repositories. And by normal install I meant: Code: [Select]sudo pamcan -S lazarus lazarus-gtk2 2) Which installed the following packages: fpc-3.0.0-1  fpc- src-3.0.0-1  lazarus-1.6.0-2  lazarus-gtk2-1.6.0-2 3) I just typed 'lazarus' in the prompt (I also tried with 'startlazars', both attempts gave me the same outcome). Quote from: Phil on September 24, 2016, 02:46:37 amI wonder if that was following your deletion of ./lazarus/environmentoptions.xml. I believe that's where the path is stored. And maybe you just got an error message that came before the usual heap error. That's likely, but what calls my attention is that the program managed to at least show something that single time (after I closed it and tried again without modifying anything the 203 error came back) 1st Edit: Source of the mentioned packages: fpc-3.0.0-1  https://www.archlinux.org/packages/community/x86_64/fpc/ fpc-src-3.0.0-1  https://www.archlinux.org/packages/community/any/fpc- src/ lazarus-1.6.0-2  https://www.archlinux.org/packages/community/x86_64/lazarus/ lazarus-gtk2-1.6.0-2  https://www.archlinux.org/packages/community/x86_64/lazarus-gtk2/ 2nd Edit: The command startlazarus gave me this different error message: Code: [Select]Runtime error 216 at $00000000004916DB   $00000000004916DB   $000000000041E13D Which is a general protection fault (after running startlazarus again I got 203 instead of 216). ---------------------------------------------------------------------- Phil · 2016-09-24 01:19 Quote from: MatiasR on September 24, 2016, 03:07:46 am2) Which installed the following packages: fpc-3.0.0-1  fpc-src-3.0.0-1  lazarus-1.6.0-2  lazarus-gtk2-1.6.0-2 That looks okay. Quote from: MatiasR on September 24, 2016, 03:07:46 am3) I just typed 'lazarus' in the prompt (I also tried with 'startlazars', both attempts gave me the same outcome). I assume lazarus is on your path, or did you change to the lazarus installation directory? Does lazbuild work? It's just a console app, basically Lazarus without a UI. It should just ouput to the console its usage syntax. What Leledumbo was suggesting is to build Laz from source, something like this: cd lazarus make clean all ---------------------------------------------------------------------- MatiasR · 2016-09-24 01:36 Quote from: Phil on September 24, 2016, 03:19:17 amI assume lazarus is on your path, or did you change to the lazarus installation directory? Does lazbuild work? It's just a console app, basically Lazarus without a UI. It should just ouput to the console its usage syntax. What Leledumbo was suggesting is to build Laz from source, something like this: cd lazarus make clean all No, I didn't change the Lazarus installation directory. The packet manager installed it and handled all things related to /bin and /sbin folders. Yes, lazbuild works. PS: I don't have the .lazarus folder anymore, should I get a new one from somewhere? (if so, where can I download it from?). Thanks in advance. ---------------------------------------------------------------------- Phil · 2016-09-24 01:47 Laz should create a new .lazarus directory automatically, usually after an error message or two (just tested on my Mac). Since you don't have any extra packages installed yet, you won't get error messages about those. Maybe try changing to the lazarus installation directory (wherever that is) and try starting it like this: ./lazarus Probably won't make any difference. That's where you would rebuild Laz, by the way. If it's not a writable location, Laz will rebuild the binary in the ~/.lazarus/bin directory. ---------------------------------------------------------------------- MatiasR · 2016-09-24 01:54 Quote from: Phil on September 24, 2016, 03:47:18 amThat's where you would rebuild Laz, by the way. If it's not a writable location, Laz will rebuild the binary in the ~/.lazarus/bin directory. I just tried, but I got the following error: Code: [Select]Free Pascal Compiler version 3.0.0 [2015/11/26] for x86_64 Copyright (c) 1993-2015 by Florian Klaempfl and others (1002) Target OS: Linux for x86-64 (3104) Compiling fcllaz.pas (3104) Compiling registerfcl.pas (3104) Compiling lazaruspackageintf.pas /home/mati/builds/lazarus/packager/registration/registerfcl.pas(45,22) Fatal: (10022) Can't find unit process used by RegisterFCL Fatal: (1018) Compilation aborted make[1]: *** [Makefile:2702: fcllaz.ppu] Error 1 make[1]: Leaving directory '/home/mati/builds/lazarus/packager/registration' make: *** [Makefile:3050: registration] Error 2 ---------------------------------------------------------------------- Phil · 2016-09-24 02:04 Quote from: MatiasR on September 24, 2016, 03:54:27 am/home/mati/build s/lazarus/packager/registration/registerfcl.pas(45,22) Fatal: (10022) Can't find unit process used by RegisterFCL process is an FPC unit. Sounds like FPC isn't installed properly. Search for process.ppu / process.o to see if you have them. On my Mac they are in: /usr/local/lib/fpc/3.0.0/units/x86_64-darwin/fcl-process Who actually creates the installation pacakges for Arch Linux? You might check with them and see if anyone actually tested FPC and Laz on Arch Linux. ---------------------------------------------------------------------- MatiasR · 2016-09-24 02:18 Quote from: Phil on September 24, 2016, 04:04:51 amSearch for process.ppu / process.o to see if you have them. Who actually creates the installation pacakges for Arch Linux? You might check with them and see if anyone actually tested FPC and Laz on Arch Linux. The installation packages for arch are created by someone called Sergej Pupykin, I'll try to contact him. I could find process.ppu and process.o in:  /usr/lib/fpc/3.0.0/units/x86_64-linux/fcl-process/ I have three friends who have succesfully ran Lazarus on Arch Linux (they all installed it with pacman -S). ---------------------------------------------------------------------- Phil · 2016-09-24 02:32 Quote from: MatiasR on September 24, 2016, 04:18:18 amI have three friends who have succesfully ran Lazarus on Arch Linux (they all installed it with pacman -S). Yes, it should be completely painless. What about just reinstalling everything again? ---------------------------------------------------------------------- MatiasR · 2016-09-24 02:37 Quote from: Phil on September 24, 2016, 04:32:24 amWhat about just reinstalling everything again? I have already tried several times, this is getting a little frustrating. (reinstalling Lazarus and FPC, not the whole OS) ---------------------------------------------------------------------- Leledumbo · 2016-09-24 06:38 Do you have /etc/fpc.cfg or ~/.fpc.cfg? You should have that correctly configured to build Lazarus from source. ---------------------------------------------------------------------- MatiasR · 2016-09-24 14:42 Quote from: Leledumbo on September 24, 2016, 08:38:56 amDo you have /etc/fpc.cfg or ~/.fpc.cfg? You should have that correctly configured to build Lazarus from source. Yes, I have them both, but I can't tell if they're correctly configured. This is the ~/.fpc.cfg file:  http://pastebin.com/vwq760jV And this is the /etc/fpc.cfg file:  http://pastebin.com/fzYWyGiy ---------------------------------------------------------------------- Leledumbo · 2016-09-24 15:16 Quote from: MatiasR on September 24, 2016, 04:42:29 pmYes, I have them both, but I can't tell if they're correctly configured. In this case, only ~/.fpc.cfg will be read. The correct configuration is a single -Fu that points to your fpc units directory, in this case: -Fu/home/mati/fpc-3.0.0/lib/fpc/$fpcversion/units/$fpctarget/* I don't know if that's correct on your machine, it should contain rtl + each individual packages directory, for which the * is for. Right below them, are the .ppu's and .o's. Other than that, everything else is wrong (unless you customize and you know what you customize and how to configure them). ---------------------------------------------------------------------- Phil · 2016-09-24 15:30 Quote from: Leledumbo on September 24, 2016, 05:16:14 pm -Fu/home/mati/fpc-3.0.0/lib/fpc/$fpcversion/units/$fpctarget/* What about just renaming ~/.fpc.cfg to see if make would then use /etc/fpc.cfg? ---------------------------------------------------------------------- Leledumbo · 2016-09-24 17:02 Quote from: Phil on September 24, 2016, 05:30:53 pmWhat about just renaming ~/.fpc.cfg to see if make would then use /etc/fpc.cfg? Will need to check whether that file contents is correct either.