Sigsegv error lazarus / 8-Other ---------------------------------------------------------------------- Anonymous · 2004-12-23 17:01 I have created 2 forms (Form1 and Form2).  If Form1 just has a button that excute the follow code.    Application.CreateForm(TFrom2, Form2);    Form2.Visible := True; When I place a DBEdit box on Form2 and run the program form2 opens but when I close it I get the following error Project project1 raised exception class 'External: SIGSEGV' followed by The file "asstrings.inc" was not found. If I remove the DBEdit box from Form2 it behaves fine. ---------------------------------------------------------------------- talorigomat · 2005-01-05 08:00 Following your example using  lazarus-0.9.4.1-20050103-win32.exe I received the error.  If you free the DBedit box in the Form2's OnClose event handler (ie:DBEdit1.Free) the form closes without a problem ---------------------------------------------------------------------- Anonymous · 2005-08-14 17:07 I also get this error.  First with 0.9.8 and then with the 0.9.9 release. And I'm only just compiling a simple project with no user modified code.  So the error seems to originate from the LCL framework itself... or I haven't installed Lazarus correctly. Any ideas what to do? --- Prognatus ---------------------------------------------------------------------- Anonymous · 2005-08-14 17:21 More info: The execution stops on the first line in TCustomForm.SetVisible in customform.inc: {--------------------------------------------------------------------- ---------        TCustomForm SetVisible ---------------------------------------------------------------------- --------} Procedure TCustomForm.SetVisible(Value : boolean); Begin   if (Value=(fsVisible in FFormState)) and (Visible=Value) then exit;   //DebugLn('[TCustomForm.SetVisible] START ',Name,':',ClassName,' Old=',Visible,' New=',Value,' ',(fsCreating in FFormState),' ',FormUpdating);   if Value then     Include(FFormState, fsVisible)   else     Exclude(FFormState, fsVisible);   //DebugLn('TCustomForm.SetVisible ',Name,':',ClassName,' FormUpdating=',FormUpdating,' fsCreating=',fsCreating in FFormState);   if (fsCreating in FFormState) {or FormUpdating} then     // will be done when finished loading   else   begin     inherited Visible:=Value;   end;   //DebugLn('[TCustomForm.SetVisible] END ',Name,':',ClassName,' ',Value,' ',(fsCreating in FFormState),' ',FormUpdating,' ',Visible); end; --- Prognatus ---------------------------------------------------------------------- Anonymous · 2005-08-14 23:23 More info: All I did was install Lazarus, create a LCL application, create two forms, drop a few components on them and compile. So why do I get the error (above)?  I'm stuck. Any help would be appreciated. --- Prognatus ---------------------------------------------------------------------- glober · 2005-08-15 00:08 Not sure what is happening with your setup but one thing you can always try is the clean directory trick and see if that helps. Its under [menu]->File->Clean directory. Try cleaning out you lazarus directory and rebuild lazarus, and try cleaning the project directory as well. ---------------------------------------------------------------------- Anonymous · 2005-08-15 18:45 No difference after cleaning directories and rebuilding Lazarus...  What gives? I read the installation notes in ... http://wiki.lazarus.freepascal.org/index.php/Installing_Lazarus#Instal ling_Lazarus_under_Windows ...and compiled Lazarus with these commands: cd c:\lazarus set path=c:\lazarus\pp\bin\i386-win32;c:\lazarus windres -i lazarus.rc -o lazarus.res make ...And got the same error on program Run (sigsegv error). So I need to verify first if I have installed everything correctly and also if there's some additional setup I need to do (paths, etc.) before compiling a project. Any idea what I should check or look for? --- Prognatus ---------------------------------------------------------------------- Anonymous · 2005-08-15 23:01 I've tried various ways to find out what's causing this.  Tried to execute until cursor (F4) until "Application.Initialize;", but it crashes before that(!)  LOL  Have also tried altering compiler and debugger options, etc.  Nothing.  Tried to disable the debugger, but then the app just dies before I see anything... Frustrating! Even the Test button in compiler options fails... Ideas are most welcome! --- Prognatus ---------------------------------------------------------------------- Anonymous · 2005-09-15 06:34 Tried to get help on this in the dev mailinglist, giving up for the time being. --- Prognatus ---------------------------------------------------------------------- Vincent Snijders · 2005-09-15 07:34 By any chance, do you have cygwin tools installed? ---------------------------------------------------------------------- Anonymous · 2005-09-16 12:22 No, not that I'm aware of. I have Delphi 6 installed though.  Is this a problem with Lazarus? ---------------------------------------------------------------------- Vincent Snijders · 2005-09-16 13:28 It shouldn't, but to minimize the interference, can you try the following: Open a dos-box. cd \to\your\lazarus\dir SET PATH= lazarus.exe ---------------------------------------------------------------------- Anonymous · 2005-09-17 19:35 Tried that now. No change... Running the simplest program; default new "Application" Project1 with one blank Form1, this is the error cyclus in detail: 1. First the SIGSEV error dialog box 2. Then this dialog: Execution paused Adress: $7C918FEA Procedure: ?? File: (Some day an assembler window might popup here 3. I press OK 4. nothing of the program on screen... --- Prognatus ---------------------------------------------------------------------- Anonymous · 2005-09-17 19:48 Can you send me the executable? I hope it crashes here too, so there is something to be debugged. ---------------------------------------------------------------------- Anonymous · 2005-09-17 19:59 Sure I can.  Are you Vincent? If so, I have your email from the dev mailinglist. If not, I need an email address to send it to. --- Prognatus ---------------------------------------------------------------------- Anonymous · 2005-09-17 20:01 Uh oh... seems I don't have Vincent's email address after all... --- Prognatus ---------------------------------------------------------------------- Anonymous · 2005-09-17 20:20 After I wrote the message above, I realized that Vincent has an email button below his posts... So I've sent it now. --- Prognatus ---------------------------------------------------------------------- Vincent Snijders · 2005-09-17 20:48 I received the program and it shows an empty form, without error. Do you get an error too, if you run it outside the IDE? What windows version are you using? Try unchecking the 'Win32 Gui Application' checkbox (Compiler Options, Linking tab) and run it from a dos-box, maybe we get more info about the crash then. ---------------------------------------------------------------------- Anonymous · 2005-09-17 21:49 > Do you get an error too, if you run it outside the IDE? As a matter of fact, no!  It does run outside the IDE!  ...But last time I tried the same thing, it didn't run that way either.  Tried the same with "Willy", another app I've been working on in the IDE, and this one does NOT run outside the IDE.  (see more below) > What windows version are you using? International (english) Windows XP Pro with SP2. > Try unchecking the 'Win32 Gui Application' checkbox (Compiler Options, Linking tab) and run it from a dos-box, maybe we get more info about the crash then. OK, here's the info I get when running Willy then: [FORMS.PP] ExceptionOccurred   Sender=Exception   Exception=Unknown Run-Time error : 210   Stack trace:   $0055FBBC  MAIN_init,  line 105 of main.pas TApplication.HandleException Unknown Run-Time error : 210   Stack trace:   $0055FBBC  MAIN_init,  line 105 of main.pas [FORMS.PP] ExceptionOccurred So... the small default app manages to INIT itself outside the IDE, while the larger Willy does not.  This looks like a stack/heap size problem...  Maybe? --- Prognatus ---------------------------------------------------------------------- Anonymous · 2005-09-17 22:24 OK, I've come a little bit further now.  I get more info when I run it as a concole app. I've commented out ShowModal in Main.pas (that was line 105 above) and now there's another error:   "Exception=Error reading ImageList1.OnChange: Invalid value for property" ...but the ImageList1 on the main form is empty and no OnChange event made yet.  If I make an OnChange event, it says the same.  Maybe there are some old data in the resource file?  I tried to clean the directory. --- Prognatus ---------------------------------------------------------------------- Anonymous · 2005-09-17 22:29 Doesn't help to remove the ImageList from main form. But I've discovered two more bugs in the IDE. --- Prognatus ---------------------------------------------------------------------- Anonymous · 2005-09-17 22:48 New bug reports: bug# 1174 and 1175. --- Prognatus ---------------------------------------------------------------------- Anonymous · 2005-09-17 23:25 Vincent, I've come a huge step further.  Things looks much brighter now! Turned out I had yet another ImageList1 on another form.  When I removed that, Willy runs outside the IDE (but still not inside).  It seems blank/empty ImageList's are a problem.  Know why? So why can't I get apps to run inside the IDE...?  Any suggestions? --- Prognatus ---------------------------------------------------------------------- Anonymous · 2005-09-19 02:10 Vincent, thank you very much for your help so far! I've noticed a peculiar thing about running this app inside the IDE: if I maximize the Message window, it runs with the debugger after the error!  But only if the Message window is maximized... (I haven't tried with any of the other windows).  BTW, there's also a new bug concerning the maximized Message window: bug #1181. Does this fact give you some ideas as to why I can't run this app normally inside the IDE? ---------------------------------------------------------------------- Vincent Snijders · 2005-09-19 07:27 I have no IDE why it doesn't work in the IDE. Do you have the debugger enabled (Environment, Debugger Options, Debugger Type)? If so, I wonder what happens if you set it to none, or if you have 'None' now, what happens if you set it to gdb. ---------------------------------------------------------------------- Prognatus · 2005-09-19 16:01 Quote from: "Vincent"I have no IDE why it doesn't work in the IDE. LOL!  (I like word games like that) QuoteDo you have the debugger enabled (Environment, Debugger Options, Debugger Type)? If so, I wonder what happens if you set it to none, or if you have 'None' now, what happens if you set it to gdb. You're right, this was a step further!  Before I had the GDB debugger enabled.  When I disable it by selecting "none", the app runs without crashing.  Windows don't complain either. (I tried the same thing about 14 days ago and it didn't make any difference then.  But now I'm running a newer version of Lazarus.) So this seems to be a debugger issue.  I suspect memory leakage or too narrow cache and/or heap sizes.  Do you agree? It's also interesting that it seems to make a difference when the Message window is maximized.  This may be a clue. I don't think I will try to track down an error in GDB though.  It's out of my league. There's also a possible bug about empty StringLists.  I get an error saying something about wrong property for OnClick event...  Is this a known issue? --- Prognatus ---------------------------------------------------------------------- Anonymous · 2005-09-19 16:17 I consider case closed now.  Thanks for all your help, Vincent! Sooner or later I will need a working debugger, but I'll look out for any future bug fixes in that direction. --- Prognatus ---------------------------------------------------------------------- Anonymous · 2006-02-24 00:17 I have found a possible temporary solution for whoever is interested anymore. I've found out about Lazarus a few weeks ago and I had the same problem: even the simplest Windows application would fail to run started from whithin the RAD application, so the problem was the debuger. I had also a dowloaded copy of FreePascal 2.0.0 and installed. So what I've made was to change the gdb.exe application used by Lazarus for debug with the one found in \\FPC\2.0.0\bin\ and no more problems appeared. I don't know what the problem could be (I think is the same gdb) but this solved the problem for me. Hope this post will help somebody. Also I want to congratulate the initiative of this project and I've already started to develop personal applications using Free Pascal & Lazarus instead of Delphi and think some of them will be made public free on the net. Great job. dan