Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
New Contributor
DJWingrove
Posts: 9
Registered: ‎12-01-2012
My Device: Playbook, Dev Alpha
My Carrier: ATT
Accepted Solution

Do any native/OGL apps work in 1103?

We work fine on playbook and have worked on every version of BB10 up until now.  The behavior I'm seeing is once we exit we are unable to launch again.  If we're lucky then the program will hang at the splash screen until I reboot my device, otherwise the icon will remain greyed out until a reboot.  Also, running our pre-installed apps right after upgrading gave us 20+ second load times. 

 

This does not seem to be something I can debug in the IDE.  I traced through our exit code and we leave our main function without issue.  We are then unable to launch from eclipse a second time so I can't trace into anything there.

 

I'm looking for confirmation that anyone writing openGL native apps is running just fine with the new update.  At this point I'm thinking we're out of luck until the next update, and am considering uploading the app that didn't make it in for the portathon for playbook only until we can add bb10 support again.

Please use plain text.
Trusted Contributor
bdaemon
Posts: 152
Registered: ‎02-23-2011
My Device: dev alpha playbook 9500 8300
My Carrier: uc

Re: Do any native/OGL apps work in 1103?

which  target do you test ,bb10  device alpha or  simulator?

 

I also notice my NOG app don't close property with the gray icon, and have to reboot the bb10 VM.

Please use plain text.
New Contributor
DJWingrove
Posts: 9
Registered: ‎12-01-2012
My Device: Playbook, Dev Alpha
My Carrier: ATT

Re: Do any native/OGL apps work in 1103?

I've been testing on the dev alpha.

Please use plain text.
Developer
BGmot
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: Do any native/OGL apps work in 1103?

When you run your app from IDE do you see any processes in 'Target Navigator' except conn?

I am not seeing any problems with my OpenGL app on this build.

Please use plain text.
New Contributor
DJWingrove
Posts: 9
Registered: ‎12-01-2012
My Device: Playbook, Dev Alpha
My Carrier: ATT

Re: Do any native/OGL apps work in 1103?


BGmot wrote:

When you run your app from IDE do you see any processes in 'Target Navigator' except conn?

I am not seeing any problems with my OpenGL app on this build.


I see 3 things there, only one looks like a thread:

/Users/.../Device-Debug/GHBowling2 [14799034]

 - Thread [1]  (suspended : breakpoint) - main()

/Applications/bbndk/host_10_0_9_284/darwin/x86/usr/bin/ntoarm-gdb

GHBowling2 on [ip] pid 14799034

 

Thanks for letting me know that it works for you.

Please use plain text.
New Contributor
DJWingrove
Posts: 9
Registered: ‎12-01-2012
My Device: Playbook, Dev Alpha
My Carrier: ATT

Re: Do any native/OGL apps work in 1103?

I am also sometimes seeing this on exit which is probably highly related:

 

PVR:smileysad:Error): PVRSRVUnloadLibrary, dlclose failed to close library [258, /osfunc_um.c]

PVR:smileysad:Warning): _UnloadOpenGLES2: Failed to unload OGLES2 module [234, /khronos_egl.c]

 

Please use plain text.
New Contributor
DJWingrove
Posts: 9
Registered: ‎12-01-2012
My Device: Playbook, Dev Alpha
My Carrier: ATT

Re: Do any native/OGL apps work in 1103?

I had my breakpoint in the wrong place.  I'm actually seeing a bunch of threads now.

 

* MsgSend() from screen_get_event() - (Suspended : Container)

* SyncCondvarWait_r() from pthread_cond_wait() - (Suspended : Container)

* MsgSend() from unknown - (Suspended : Container)

* MsgSend() from read() - (Suspended : Container)

* MsgSendv() from send_pcm_channel_status - (Suspended : Container)

* MsgSend() from read() - (Suspended : Container)

* main() - (Suspended : Breakpoint)

 

At the end of my main() function I still have

* MsgSend() from read()

* MsgSendv() from snd_pcm_playback_prepare()

 

This is a good lead for me to investigate, thanks.  I'll update this post if I find the solution or if someone replies with suggestions.

 

 

Please use plain text.
New Contributor
DJWingrove
Posts: 9
Registered: ‎12-01-2012
My Device: Playbook, Dev Alpha
My Carrier: ATT

Re: Do any native/OGL apps work in 1103?

I have narrowed down minimal repro steps.  

 

1) create an empty c or c++ application project

2) add bps and screen libraries to the project

3) add the main.cpp I'm attaching at the end.

4) run the app, then exit the app.  the icon will be greyed out until the device is restarted.

 

#include<bps/bps.h>

#include<bps/navigator.h>

#include<bps/screen.h>

 

int main(int argc, char *argv[])

{

//Create a screen context that will be used to create an EGL surface to to receive libscreen events

screen_context_t screen_cxt;

screen_create_context(&screen_cxt, 0);

    //Initialize BPS library

    bps_initialize();

 

    //Signal BPS library that navigator and screen events will be requested

    if (BPS_SUCCESS != screen_request_events(screen_cxt)) {

        fprintf(stderr, "screen_request_events failed\n");

        screen_destroy_context(screen_cxt);

        return 0;

    }

    if (BPS_SUCCESS != navigator_request_events(0)) {

        fprintf(stderr, "navigator_request_events failed\n");

        screen_destroy_context(screen_cxt);

        return 0;

    }

    //Signal BPS library that navigator orientation is not to be locked

    if (BPS_SUCCESS != navigator_rotation_lock(false)) {

        fprintf(stderr, "navigator_rotation_lock failed\n");

        screen_destroy_context(screen_cxt);

        return 0;

    }

 

    int exit_application = 0;

    while (!exit_application) {

        //Request and process all available BPS events

        bps_event_t *event = NULL;

 

        for(;:smileywink: {

            if (BPS_SUCCESS != bps_get_event(&event, 0)) {

                fprintf(stderr, "bps_get_event failed\n");

                break;

            }

 

            if (event) {

                int domain = bps_event_get_domain(event);

 

                if (domain == screen_get_domain()) {

                    //handleScreenEvent(event);

                } else if ((domain == navigator_get_domain())

                        && (NAVIGATOR_EXIT == bps_event_get_code(event))) {

                    exit_application = 1;

                }

            } else {

                break;

            }

        }

    }

 

    //Stop requesting events from libscreen

    screen_stop_events(screen_cxt);

    //Shut down BPS library for this process

    bps_shutdown();

 

    //Destroy libscreen context

    screen_destroy_context(screen_cxt);

    return 0;

}

 

Please use plain text.
Developer
BGmot
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: Do any native/OGL apps work in 1103?

Quick Question: are you building using NDK beta3 or beta4?

Please use plain text.
New Contributor
DJWingrove
Posts: 9
Registered: ‎12-01-2012
My Device: Playbook, Dev Alpha
My Carrier: ATT

Re: Do any native/OGL apps work in 1103?

Version: 10.0.9

Build id: v201211092310

 

I think that's 4.  It should be the most recent.

Please use plain text.