Sigsegv error. lazarus / 9-Editor ---------------------------------------------------------------------- Anonymous · 2006-01-13 02:34 Hello! I downloaded and installed the Lazarus binaries very recently, and was learning it using the tutorial located here. I got right into the tutorial after installing Lazarus. I did everything in the first session of the tutorial up to where you save and run your program for the first time. It compiled successfully, with two hints (in the format: Unit1.pas(16,28) Hint: Parameter "Sender" not used), but before it could run the program, I got the error "Project project1 raised exception class 'External: SIGSEGV'". I also get this error when compiling a completely new project, so I'm thinking it is a problem with how I set it up. I didn't change any settings after installing Lazarus, I just got right into the tutorial. I have Windows XP. Thanks for your time and help! ---------------------------------------------------------------------- Anonymous · 2006-01-16 15:22 Wow. No replies yet. Something I did wrong? ---------------------------------------------------------------------- matthijs · 2006-01-16 17:43 No. But maybe you could give some more information. Like which version you installed: snapshot or Lazarus 0.9.10. Hints: Like "Parameter xxx not used" are no problem. Warning you might look into, error are a "no show". What happens if you just start a new project and without adding anything compile and run that? Make sure you have your code right, so no typo's. ---------------------------------------------------------------------- Anonymous · 2006-01-18 16:31 I downloaded the Lazarus 0.9.10 win32 binaries. I tried it multiple times, and checked for any typos or other mistakes. It gives me the same error when I compile a project that doesn't have anything in it, so that's why I thought it might be something to do with Lazarus' setup. Do you have to do any setup after you install the win32 0.9.10 binaries, or can you start developing right off-the-bat? ---------------------------------------------------------------------- matthijs · 2006-01-18 18:23 You could try download the snapshot and install that one. Be sure to remove the previous install. ---------------------------------------------------------------------- Anonymous · 2006-01-19 06:15 I uninstalled the Lazarus I had installed, and installed the win32 snapshot, but it still didn't work. Have you tried doing that tutorial on your computer (if you have windows xp sp1) to see if it worked? ---------------------------------------------------------------------- matthijs · 2006-01-19 07:04 I have installed version of Lazarus on WinXP and other platforms. I tried the tutorial (even translated it into Dutch) and found no problems. I cannot think of anything which might cause your problems. But maybe someone else can. ---------------------------------------------------------------------- mikiwoz · 2006-01-19 07:15 just to make sure: are you *perfectly certain* that you have installed Lazarus to a location, which path does *not* contain any special chars nor spaces? could you give us the location you've installed Lazarus to? just a wild guess. cheers mike ---------------------------------------------------------------------- Anonymous · 2006-01-21 17:26 It is in C:\lazarus Matthijs, did you try the tutorial after starting lazarus with "default" settings? Because I didn't setup anything before doing the tutorial, and maybe I was supposed to set some paths or something. ---------------------------------------------------------------------- matthijs · 2006-01-21 18:19 The setup of Lazarus does not need any additional configuration by you. It is even possible to have several versions of Lazarus on one PC without any troubles. For instance I have on my laptop two lazarus installs and both work without a problem. Something else springs to mind: where do you save your projects? ---------------------------------------------------------------------- Anonymous · 2006-01-27 03:22 I followed the tutorial (link above), and it doesn't say to save before compiling and running, so I didn't. Does it auto-save before compiling? ---------------------------------------------------------------------- matthijs · 2006-01-27 10:26 Yes, in a temp directory. You can change this default location via Environment -> Environment Options on tab Files last editbox: Directory for building test projects. ---------------------------------------------------------------------- felipemdc · 2006-01-27 10:42 Ummm .... it sounds like that the Temp dir for test projects is the problems. Maybe the wiki needs to be updated to say to save the file on a proper location first? ---------------------------------------------------------------------- Anonymous · 2006-01-28 00:44 Ok, it was saving the test projects to C:\Documents and Settings\John\Desktop\ . Actually, nothing showed up on the desktop when I compiled it, so maybe it wasn't saving. ---------------------------------------------------------------------- Anonymous · 2006-02-09 04:54 So, if it was supposed to be saving the test projects to that location, why wasn't it? (Unless it deletes right after the compile) ---------------------------------------------------------------------- matthijs · 2006-02-09 07:00 Have you tried setting the "Directory for building test projects" to something like C:\temp\? ---------------------------------------------------------------------- Anonymous · 2006-02-09 21:28 I installed Lazarus on a different computer, and did everythiing exactly the same, but it worked on the other computer. This other computer has Windows XP Pro with a Pentium 4 and ATI Mobility Radeon 7500. The original comp has Windows XP Home with an AMD and SiS graphics hardware at the time of test. It now has a better graphics card on it, so I'll try it on there. Also, on this other computer I downloaded and compiled the GLScene package. (There is info on it in the graphics programming tutorial on the wiki) It had multiple warnings, but compile completed. When I installed and rebuilt Lazarus, Lazarus gave an error saying that ode.dll was not found, and Lazarus could not run. Do you guys know what the problem was? Thanks ---------------------------------------------------------------------- Anonymous · 2006-02-09 23:39 I tried it on my usual computer, but it still didn't work. Same error. It must either be a compatibility error with Lazarus, or something irregular about my computer. So the queestions are: On my other computer (where Lazarus works) I downloaded and compiled the GLScene package. (There is info on it in the graphics programming tutorial on the wiki) It had multiple warnings, but compile completed. When I installed and rebuilt Lazarus, Lazarus gave an error saying that ode.dll was not found, and Lazarus could not run. Do you guys know what the problem was? Why won't Lazarus work on my usual computer? Is there a way in Lazarus to create a new object, say a button, in the onClick event of an existing button, or any event for that matter? How would I code that? ---------------------------------------------------------------------- felipemdc · 2006-02-10 01:24 QuoteWhen I installed and rebuilt Lazarus, Lazarus gave an error saying that ode.dll was not found, and Lazarus could not run. Do you guys know what the problem was? That's a game library. You can download it and put it on the same dir as lazarus. google for ode. If you want to do 3D game developmente I can sujest that you use the 3D game pack. It already comes with Lazarus, GLScene, and a open source 3D editor called Quark. This way you don't have to worry about installing GLScene. Everything comes pre-configured! Take a look here: http://www.skinhat.com/3dpack/ ---------------------------------------------------------------------- felipemdc · 2006-02-10 01:31 QuoteIs there a way in Lazarus to create a new object, say a button, in the onClick event of an existing button, or any event for that matter? How would I code that? You need a variable to reference the button (or other control). You can put this variable on the "private" section of the declaration of the class of your form. The code would be something like: procedure myform.Button1OnClick(Sender: TObject); begin   Button2 := TButton.Create(Self);   Button2.Parent := Self; // This is needed to show the button   // position the button   Button2.Top := 50;   Button2.Left := 40;   Button2.Caption := 'My newly created button!!'; end; Now you created a new instance of the button. Since it is a descendent of TComponent and has a owner it will be automatically destroyed when the form is destroyed. You can destroy it before that using Button2.Free; ---------------------------------------------------------------------- tech-pro · 2006-02-10 09:35 When I want to do something like that, I create the button in the form designer as usual and set its Visible property to False, then I simply change the property to True when I want it to show. It's easier, and avoids the possibility of creating multiple instances of the button. ---------------------------------------------------------------------- Anonymous · 2006-02-10 18:43 Ok thanks. I wanted GLScene installed manually so I could get the latest Lazarus version with it, but I'll just use that game pack instead. Quark is neat. Thanks. What is the point of putting the procedure in the private declarations section instead of the implementations section of the class? I'm wanting to make a interface creation tool for a rapid game developing kit, so I couldn't just spawn multiple objects of each type and set them visible or invisible. Is there any way to fake multithreading with some kind of suspend procedure command? I tried using the timer object, but that doesn't suspend the execution, it just executes itself. Thanks again. ---------------------------------------------------------------------- Anonymous · 2006-02-10 18:50 I'm the guest poster on this topic. Just to let you guys know I registered. ---------------------------------------------------------------------- crazy8john · 2006-02-10 22:59 :p Lol that was me. ---------------------------------------------------------------------- crazy8john · 2006-02-11 00:09 I want the user to be able to add buttons to an interface. I don't know how many buttons he will add, so I need a way to dynamically create buttons while the program is running. Since I can't put procedures into the variable declaration area, is there any way to do this? What is the private/public sections for-are they just different types of declaration sections, and can they support procedures? I tried putting that procedure into the private section, but it didn't work, so I suppose not. Sry for not knowing the class structure; I'm new to Delphi. Thanks a lot ---------------------------------------------------------------------- crazy8john · 2006-02-11 20:58 So, other than the questions four posts up, I also have this question: Can you do dynamic component loading or reloading in Lazarus Delphi? ---------------------------------------------------------------------- mikiwoz · 2006-02-12 10:27 first of all: there is no Lazarus Delphi. Lazarus is a stand-alone project, connected with Delphi only through using very similar language. And no, there is no way of dynamic loading of components to Lazarus, at least not yet - it's a question of "when will the new linker be available" and that's about 2007. Cheers Mike ---------------------------------------------------------------------- matthijs · 2006-02-12 12:47 Because there is a space in the path? ---------------------------------------------------------------------- crazy8john · 2006-02-12 16:57 It's probably just something wrong with the hardware of the computer. It's rather old. Thanks though! Ugh...so I guess I'll have to use teh ol' multiple variable declarations for creating new objects. Definitely looking forward to the  new linker! Is there any way to fake multithreading with some kind of suspend procedure command? I tried using the timer object, but that doesn't suspend the execution, it just executes itself. Also, I have a listBox that I programmed to add the names of components that are created to. The purpose of it is so the user can click on a component's name in the list box, then edit the component's parameters with sliders. I was wondering how to code something that dynamically returns the name of a component that I can use to modify properties of: if ListBox1.ItemIndex <> -1 then   begin     ListBox1.Items[ListBox1.ItemIndex] := trackBar1.position;   end; That code obviously does not work, but you get what I'm trying to do. Any ideas on how to do it? Thanks ---------------------------------------------------------------------- mikiwoz · 2006-02-12 21:39 crazy8john: what do you mean by "dynamic loading of components to lazarus"? if you mean "adding a new components package to the IDE so that you can drop it on the form during design time" -> no, that's the case Laz needs the new linker. if you mean "dynamically creating controls on a form during runtime in your program" -> of course, it's supported! how do you think Laz does, anyway? consider the code: Code: [Select]procedure CreateMyNewButton(x, y, w, h:integer; txt:string; owner:TComponent); var  MyButton:TButton; begin   MyButton:=TButton.Create(owner);   MyButton.Left:=x;   MyButton.Top:=y;   MyButton.Width:=w;   MyButton.Height:=h;   MyButton.Caption:=txt; end; although it's not pretty (what happens to the button when the procedure terminates?), it will work and create a TButton control during runtime. if this is what you call "dynamic components loading" then yes, it's supported, and usually it's called "creating components during run-time". Cheers Mike ---------------------------------------------------------------------- Vincent Snijders · 2006-02-13 08:48 In order to be able to load component packages without rebuilding the IDE, fpc needs to be able to create a LCL libarary that can be shared by other DLL's and executable. I think this is called a shared library. Don't confuse this with the 'internal linker' feature. That is simply replacing the call to the GNU ld linker executable with a call to a pascal procedure in the compiler. Advantages of this is, that the compiler has more control over the linking process. So: Shared library support and internal linker are two different features. ---------------------------------------------------------------------- crazy8john · 2006-02-17 22:26 Ah yes that it what I wanted. I thought I tried that, but ok. Thanks!