Autor Tema: bennugd crash on android with simple script.  (Leído 6675 veces)

herve_02

  • Newbie
  • *
  • Mensajes: 13
  • Karma: 0
bennugd crash on android with simple script.
« en: Abril 28, 2013, 06:30:44 pm »
hello
I am trying to compile bennugd for my android, because the version given with bennu-packager doesn't work.

so i start a fresh compile with ndk r8d  and android-15 everything compile, with minor adjustments. so i try to make a very simple hello word.
=============
main prg :
import "mod_text";
import "mod_video";
Const
    screen_width  = 320;
    screen_height = 240;
    screen_depth  =  16;
Process Main()
begin
  set_mode(screen_width,screen_height,screen_depth);
  write (0,100,100,0,"HELLO WORD");
Loop
Frame;
End
End
==================================
and the game crash complaining :
-----------------------------------------------------------------------
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000000
Stack frame #00  pc 0003ae56  /data/data/com.couvelard/lib/libbgdrtm.so: Routine modvideo_set_mode_3 in jni/bgdrtm/../../../../modules/mod_video/mod_video.c:79
Stack frame #01  pc 0001ef8a  /data/data/com.couvelard/lib/libbgdrtm.so (instance_go): Routine instance_go in (null):0
Stack frame #02  pc 0001f33a  /data/data/com.couvelard/lib/libbgdrtm.so (instance_go_all): Routine instance_go_all in jni/bgdrtm/../../../../core/bgdrtm/src/interpreter.c:157
Stack frame #03  pc 00000b32  /data/data/com.couvelard/lib/libmain.so (SDL_main): Routine SDL_main in jni/src/main.c:126
Stack frame #04  pc 00000a22  /data/data/com.couvelard/lib/libmain.so (Java_org_libsdl_app_SDLActivity_nativeInit): Routine Java_org_libsdl_app_SDLActivity_nativeInit in jni/src//../../../../3rdparty/SDL/src/main/android/SDL_android_main.cpp:28
-------------------------------------------------------------------

FreeYourMind

  • Hero Member
  • *****
  • Mensajes: 5648
  • Karma: 127
    • GECA soft
Re:bennugd crash on android with simple script.
« Respuesta #1 en: Abril 28, 2013, 08:37:33 pm »
I have a problem similar compiling the last version of bennugd android (r697) with the same mod_video module, but my problem is:

Error:

/modules/mod_video/mod_video.c:95: undefined reference to `gr_set_fps'
collect2: ld returned 1 exit status


I compile in Linux using ndk-build.
Maybe Josebita don't put a stable version in last r697 check-in on server, try to compile a previous version.

herve_02

  • Newbie
  • *
  • Mensajes: 13
  • Karma: 0
Re:bennugd crash on android with simple script.
« Respuesta #2 en: Abril 28, 2013, 11:21:31 pm »
hello, the test apk, given here do not crash on my tablet, is it possible to have the source of it in order to compile it and see if it do not crash ?

https://www.dropbox.com/s/ef7i2g5jn2azddo/MyGame-debug_20130215.apk

herve_02

  • Newbie
  • *
  • Mensajes: 13
  • Karma: 0
Re:bennugd crash on android with simple script. SOLVED
« Respuesta #3 en: Abril 29, 2013, 10:48:29 pm »
ok.. the problem is solved, much more worked around, in fact

i download the last packager... bennu crash on android :
============================== some debug infos ===================================
V/SDL     ( 5125): Creating new EGL Surface
I/SDL     ( 5125): [STUB] GL_SetSwapInterval
I/SDL     ( 5125): [STUB] GL_GetSwapInterval
I/SDL     ( 5125): [STUB] GL_DeleteContext
V/SDL     ( 5125): Creating new EGL Surface
E/SDL     ( 5125): Couldn't create surface
I/SDL     ( 5125): [STUB] GL_SetSwapInterval
I/SDL     ( 5125): [STUB] GL_GetSwapInterval
F/libc    ( 5125): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1)
========================================================================
so it appears that bennu ask twice for the EGL Surface and crash on the second ask..
so..... after some tries... i modified SDLActivity.java

    public static boolean createEGLSurface() {
        if (SDLActivity.mEGLDisplay != null && SDLActivity.mEGLConfig != null) {
            EGL10 egl = (EGL10)EGLContext.getEGL();
            if (SDLActivity.mEGLContext == null) createEGLContext();
            if (SDLActivity.mEGLSurface == null) { // <<<<<<<<<<<<<<<<<<<<<<  line added =========================
            Log.v("SDL", "Creating new EGL Surface");
            EGLSurface surface = egl.eglCreateWindowSurface(SDLActivity.mEGLDisplay, SDLActivity.mEGLConfig, SDLActivity.mSurface, null);
            if (surface == EGL10.EGL_NO_SURFACE) {
                Log.e("SDL", "Couldn't create surface");
                return false;
            }

            if (egl.eglGetCurrentContext() != SDLActivity.mEGLContext) {
                if (!egl.eglMakeCurrent(SDLActivity.mEGLDisplay, surface, surface, SDLActivity.mEGLContext)) {
                    Log.e("SDL", "Old EGL Context doesnt work, trying with a new one");
                    // TODO: Notify the user via a message that the old context could not be restored, and that textures need to be manually restored.
                    createEGLContext();
                    if (!egl.eglMakeCurrent(SDLActivity.mEGLDisplay, surface, surface, SDLActivity.mEGLContext)) {
                        Log.e("SDL", "Failed making EGL Context current");
                        return false;
                    }
                }
            }
            SDLActivity.mEGLSurface = surface;
              } // <<<<<<<<<<<<<<<<<<<<<<<<< line added =============================
            return true;
        }
        return false;
    }

and the problem is gone...............


panreyes

  • Administrator
  • *****
  • Mensajes: 2184
  • Karma: 74
    • panreyes.com
Re:bennugd crash on android with simple script.
« Respuesta #4 en: Abril 29, 2013, 11:03:34 pm »
Hi herve_02! In which terminal are you using BennuGD?

MisterN

  • Hero Member
  • *****
  • Mensajes: 650
  • Karma: 4
Re:bennugd crash on android with simple script.
« Respuesta #5 en: Abril 30, 2013, 01:23:01 am »
i wanna see my cutscene example running in android lol
werg

herve_02

  • Newbie
  • *
  • Mensajes: 13
  • Karma: 0
Re:bennugd crash on android with simple script.
« Respuesta #6 en: Abril 30, 2013, 08:56:50 am »
i don't know, no trade mark, bought some times ago, i have just vendor id and product id
vendor_id is google.
lsusb => 18d1:0003



handsource-dyko

  • Hero Member
  • *****
  • Mensajes: 568
  • Karma: 32
  • I'm the eye in the sky.
    • dyko designs
Re:bennugd crash on android with simple script.
« Respuesta #7 en: Abril 30, 2013, 09:24:58 am »
Maybe it's a Yarvik or TomTec brand. (something from china). In Holland toy stores sell a lot of these inexpensive chinese-made android tablets for under 200 euro. These devices often have a Rockchip or Allwinner A8 or A9 based ARM processor. It's quite possible you've got a different brand, but that it comes from the same factory.

Here are some specs of the used processors:

http://en.wikipedia.org/wiki/Allwinner_A1X
http://en.wikipedia.org/wiki/Rockchip#Rockchip_29xx_series

It could also contain a SOC from MediaTek: http://en.wikipedia.org/wiki/MediaTek#Smartphone_application_.26_modem_processors_.2F_SoCs


« última modificación: Abril 30, 2013, 09:29:43 am por handsource-dyko »

panreyes

  • Administrator
  • *****
  • Mensajes: 2184
  • Karma: 74
    • panreyes.com
Re:bennugd crash on android with simple script.
« Respuesta #8 en: Abril 30, 2013, 09:31:27 am »
herve_02, try this app:
https://play.google.com/store/apps/details?id=com.dama.hardwareinfo&hl=es


And please attach the log it creates!

herve_02

  • Newbie
  • *
  • Mensajes: 13
  • Karma: 0
Re:bennugd crash on android with simple script.
« Respuesta #9 en: Abril 30, 2013, 09:48:00 am »
do you have the apk ?

panreyes

  • Administrator
  • *****
  • Mensajes: 2184
  • Karma: 74
    • panreyes.com
Re:bennugd crash on android with simple script.
« Respuesta #10 en: Abril 30, 2013, 10:11:57 am »
I've sent you an e-mail :)

panreyes

  • Administrator
  • *****
  • Mensajes: 2184
  • Karma: 74
    • panreyes.com
Re:bennugd crash on android with simple script.
« Respuesta #11 en: Abril 30, 2013, 01:23:38 pm »
So your GPU is a Mali 400. It shouldn't need any changes to work with that.


Does this game work on your tablet?
http://www.pixjuegos.com/pixpang-ouya.apk

herve_02

  • Newbie
  • *
  • Mensajes: 13
  • Karma: 0
Re:bennugd crash on android with simple script.
« Respuesta #12 en: Abril 30, 2013, 02:08:28 pm »
hello, same punishment :
got the first image and then crash...

blablablabla!.................
D/libEGL  ( 7102): loaded /system/lib/egl/libEGL_mali.so                                             
D/libEGL  ( 7102): loaded /system/lib/egl/libGLESv1_CM_mali.so                                                             
D/libEGL  ( 7102): loaded /system/lib/egl/libGLESv2_mali.so                                                                                 
V/SDL     ( 7102): Creating new EGL Surface                                                                           
I/SDL     ( 7102): [STUB] GL_SetSwapInterval                                                                                               
I/SDL     ( 7102): [STUB] GL_GetSwapInterval                                                                                                   
I/SDL     ( 7102): [STUB] GL_DeleteContext                                                                                               
V/SDL     ( 7102): Creating new EGL Surface                                                                                   
E/SDL     ( 7102): Couldn't create surface                                                                             
I/SDL     ( 7102): [STUB] GL_SetSwapInterval                                                                                               
I/SDL     ( 7102): [STUB] GL_GetSwapInterval                 
D/dalvikvm( 7102): GC_CONCURRENT freed 509K, 12% free 6641K/7495K, paused 1ms+2ms
(.........)
D/dalvikvm( 7102): GC_CONCURRENT freed 446K, 12% free 6667K/7495K, paused 2ms+2ms                       
V/SDL     ( 7102): SDL audio: opening device                 
V/SDL     ( 7102): SDL audio: wanted stereo 16-bit 22.05kHz, 1024 frames buffer
V/SDL     ( 7102): SDL audio: got stereo 16-bit 22.05kHz, 3840 frames buffer
D/audio_hw_primary(   85): start_output_stream: card:0, port:0, rate:44100
D/dalvikvm( 7102): GC_CONCURRENT freed 510K, 12% free 6657K/7495K, paused 2ms+2ms
(......)
D/dalvikvm( 7102): GC_CONCURRENT freed 510K, 12% free 6657K/7495K, paused 2ms+2ms     
F/libc    ( 7102): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1)       
I/DEBUG   ( 6495): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 

panreyes

  • Administrator
  • *****
  • Mensajes: 2184
  • Karma: 74
    • panreyes.com
Re:bennugd crash on android with simple script.
« Respuesta #13 en: Mayo 02, 2013, 07:06:38 pm »
Hi herve_02!


I don't know about that new error, but that line you added before made the Adreno GPU's based devices to work!!


Thanks a lot! I hope it doesn't break anything though :)


BTW: Are you using mod_debug? It's not available in Android's BennuGD.

JaViS

  • Global Moderator
  • *****
  • Mensajes: 1281
  • Karma: 27
    • Anarkade
Re:bennugd crash on android with simple script.
« Respuesta #14 en: Mayo 03, 2013, 04:43:50 pm »
Can someone distribute the fixed packager? I don't know how to add that line.


It seems the issue is solved. After someone provide a download I'll announce it on the website and link to it.


thanks!
Working on Anarkade. A couch multiplayer 2D shooter.