Found an issue in SpiderBasic ? Please report it here !
Fred
Site Admin
 
Posts: 1134
Joined: Mon Feb 24, 2014 10:51 am

Re: Crash on linux

by Fred Mon Jan 21, 2019 9:53 am

I will give it a new try. So it work for the first compile and then it crash on the second one when compiled from the IDE ? If you open the console in the browser (F12 -> console tab in Firefox and hit F5 for a reload), do you have any error ?
Stefan
 
Posts: 57
Joined: Mon Feb 05, 2018 9:44 pm

Re: Crash on linux

by Stefan Mon Jan 21, 2019 12:35 pm

The Firefox-Console say this:


unreachable code after return statement[Weitere Informationen] spiderbasic.js:1858
SyntaxError: missing ) after argument list[Weitere Informationen] spiderbasic.js:4157
Source-Map-Fehler: request failed with status 404
Ressourcen-Adresse: http://127.0.0.1:9080/spiderbasic/libra ... jo/dojo.js
Source-Map-Adresse: dojo.js.map[Weitere Informationen]
Source-Map-Fehler: request failed with status 404
Ressourcen-Adresse: http://127.0.0.1:9080/spiderbasic/libra ... dojo_de.js
Source-Map-Adresse: dojo_de.js.map[Weitere Informationen]



SyntaxError: missing ) after argument js:4157 is:

function f_createbuttonimage(v_txt,v_fontsize,v_breite,v_hoehe,v_bforecolor,v_bbackcolor) {
var v_bild=0;
var v_x=0;
var v_y=0;
var v_th=0;
var v_tw=0;
var v_fs=0;
spider_LoadFont(63,_S205,v_fontsize);
v_bild=spider_CreateImage(-1,v_breite,v_hoehe,32,v_bbackcolor);
spider_StartDrawing(spider_ImageOutput(v_bild));
spider_DrawingFont(spider_FontID(63));
v_tw=spider_TextWidth(v_txt);
v_th=spider_TextHeight(v_txt);
v_x=(((v_breite/2)|0)-((v_tw/2)|0));
v_y=(((v_hoehe/2)|0)-((v_th/2)|0));
spider_DrawText(v_x,v_y,v_txt,v_bforecolor,v_bbackcolor);
spider_StopDrawing();
if (1) return v_bild;
return 0;
}

The Spiderbasic Code is:

Procedure createButtonImage(txt.s,FontSize,breite,hoehe,BForeColor,BBackColor)

Protected bild,fs,tw,th,y,x

LoadFont(#ButtonFont,"Schrift",FontSize)





bild=CreateImage(#PB_Any,breite,hoehe,32,BBackColor)

StartDrawing(ImageOutput(bild))
DrawingFont(FontID(#buttonfont))
tw=TextWidth(txt)
th=TextHeight(txt)
x=breite/2-tw/2
y=hoehe/2-th/2

DrawText(x,y,txt,BForeColor,BBackColor)
StopDrawing()


ProcedureReturn bild

EndProcedure


I don't chance the code, but every 10-20 try it works on linux.
On Windows it works everytime.

Stefan
 
Posts: 57
Joined: Mon Feb 05, 2018 9:44 pm

Re: Crash on linux

by Stefan Mon Jan 21, 2019 3:16 pm

I think Javascript is sometimes not spelled correctly.
I have a procedure:

Procedure doSend (message.s)
!websocket.send (v_message);
EndProcedure


Spiderbasic makes this Javascript code:
bsocket.send (v_message); That's WRONG


It is not always the same code that is translated incorrectly. Sometimes it's just another code that becomes a wrong javascript.
Fred
Site Admin
 
Posts: 1134
Joined: Mon Feb 24, 2014 10:51 am

Re: Crash on linux

by Fred Sun Jan 27, 2019 1:37 pm

Should be fixed, could you try with 2.21 beta 3 ?
Stefan
 
Posts: 57
Joined: Mon Feb 05, 2018 9:44 pm

Re: Crash on linux

by Stefan Mon Jan 28, 2019 12:00 am

I compiled my over 10000 long code a couple of times. It seems to work. :)
Fred
Site Admin
 
Posts: 1134
Joined: Mon Feb 24, 2014 10:51 am

Re: Crash on linux

by Fred Mon Jan 28, 2019 9:22 am

Nice !
Stefan
 
Posts: 57
Joined: Mon Feb 05, 2018 9:44 pm

Re: [Done] Crash on linux

by Stefan Wed Jan 30, 2019 8:33 am

Oh, I am very sorry, it seems only to work if the debugger is on?

Now it doesn't with work with debugger is on, too :(

It is unstable.

Sometime it works, sometimes it doesn't - without changing the code.
Fred
Site Admin
 
Posts: 1134
Joined: Mon Feb 24, 2014 10:51 am

Re: [Done] Crash on linux

by Fred Wed Jan 30, 2019 9:39 am

Does the compiler still crash or your program doesn't run properly ?
Stefan
 
Posts: 57
Joined: Mon Feb 05, 2018 9:44 pm

Re: [Done] Crash on linux

by Stefan Wed Jan 30, 2019 3:08 pm

The IDE work well (more or less well), but it doesn't compile.

If debugger is off:
Firefox Console say: ReferenceError: debug is not defined


@Fred:
You can use the code I have send you in a private message. Then you can see all messages.
Fred
Site Admin
 
Posts: 1134
Joined: Mon Feb 24, 2014 10:51 am

Re: [Done] Crash on linux

by Fred Wed Jan 30, 2019 3:39 pm

OK, so it's not the same error, I will take a look to your code, thanks !
Return to Bugs Reports

Who is online

Users browsing this forum: No registered users and 1 guest