GLBasic V12 (was formerly V11 beta)

Previous topic - Next topic

spacefractal

#60
New Android Bug:
GlBasic allways shut its activity down when NETWEBEND is invoked or starting a another Intent Activity, etc when startActivity() is invoked. That should NOT been happens. That even System.exit(0); is not invoked.

Its can been invoked by using code like this:
Code (glbasic) Select


LOCAL C=0
REPEAT
FOR i=0 TO 360 STEP 4
DRAWRECT 0, 0, i, i, RGB(100, 100, 100)
  SHOWSCREEN
  C=C+1
  IF C=200
  NETWEBEND "http://www.glbasic.com"
ENDIF
MOUSESTATE mx, my, mba, mbb
IF (mba=1 OR mbb=1) AND mx<20 AND my<20 THEN END
NEXT
UNTIL mba=1000
MOUSEWAIT


That happens in the unmodiced java thread (which I dont do direct java communucation) in this beta.

here the log:
Code (glbasic) Select

adb s
I/SDL     (29632): ---------------------------------------------
I/SDL     (29632): ---               restart                 ---
I/SDL     (29632): ---------------------------------------------
I/SDL     (29632): onCreate
I/glbasic (29632): external files dir is /data/data/com.unmapcom.rotosprite/file
s
I/glbasic (29632): external storage /mnt/sdcard/Download
I/glbasic (29632): copy assets starts
I/glbasic (29632): assets found, copying...
I/glbasic (29632): updating assets...
I/glbasic (29632): Media is a directory
I/glbasic (29632): updating assets .. sleep
I/glbasic (29632): updating assets is done
I/glbasic (29632):    onCreate done
I/SDL     (29632): onResume()
I/SDL     (29632):     onResume done
I/SDL     (29632): ceateEGLSurface
I/SDL     (29632): surfaceChanged()
I/SDL     (29632): pixel format RGB_565
I/SDL     (29632): hint screensize to glb
I/SDL     (29632): SDL_Android_Init()
I/glbasic (29632): timer
I/glbasic (29632): rbow
I/glbasic (29632): rbow init
I/SDL     (29632): [STUB] GL_SetSwapInterval
I/glbasic (29632): SDL_init video
I/glbasic (29632): SDL_GetVideoInfo = 1024x720 @ 16 bpp
I/glbasic (29632): Requested SDL_OPENGL = 67108864
I/glbasic (29632): set up SDL for OpenGL-ES mode
I/glbasic (29632): Setting video mode: 1024x720x16 fl=4800000
I/SDL     (29632): [STUB] GL_LoadLibrary
I/SDL     (29632): ceateGLContext
I/SDL     (29632): initEGL 1.1
I/SDL     (29632): ceateEGLSurface
I/SDL     (29632): ceateEGLContext
I/glbasic (29632): SDL_SetVideoMode seems to be 1
I/glbasic (29632): get accurate timer - 1st call
I/glbasic (29632): flip - 1st call
I/glbasic (29632): BGRA ext supported
I/glbasic (29632): Texture size limit: 4096
I/glbasic (29632): init fbo
I/glbasic (29632): 2D VP
I/glbasic (29632): OGRB init [OK]
I/glbasic (29632): Cptn
I/glbasic (29632): Network
I/glbasic (29632): Input
I/glbasic (29632): Window mode
I/glbasic (29632): Create DXin
I/glbasic (29632): sdl_grab
I/glbasic (29632): reptr
I/glbasic (29632): getexe
I/glbasic (29632): cd
I/glbasic (29632): set cdir to: /data/data/com.unmapcom.rotosprite
I/glbasic (29632): exepath=curdir= /data/data/com.unmapcom.rotosprite
I/glbasic (29632): shoeboxing...
I/glbasic (29632): init gettimer
I/glbasic (29632): clear screen
I/glbasic (29632): flip
I/glbasic (29632): mk2D
I/SDL     (29632): query glb_asset_copy_done: true
I/glbasic (29632): finding font...
I/glbasic (29632): set cdir to: files
I/glbasic (29632): Init Finalized
I/glbasic (29632): Shut down GLB
I/glbasic (29632): glb is shut down
I/SDL     (29632): onPause()
I/SDL     (29632): glbasicOnPause(1)
I/SDL     (29632): super.onPause
I/SDL     (29632):    onPause done
I/glbasic (29632): open url: http://www.glbasic.com ok
I/SDL     (29632): [STUB] GL_UnloadLibrary


Shut down GLB happens soon webpage is opened, but that should not been happens. The activity should howover pausing without shutdown.


______

Its look like there is a bug in public void surfaceDestroyed(SurfaceHolder holder) in SLDActivity.java. The thread might never end and hence its could doing those crashes. by now its dosent recreate the surface correctly after a resume (which would works after uncomment content in that function).
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

Kitty Hello

Uhm... did you play with ALLOWESCAPE FALSE and AUTOPAUSE TRUE?

About the HTML5 compiler!! You need the python27.dll in the JavaScript/bin/Python directory.
Or just install Python 2.7 and you're done. Beware, the textures do not show, yet.

MrTAToad

#62
When compiling for HTML 5, I get :

Quoteompile+link:
Traceback (most recent call last):
  File "Q:/Compiler/platform/JavaScript/bin/\emscripten\emcc", line 805, in <module>
    extra_files_to_link.append(shared.Cache.get(name, create))
  File "Q:\Compiler\platform\JavaScript\bin\emscripten\tools\shared.py", line 979, in get
    shutil.copyfile(creator(), cachename)
  File "Q:\Compiler\platform\JavaScript\bin\python\lib\shutil.py", line 82, in copyfile
    with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: 'c:\\users\\nicholas\\appdata\\local\\temp\\emscripten_temp_bqba4d\\libcxxabi\\libcxxabi.bc'
python.exe "Q:/Compiler/platform/JavaScript/bin/\emscripten\emcc" -O1 --llvm-lto 0 --typed-arrays 2 -IQ:\Compiler\platform\Include -IC:\Users\Nicholas\Documents\GLBasic\GLBasic\Test -DEMSCRIPTEN -DNDEBUG -DWANT_SDL -DHAVE_OPENGL C:\Users\Nicholas\AppData\Local\Temp\glbasic\gpc_tempg.cpp C:\Users\Nicholas\AppData\Local\Temp\glbasic\gpc_temp0.cpp Q:\Compiler\platform\JavaScript\bin\libGLBasicWebGL.o -o C:\Users\Nicholas\AppData\Local\Temp\glbasic\output.html -DHTML5=1
exit
*** FATAL ERROR - Please post this output in the forum

mentalthink

#63
Hi for me the HTML frezze when it´s compiling... perhaps it´s beacuase I´m under Vmware.... when I try in Windows like a HOST, I have the same error than Mr-T

I try to install JDK because I havea  fresh intall of win32... but the HTML compiler maintains frozen...

A interesting and curious point, it´s when I compiled whit the Eleven I have 2 Hard drives more under the virtual machine, the R and Q .

erico

#64
Mr.T ? :D :P

edit: sorry , could not hold my self...
Mr.T allows no escape true and he never auto pauses neither freeze!

[attachment deleted by admin]

mentalthink

JAJA, I hope he don´t start to launch punchs  :D :D

Albert

#66
I've some difficulties compiling for html5. Now I'm trying to run command-line. I've got this:

Code (glbasic) Select
c:\GLBasic_v11\Compiler\platform\JavaScript\bin\python>python.exe "C:/GLBasic_v11/Compiler/platform/JavaScript/bin/\emsc
ripten\emcc" -O1 --llvm-lto 0 --typed-arrays 2 -IC:\GLBasic_v11\Compiler\platform\Include -IC:\Users\bd\Dropbox\glba
sic\Blobmonster -DEMSCRIPTEN -DNDEBUG -DWANT_SDL -DHAVE_OPENGL C:\Users\bd\AppData\Local\Temp\glbasic\gpc_tempg.cpp
C:\Users\bd\AppData\Local\Temp\glbasic\gpc_temp0.cpp C:\GLBasic_v11\Compiler\platform\JavaScript\bin\libGLBasicWebGL
.o -o C:\Users\bd\AppData\Local\Temp\glbasic\output.html -DHTML5=1

==============================================================================
Welcome to Emscripten!

This is the first time any of the Emscripten tools has been run.

A settings file has been copied to ~/.emscripten, at absolute path: C:\Users\bd/.emscripten

Please edit that file and change the paths to fit your system. Specifically,
make sure LLVM_ROOT and NODE_JS are correct.

This command will now exit. When you are done editing those paths, re-run it.
==============================================================================


and for the second run:

Code (glbasic) Select
(Emscripten: Config file changed, clearing cache)
warning: Could not verify LLVM version: [Error 2] The system cannot find the file specified
(Emscripten: Running sanity checks)
Checking JS engine node failed. Check ~/.emscripten. Details: [Error 2] The system cannot find the file specified
FATAL: The JavaScript shell used for compiling (node) does not seem to work, check the paths in ~/.emscripten

Albert

I've played a lot with emscripten by now, and I think tha libcxx* problem is related to 64 bit win7

MrTAToad

Its using the wrong version or something ?

Kitty Hello

MrT try changing temp dir to c:/temp. I thinl its an editor option. It works on my win7x64.

MrTAToad

#70
I've just tried that too, and get :

QuoteIOError: [Errno 2] No such file or directory: 'c:\\temp\\emscripten_temp_w4nss9\\libcxxabi\\libcxxabi.bc'

(as well as the other stuff).

Are there any system variables that need setting up ?  I tried setting EMCC_TEMP_DIR, but that either states :

QuoteNo such file or directory: 'c:\\temp\\emscripten_temp_zxjj9h\\libcxxabi\\libcxxabi.bc'
(when using c:\temp\emm)

or

QuoteWindowsError: [Error 32] The process cannot access the file because it is being used by another process: 'c:\\temp\\glbasic'
(when using c:\temp)

I'm using Python 2.7.3 - I presume that is the correct version to use  ?

djtoon

i go this:


compile+link:
Traceback (most recent call last):
  File "Q:/Compiler/platform/JavaScript/bin/\emscripten\emcc", line 805, in <module>
    extra_files_to_link.append(shared.Cache.get(name, create))
  File "Q:\Compiler\platform\JavaScript\bin\emscripten\tools\shared.py", line 979, in get
    shutil.copyfile(creator(), cachename)
  File "Q:\Compiler\platform\JavaScript\bin\python\lib\shutil.py", line 82, in copyfile
    with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: 'c:\\temp\\emscripten_temp_ksdo3g\\libcxxabi\\libcxxabi.bc'
python.exe "Q:/Compiler/platform/JavaScript/bin/\emscripten\emcc" -O1 --llvm-lto 0 --typed-arrays 2 -IQ:\Compiler\platform\Include "-IC:\Documents and Settings\dan.IDOMOO\My Documents\GLBasic\Math" -DEMSCRIPTEN -DNDEBUG -DWANT_SDL -DHAVE_OPENGL C:\Temp\glbasic\gpc_tempg.cpp C:\Temp\glbasic\gpc_temp0.cpp Q:\Compiler\platform\JavaScript\bin\libGLBasicWebGL.o -o C:\Temp\glbasic\output.html -DHTML5=1
exit
*** FATAL ERROR - Please post this output in the forum

? any ideas?

MrTAToad

I think the "/\" bit is causing a few problems, but for some reason the emscript directory doesn't seem to be created...

spacefractal

#73
Have property worten that, but just a little feature request:

- possible to install other sdk than just api 8. Think only about this when activity and orientation is correctly fixed. Elsewise no reason doing that. Still not sure, but it's is in bug forum.
- real java communication by RESULT$=APICALL(STRING$). I do allready similar like that now by using two other commands, so I confirm it's would works quite nice. Could eventuelly been trought RESULT$=platforminfo$("JAVA:STRING") for compatible. Minus side is it can been harder to update, due calls need to been in sldactivity class and shared trought all projects. I live with that :-).
- key event seen cannot been costumed by a value when sent to the native call. Seen its a little none priority bug.

All here is android effected bugs and features, they are all none major. iOS do works quite well.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

MrTAToad

Quote from: Albert on 2012-Sep-26
I've played a lot with emscripten by now, and I think tha libcxx* problem is related to 64 bit win7
Have you compiled for HTML 5?