Closed Octav14n closed 9 years ago
I've been unable to replicate this so far. Both on OS X and Linux, it has run okay for me as a debug build.
If you just want to use bmk, you can always do a release build, in which case the debug stack stuff is not included as part of the source.
@woollybah Did you check with the "daily build" of ubuntu 15.04? Maybe some things changed there (eg. gcc version is 4.9.2 there, mine on Mint 17 is still "gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1)").
@Octav14n Did you have this bug with a stable version of ubuntu too (14.04 LTS or 14.10)?.
I'm also using 64-bit Mint 17 with 4.8.2. I'll look at setting up a new VM tonight with the latest stuff - but the generated code won't change between versions of the OS/GCC.
OK, I've found a few more details:
Thanks. I'll look into the missing file problem.
you mean if you remove an empty "custom.bmk" it does fail somewhere? This should not happen, as it just "returns" if the file is not existing (see bmk_ng.bmx: LoadBMK()).
hmmm but ... please check if you have another custom.bmk somewhere. Why? LoadBMK checks there:
so this might lead to: /home/user/BlitzMaxNG/bmx/custom.bmk" /home/user/BlitzMaxNG/bmx/home/user/BlitzMaxNG/bmx/custom.bmk" or /something/else//home/user/BlitzMaxNG/bmx/custom.bmk
Especially the last variant might be the path to another existing file (dunno about the double slash).
EDIT: Suggestion: LoadBMK should only check "other folders" if the path does not start with an "/" or "{char}:" -> absolute paths. Or did I miss obvious reasons?
So my stacktrace suggests that bmk_ng.bmx line 81 is where the error happens
Method LoadBMK(path:String)
Local str:String
Try
[snip]
Catch e:Object
Try
[snip]
Catch e:Object
' we tried... twice
' fail silently...
Return ' <-- this Return is listed in my StackTrace (see first post)
End Try
End Try
[snip]
The inner Catch-Block is translated to this C-Code (line 747 is marked):
bbOnDebugPopExState();
BBOBJECT ex = bbExObject();
if (bbObjectDowncast(ex,&bbObjectClass) != &bbNullObject) {
BBOBJECT bbt_e2=(BBOBJECT)ex;
struct BBDebugScope_1 __scope = {
BBDEBUGSCOPE_LOCALBLOCK,
0,
{
{
BBDEBUGDECL_LOCAL,
"e",
":Object",
.var_address=&bbt_e2
},
BBDEBUGDECL_END
}
};
bbOnDebugEnterScope(&__scope);
struct BBDebugStm __stmt_0 = {"/home/octavian/Programmierung/bmax/src/bmk/bmk_ng.bmx", 81, 0};
bbOnDebugEnterStm(&__stmt_0);
bbOnDebugLeaveScope();
bbOnDebugLeaveScope(); // <-- This line is marked in my Stacktrace
bbOnDebugLeaveScope();
return;
} else {
bbExThrow(ex);
}
And at last: $BUILDPATH is not set. AppDir should be /home/octavian/Programmierung/bmax
$ find /home/octavian -name "custom.bmk" 2>/dev/null /home/octavian/Programmierung/bmax/bin/custom.bmk /home/octavian/Programmierung/bmax/src/bmk/custom.bmk
The first one is the one i added (empty, if I delete this one the bug happens) The second one is the one from git. src/bmk is my git clone directory.
I've condensed my error to the following:
compiled using ./bin/bmk makeapp -a -g x64 -x test/catch.bmx
SuperStrict
Framework brl.appstub
myLoadBMK()
Function myLoadBMK()
Try
Return ' <-- This Return causes my error.
End Try
End Function
Edit: this is also bugging on 32bit build: ./bin/bmk makeapp -a -g x86 -x test/catch.bmx
Thanks. I'll push a fix later.
Should be okay now.
So now I can't start bmk compiled in 64 bit (Ubuntu 15.04, 64 bit, gcc version 4.9.2)
Steps to reproduce:
there is only the line
DebugError: stack underflow
on the screen, gdb says the following:It's the correspondig code to this .bmx lines:
this is the correspondig backtrace:
frame 1: