As I expected.
Bit of background.
"DWARF" => This is the name of a debug info format. It is the format used on Mac. (And other OS)
It tells the debugger where variables (and other things) are in your exe.
So if you want to see "Form1" then the debugger looks at the dwarf info, and finds the address at wich Form1 is in memory. It also finds out what fields a "TForm" has.
Now when loading of this fails the debugger in the IDE does not even create instances of some classes. (It has no data to store in them). Maybe that will change in future, but for now...
Some code did/does not check the "nil" value of those objects => crash.
So the crashes can be fixed easy. (And I will look at the asm window)
But the data is still not there. And we need to find out why.
I went through the logfile that you supplied, and compared it against the 2 crashes.
The dwarf is attempted to be loaded in "TDwarfLoaderThread.Execute;". This is the default, and it is confirmed by the log.
Actually the "debugln" I ask you to add are probably in the wrong place. (But leave them in, they are not harmful either)
I just went through the date again, and I made some wrong conclusions the first time.
So here goes again. Lets start with
TDwarfLoaderThread.Execute;
line 290 onwards
components\lazdebuggers\lazdebuggerfplldb\fplldbdebugger.pas
This is the unmodified 2.0.0 prior to applying the "try except"
So it does not have any other fixes branch modification, that you may not yet have.
You may also follow the svn link, and download the entire new file. (keep a backup of your old file).
The new file may compile, but I am not sure, it may need 1 or 2 other files.
In the below I have added some debugln.
procedure TDwarfLoaderThread.Execute;
var
AnImageLoader: TDbgImageLoader;
begin
debugln(DBG_VERBOSE, ['THREAD TFpLldbDebugger.LoadDwarf ']);
AnImageLoader := TDbgImageLoader.Create(FFileName);
debugln('THREAD AFTER TDbgImageLoader.Create'); ////////////////////////////////
if not AnImageLoader.IsValid then begin
debugln(['THREAD NOT VALID ']); ////////////////////////////////
FreeAndNil(AnImageLoader);
exit;
end;
debugln(['THREAD VALID ']); ////////////////////////////////
if Terminated then
exit;
FImageLoaderList := TDbgImageLoaderList.Create(True);
AnImageLoader.AddToLoaderList(FImageLoaderList);
debugln(['THREAD LOADERLIST 1 ']); ////////////////////////////////
if Terminated then
exit;
debugln(['THREAD LOADERLIST 2 ']); ////////////////////////////////
{$IFdef WithWinMemReader}
We probably need more changes.... Including some of the ones already in fixes branch.
Of course 2.0.2 is due in the next 2 weeks. So we can wait. On the otherhand, anything we get done by this Friday (maybe Saturday) may still get into 2.0.2.
As I said you can try to download entire files from the svn link. There are more details on which files to get:
https://forum.lazarus.freepascal.org/index.php/topic,42869.0.htmlOr you can checkout from svn:
svn co https://svn.freepascal.org/svn/lazarus/fixes_2_0 target_folder
To update later: svn update
And then (IIRC) in that folder just run
make bigide LCL_PLATFORM=carbon CPU_TARGET=i386
or
make bigide LCL_PLATFORM=cocoa CPU_TARGET=x86_64
You can do that in a separate folder. So it will not mess with your install.
In that folder create a file (with a text editor)
lazarus.cfg
containing one line:
--primary-config-path=/Users/yourname/laz_2_conf
You can choose a diff path of course, and you need to create this folder. This file will make sure, that the 2nd Lazarus uses its own config. (You need to configure it from scratch)
This also allows you to follow the fixes branch.
---
One more alternative. Depending on how many patches/changes I would have to ask you to apply for testing, another option may be preferable.
Obviously those testing changes do not go to svn. But I do run my private git mirror, to which I can push them. (So you do not need to apply them by hand)
It is as (almost) simple as the svn above.
git clone https://github.com/User4martin/lazarus.git target_dir
cd target_dir
git checkout -f fixes_2_0
The -f to override local changes (if you later have some)
To update: git pull
Or if you have local changes: git stash save; git pull; git stash pop
And then build as above and create the lazarus.cfg file