Lazarus
Programming => Widgetset => Carbon => Topic started by: freddynerk on September 08, 2009, 09:27:41 am
-
I have setup a new version of Lazarus.
Problems now are.
2 Icons in the Dock.
1. that I placed after the new install.
When I click on it to run the program I then get 2 Icons.
2. I have tested many examples plus my applications and each time I do a RUN up comes
Debugger error Ooops the debugger entered ....
It is not specific to any program or packages.
The program does however compile Ok if I build.
The resultant program is fine.
Not so good for debugging any errors (and I have a few)
Tom
-
Forgot to add
Version 0.9.27 beta
12-8-09
FPC 2.2.4
SVN 21182
I386-darwin-carbon (beta)
-
Have tested some of my application on a new Mac.
The older program DO work.
However any new programs compiled will nOT work.
As a test I compiled Address_book from the examples folder.
On this new Macbook Pro I get an error. This application addrbook quit unexpectedtly.
Their is something very wrong with my Lazarus install.
I have through the un-install procedure.
Deleted all files from Developer/lazarus and Lazarus from the Applications folder.
I used a Daily snapshot as well to test and had the same error.
Without re-installing Leopard from scratch what can I do.
This is serious for me.
I only wish I new more on how a Mac works.
Tom
-
can you post the output of the debug oputput window ? The oops is usually caused by som unexpected response form gdb.
-
This is one that I did a week or so ago.
It was posted on another thread.
Tom
-
I guess it got confused from the output of "info program"
Can you bugrep this and attach the output ?
-
Sorry to be a pain but what is a bugrep file?
AND how do I produce one.
Tom
-
Sorry to be a pain but what is a bugrep file?
AND how do I produce one.
If I understand correctly, Marc wanted you to create a bug report here: http://bugs.reepascal.org/
and attach the above output to it.
-
A bug reprt was entered on the 14/9/09 no 0014588
Tom
-
I've got the same problem after installing OSX 10.6.1. Everytime I run the debugger fails.
0.9.27
-
A bug reprt was entered on the 14/9/09 no 0014588
Tom
Tom:
It's been about 3 weeks since this bug report went in. Have you rolled back to 10.5 in the meanwhile? Trying to figure out what to do to keep my project moving forward.
-
It's been about 3 weeks since this bug report went in. Have you rolled back to 10.5 in the meanwhile? Trying to figure out what to do to keep my project moving forward.
The bug has been reported. Marc is currently busy with other tasks, so he can't fix Mac OS X debugger.
You can Monitor the reported issue, so you're informed (via email) about any changes made.
To go on development, you need to switch the debugger off, and use other methods for debugging.
-
Maybe you can try to use dwarf debug info instead of stabs. (-gw compiler option)
-
If I switch the debugger off I get the following error:
Exception while creating process: Executable not found: "xterm"
I get the same message with dwarf (-gw) setting and with debugger on.
-
In Run - Run parameters, uncheck: Use launching application
-
In Run - Run parameters, uncheck: Use launching application
It was already that way.
-
aahh... osx
there is an error in TPRocess, where it wants a xterm exe. IIRC it isn't used, but it must exist.
Maybe you can try to create a symlink to the terminal (inside Terminal.app)
-
aahh... osx
there is an error in TPRocess, where it wants a xterm exe. IIRC it isn't used, but it must exist.
xterm appears to be only used if poNewConsole is used. In other cases it is not checked nor used. There don't appear to be any checks as to its existence.
Maybe you can try to create a symlink to the terminal (inside Terminal.app)
That definitely won't work, since Terminal doesn't accept any form of command line options. You can use osascript to tell Terminal to execute a particular command and this will create a new window, but this does not create a new instance of Terminal.
It will just create a new window in the context of the Terminal application if it was already running, and if not it will start Terminal and create the new window. Next, the command will be executed in this new window, but Terminal will not quit once that's finished nor will the window close (so waiting for the "end of the executed process" will fail -- in fact, this will wait for the end of the osascript program, which will be almost instantaneous since it just fires off an apple event to Terminal and then quits).
The logic of TProcess with poNewConsole is hardwired to the Unix/Windows notion that every time you create a new window this automatically creates a new process, which is incorrect in case of Mac OS X (unless you use a traditional Unix utility such as xterm).
-
hmm... the debugger doesn't use a console, so I winder where this xterm is coming from
-
TProcess.
-
xterm is installed with X11.
X11 is available (in Optional Installations) with each Mac OS X version starting from 10.4
After x11 installed, symbolic link can be created at /usr/local/bin.
open Terminal
sudo ln -s /usr/X11/bin/xterm /usr/local/bin/xterm
P.S: xterm is also installed with Fink.
The logic of TProcess with poNewConsole is hardwired to the Unix/Windows notion that every time you create a new window this automatically creates a new process, which is incorrect in case of Mac OS X (unless you use a traditional Unix utility such as xterm).
can TProcess be patched in the following way? (patch file is also attached to this message :) )
Yes, it's less control over size of the window, but still should work fine, on any darwin, since 'open' is darwin/nextstep tool.
Index: src/unix/process.inc
===================================================================
--- src/unix/process.inc (revision 13818)
+++ src/unix/process.inc (working copy)
@@ -160,6 +160,9 @@
CommandToList(Cmd,S);
if poNewConsole in P.Options then
begin
+ {$ifdef darwin}
+ S.Insert(0,'open');
+ {$else}
S.Insert(0,'-e');
If (P.ApplicationName<>'') then
begin
@@ -172,6 +175,7 @@
S.Insert(0,'-geometry');
end;
S.Insert(0,'xterm');
+ {$endif}
end;
if (P.ApplicationName<>'') then
begin
hmm, may be additional command-line should be: 'open -n -a Terminal', instead of a just 'open'?
-
...
sudo ln -s /usr/X11/bin/xterm /usr/local/bin/xterm
..
with that Lazarus still reports that xterm is missing
-
launching osx apps in Lazarus, is quite messy :(
ok. Here's a workaround (you should use it for console applications only).
open "Run"->"Run parameters...", set your run parameters as shown on the screen shot.
check "Use launching application:" type "/usr/bin/open $(TargetCmdLine)"
You're free to modify "Host application" or "Command line parameters" as you need.
Then (it's a trick) open "Project"->"Compiler options". Open "Linking".
check "Win32 gui application (-WG)".
This would prevent Lazarus from using "xterm" then launching compiled project.
Let me know about your results.
Thanks.
-
Thanks, but my app is not a console app.
Unless you want me to test this for you?
-
Unless you want me to test this for you?
then you don't need to modify Run Parameters.
Just check "Win32 GUI application" in Compiler Options.
This should be enough.
does it work for you?
-
Yes, thanks much.
-
I've got the same problem after installing OSX 10.6.1. Everytime I run the debugger fails.
0.9.27
I was hoping OSX 10.6.2 would fix this but it doesn't. :(
-
Same problem here exactly.
Programs compile fine if debugger turned off but error message oops comes up if turned on.
OS X 10.6.2
Running Ver 0.9.28.2 beta
2009-10-26
FPC 2.2.4
SVN 22296
I386-darwin-carbon (beta)
-
Same problem here exactly.
Programs compile fine if debugger turned off but error message oops comes up if turned on.
OS X 10.6.2
Running Ver 0.9.28.2 beta
2009-10-26
FPC 2.2.4
SVN 22296
I386-darwin-carbon (beta)
I think we're not the only ones who were hoping that Lazarus would be the path forward for Delphi development on the Mac, but alas, it is not. I'm sure the debugger will get fixed but I don't have a clue even if someone capable (not me!) is working on it, so I have less of an idea of when the fix may happen.
Meanwhile, I've moved my work back to Delphi on my XP box.
-
There is noone working on it, but it's assigned to me. Unfortunately I've only a ppc based 10.4 ini
Anyway, the bugreport has a usefull patch so i'll have a look at it.
-
There is noone working on it, but it's assigned to me. Unfortunately I've only a ppc based 10.4 ini
Anyway, the bugreport has a usefull patch so i'll have a look at it.
Thanks for that update, Marc.
What is a "ppc based 10.4 ini?"
If you need any testing let me know, I'd be glad to help in anyway I can.
Mark
-
A typo:
ppc based 10.4 mini
That is a Mac mini with Mac OS X 10.4 and a powerpc CPU.
-
Thanks, Vincent. So my "i86 based 10.6.2 mbp" could be a useful test platform. Like I said, I'd be glad to help. Obviously, my skills are limited but I'm willing to run tests on my machine.
-
Any news on this? My debugger crashes on Snow Leopard which renders Lazarus pretty useless to me :(
-
Any news on this? My debugger crashes on Snow Leopard which renders Lazarus pretty useless to me :(
Have you tried the latest SVN version or snapshot?
-
I'm experiencing the same issue. I loaded the latest snapshot (dated today) to no avail.
-
Here are some particulars if it helps;
fpc v. 2.2.4
Lazarus v. 0.9.28.23150
OSX 10.6.2
Intel based Macbook Pro
-
Thanks. What XCode version used? Could you attach debugger output window content? (View->Debug Windows->Debug output)
-
Debuggeroutput: http://nopaste.info/382e029c27.html
My XCode Version is the newest as of yesterday (3.2.1 (Build 1613)).
-
Ill repeat the output here, since I don't know how long the paste will exist.
# *stopped,time={wallclock="1.23679",user="0.44587",system="0.36618",start="1261037276.451809",end="1261037277.688597"},reason="breakpoint-hit",commands="no",times="1",bkptno="1",thread-id="1"
#
# (gdb)
#
# <info program>
# &"info program\n"
#
# macosx_debug_inferior_status: current status:
#
# inferior task: 0x4103
#
# [SIGNAL THREAD]
#
# macosx_debug_inferior_status: information on debugger task:
#
# macosx_debug_inferior_status: information on inferior task:
#
# macosx_debug_inferior_status: information on debugger threads:
#
# thread: 0x60f
#
# thread: 0x1703
#
# thread: 0x1b03
#
# thread: 0x2003
#
# thread: 0x3903
#
# thread: 0x4303
#
# thread: 0x4503
#
# macosx_debug_inferior_status: information on inferior threads:
#
# thread: 0x4203
#
# ~"Program stopped at 0x24d7.\n"
#
# ~"It stopped at a breakpoint that has since been deleted.\n"
#
# ~"Type \"info stack\" or \"info registers\" for more information.\n"
#
# ^done
#
# (gdb)
-
fpc v. 2.2.4
Lazarus v. 0.9.29
SVN Version - 19639:21350M
Compiled with QT interface if that matters, QT is the latest 4.6 release.
OSX 10.6.2
Intel based Macbook Pro
I had the same xterm and debugger problem. Turning on the -GW option in the linker (earlier recommendation) did get rid of the xterm issue, but the debugger still has to be turned off for anything to be done. If there's any more info I can give I'm happy to, but I don't know anything about Lazarus internals or much about gdb.
-
If there's any more info I can give I'm happy to, but I don't know anything about Lazarus internals or much about gdb.
Could you attach debugger output window content? (View->Debug Windows->Debug output)
-
copied it here:
http://www.rongrove.com/misc/debug.htm (http://www.rongrove.com/misc/debug.htm)
-
should be fixed in r23192
Thanks to all ppl repoting outputs.
-
should be fixed in r23192
Thanks to all ppl repoting outputs.
Works like a charm. Thanks a lot!
-
should be fixed in r23192
Thanks to all ppl repoting outputs.
Thanks to all who worked on this bug !
-
Great work (again) :)
Maybe a stupid question;
What is the recommended approach to install a daily build over a release version?
(without screwing everything up ;))
-
Personally I would keep the existing installation and use svn in another dir, say ~/Projects/lazarus-svn
On a command prompt (in your ~/Projects dir) do a svn checkout svn co http://svn.freepascal.org/svn/lazarus/trunk lazarus-svn
Then (i assume the fpc compiler is in your path) cd to the ~/Projects/lazarus-svn dir and runmake
In finder, you can click in Projects/lazarus-svn on lazarus.app to start lazarus.
To update svn, cd to the ~/Projects/lazarus-svn dir and run svn up
-
Thanks Marc for the quick response :)
Unfortunately, the Release version is not working due to the bug mentioned in this thread.
So it's pretty much useless to me right now :(
To avoid that I make a mess out of things; I guess I better wait until there is a release that includes this fix .... unless you guys know a way to place the daily snapshot over the release i have on my computer ;)
-
Marc suggest to put it next to your release using the svn sources, not over your release.
-
Thanks Vincent - that's exactly what I understood.
However; I'd like to prevent a mess on my hard-drive having both versions on there (specially since the release version isn't working).
I'd rather stick to one version that works,... in a location that is identical to the release version.
This way, when a new release becomes available, I can just overwrite what I had.
I have had daily builds installed before, and it confused the heck out of me, specially when having a daily build and a release build installed.
Part probably because I'm not daily digging in the file structure of my Mac ...
-
Thanks Marc, works for me too!
-
Personally I would keep the existing installation and use svn in another dir, say ~/Projects/lazarus-svn
On a command prompt (in your ~/Projects dir) do a svn checkout svn co http://svn.freepascal.org/svn/lazarus/trunk lazarus-svn
Then (i assume the fpc compiler is in your path) cd to the ~/Projects/lazarus-svn dir and runmake
In finder, you can click in Projects/lazarus-svn on lazarus.app to start lazarus.
To update svn, cd to the ~/Projects/lazarus-svn dir and run svn up
I still have a problem: while it's making I get the error:
Fatal: Can't find unit resource used by ProjectResourcesIntf
what can I do?
Thanks!
-
I still have a problem: while it's making I get the error:
Fatal: Can't find unit resource used by ProjectResourcesIntf
what can I do?
It's not related to the debugger! What are you trying to compile?
-
I still have a problem: while it's making I get the error:
Fatal: Can't find unit resource used by ProjectResourcesIntf
what can I do?
It's not related to the debugger! What are you trying to compile?
lazarus-svn
-
are you using FPC 2.4.0 (or higher)? if not, you need to update the compiler.
-
are you using FPC 2.4.0 (or higher)? if not, you need to update the compiler.
I've updated fpc and re-run make. Now lazarus has been compiled. thanks!
then I opened it and tryed an "hello world", but when I've tryed to run it I got a "can't find unit interfaces...".
So I tryed to run "Build Lazarus" from the tools menu but after a while it tells me "can't find unit DefineTemplates used by LazConf"....
-
please do the following.
Open Tools -> Configure Build -> Quick Build Options
select: Clean up + Build all
and press Build
it should help.
-
please do the following.
Open Tools -> Configure Build -> Quick Build Options
select: Clean up + Build all
and press Build
it should help.
thanks but unfortunately it doesn't: same error as before
-
It works!
I had to change the lazarus path in the options: having 2 versions (release and svn) on the same machine probably causes some troubles with configuration files.
Now my "hello world" program compiles and runs!
I just can't add a breakpoint as the option in grayed.
-
I just can't add a breakpoint as the option in grayed.
Did you configure a debugger (environment - options - debugger)?
-
Marc and et al.
I apply the solution given above (svn stuff) and now the ooops shit has gone away however when running the project, the debugger works like forever and nothing happens. The binary is created on the disc but when I run it from terminal nothing comes up. X11 starts, though.
Hope one can help!
-
X11 ???
What are you running ? Make sure the launching app is not checked (run parameters).
-
I have GUI app and the option you said is unchecked. I went through many threads to make sure I do not have anything stupid in my options but it is still something there. When I Run the default project which shows up after the Lazarus is started, it runs OK but my project cannot be debugged. No outputs in Messages box, though.
I run the same project on 10.5 and it worked (now I am switching to 10.6 and cannot get it working). And it also worked under Ubuntu.
-
I have GUI app and the option you said is unchecked. I went through many threads to make sure I do not have anything stupid in my options but it is still something there. When I Run the default project which shows up after the Lazarus is started, it runs OK but my project cannot be debugged. No outputs in Messages box, though.
anything in the debug output window ?
-
a bunch of stuff there, I attached the file :-[
-
I just can't add a breakpoint as the option in grayed.
Did you configure a debugger (environment - options - debugger)?
It wasn't me, but is seems to be configured in options:
Debugger: GNU Debugger (gdb)
Path: /usr/bin/gdb
-
....
<info address main>
&"info address main\n"
~"Symbol \"main\" is at 0x118c6 in a file compiled without debugging.\n"
^done
....
Enable debug info in compiler options (or did you strip the exe ?)
-
attached is the new output
What I have marked (among other) is:
-gl
-WG
-vd
I am not sure what you mean by "did you strip the exe'
Lazarus has carbon LCL interface and I am trying to compile my project with gtk LCL. Doing it with carbon LCL does not result in anything different. I prefer to have carbon but when compiled the project under 10.5 MainMenu and SelectDirectory were not visible in the program so I could not setup my paths.
-
....
<info address main>
&"info address main\n"
~"Symbol \"main\" is at 0x118c6 in a file compiled without debugging.\n"
^done
....
Enable debug info in compiler options (or did you strip the exe ?)
mmmm...sorry I don't understand exactly what do you mean.
-
did you enable debug info in compiler options ?
-
I tried to test some options combinations but I couldn't as a new problem has arrived: "failed to load file..." and after a dozen of tryes it run but after a moment lazarus crashed....
Thanks for your help but I give up (with mac version)!
-
Hello. I just discovered Lazarus and Free Pascal. I have been looking for options to move away from REALbasic, and as a former Turbo Pascal devotee, I am very excited about this possibility. Have been trying Python, but am getting bogged down in deployment issues.
I know this is an old thread, but it seems to describe my problems. Apparently it is resolved, but I can't follow the fix. I am trying to get up and running on OS X 10.6.3 Intel. I had previously installed OS X Developers Tools, including XCode 3.2.2.
First I installed lazarus-0.9.28.2-i386-macosx + fpc-2.4.0.intel-macosx. This seemed to be a problem because Lazarus could not find fpcsrc. But I could not find a fpcsrc-2.4.0 file to download. So I uninstalled both.
Next I installed fpc-2.2.4.intel-macosx + fpcsrc-2.2.4-intel-macosx + lazarus-0.9.28.2-i386-macosx, and it ran and compiled, failing at the 'debugger oops'.
I did not understand the SVN discussion very well, and could not find the mentioned fixed release on the web, could someone clarify the steps I need to take to fix the debugger bug? Also, if I upgrade to 2.4.0, how do I get the source fpcsrc that Lazarus seems to need?
Any help is much appreciated.
Regards,
Frederick
-
I had a cup of coffee, reread everything, ran the svn commands, got the fatal error: "Lazarus requires at least FPC 2.4.0"
Reinstalled 2.4.0 with 2.4.0 XTools, set the Lazarus directory in Environment>Options, ran lazarus-svc/Lazarus and ... it worked! :D
Thanks for making the fix earlier, and I apologize for reawakening this sleeping thread.
Cheers,
Frederick
-
Hi, I have read everything, try svn ver of Lazarus and when I try Run "Hello world" app I have Error: resource compiler "fpcres" not found, switching to external mode
What I did wrong?
-
Hi, I have read everything, try svn ver of Lazarus and when I try Run "Hello world" app I have Error: resource compiler "fpcres" not found, switching to external mode
What I did wrong?
nothing.
Check out if you have a symbolic link to fpcres utility in /usr/bin.
if you don't you need to create one
cd /usr/bin
sudo ln -s path_to_fpcres
you've installed fpc from .dmg file, path_to_fpcres is probably "/usr/local/bin/fpcres".
if your fpc version is less than 2.4.0 you need to update fpc.
-
Hi, I have read everything, try svn ver of Lazarus and when I try Run "Hello world" app I have Error: resource compiler "fpcres" not found, switching to external mode
What I did wrong?
nothing.
Check out if you have a symbolic link to fpcres utility in /usr/bin.
if you don't you need to create one
cd /usr/bin
sudo ln -s path_to_fpcres
you've installed fpc from .dmg file, path_to_fpcres is probably "/usr/local/bin/fpcres".
if your fpc version is less than 2.4.0 you need to update fpc.
Now I have =]
Thank you very much, skalogryz, now everything works fine ;)