Main forum > Bug Reports

Android: Possible null pointer reference crash when minimized

(1/3) > >>

spacefractal:
Currectly im have no idea why this happens, but a app can crash out on a backbuffer flip after you have minimized the app.

Etc im tried do this:


--- Code: (glbasic) ---void OpenGLRainbows::PrepareBackbuffer() {
#if defined(TINYGL) || defined(TRENKI3D)
                                                                                                                            if (m_Surface[0].m_Height) {
m_Surface[0].MemCpyToScreen();
} else {
if (m_bHasClearColor) {
Screen.Clear();
}
}
#ifdef TRENKI3D
if (m_bDirtyZBuffer) {
m_bDirtyZBuffer=false;
Screen.ClearZBuffer();
}
#endif
#else
#ifdef PALM_WEBOS
#endif
#ifdef GLB_SURFACE_OLDSCHOOL
                                                                                                                            if (m_Surface[0].usex>0) {
if (m_bDirtyZBuffer) {
m_bDirtyZBuffer=false; glClear(GL_DEPTH_BUFFER_BIT);
}
PasteSurface(0);
} else if (m_bHasClearColor || m_bDirtyZBuffer) {
GLbitfield bits=0;
if (m_bHasClearColor)  { bits |= GL_COLOR_BUFFER_BIT; }
if (m_bDirtyZBuffer) { bits |= GL_DEPTH_BUFFER_BIT;  m_bDirtyZBuffer=false; }
glClear(bits);
}
#else
    g_debug("PrepareBackbuffer start");
    if (m_BackSurfaceSpriteID[0] != -1) {
        g_debug("1");
        PasteSurface(0);
        g_debug("2");
    } else if (m_bHasClearColor || m_bDirtyZBuffer) {
        g_debug("11");
        GLbitfield bits = 0;
        g_debug("12");
        if (m_bHasClearColor) { bits |= GL_COLOR_BUFFER_BIT; }
        g_debug("13");
        if (m_bDirtyZBuffer) {
            bits |= GL_DEPTH_BUFFER_BIT;
            m_bDirtyZBuffer = false;
        }
        g_debug("14");
        glClear(bits);

    }
#endif
#endif
    g_debug("PrepareBackbuffer end");
}

--- End code ---

but got a logcat like this:

--- Code: (glbasic) ---I/glbasic: [GLB]->loop start() after SHOWSCREEN
    [GLB]->loop start()
I/glbasic: [GLB]->loop start() before SHOWSCREEN
    __g_paused: 0 0
    FlipScreens before
    FlipScreens
    1
    PrepareBackbuffer start
    11
    12
    13
    14
I/glbasic: OnPause()
    glbasicOnPause
V/SDL: onPause()
V/SDL: nativePause()
V/SDL: surfaceDestroyed() start
I/SDL: surfaceDestroyed() end
A/libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x4 in tid 21728 (SDLThread), pid 21683 (ractal.spotrace)
V/SDL: onWindowFocusChanged(): false

--- End code ---

And now, removeing glClear(bits) diddent help a test, then its just crashout in a another place in the function.

spacefractal:
there is something very strange here. Hate those threads, which im guess its the main issue as FlipScreens might fails, if its that. no idea.

spacefractal:
im will property newer fix that issue, due Android Studio is just so much hell with debugger.....

There was much more info with Android SDK, but there is none with Android Studio and any documents im have found is too techincal to read and does not tell step to step what to do and get it working. Nice. What a hell do you not have a default dugger that can tell info like Android SDK did as by default?

etc im did newer got a debugger to work at all. So im have no no info what to do and want to do.

PS. The worst cause about this issue is the app might restart when resumed.

dreamerman:
For me Android dev tools are .. lets say that for example Symbian OS / Windows Phone dev tools were much better, almost out of box everything worked, proper debugger and so on.. At least for indie/single developer.
Let's say that even Phonegap/Cordova tools advaised to use older gradle 2.4 and not update some SDK/Studio stuff when I was doing some Android project :DD

So there was no changes in that core part of GLB backbuffer flipping, drawing and handling pause?
I didn't work with android from some time, that logcat file is from adb? Not sure if that applies to all but some smartphones have many options in hidden 'dev mode' for debugging, like warning levels - warn/info/debug/verbose..
Some day day I will need to download that Android Studio to look into it :D

Qedo:
I found this. It might be useful?
https://github.com/googlearchive/android-PdfRendererBasic/issues/20

Navigation

[0] Message Index

[#] Next page

Go to full version