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

BlackBerry Advertising Service

Reply
New Contributor
DanielUranga
Posts: 9
Registered: ‎07-26-2013
My Device: Blackberry Dev Alpha C, Blackberry Playbook, Developer
My Carrier: None

Blackberry Ads deadlock

Im developing a NME (NME uses a Blackberry port of SDL as backend) extension to display native ads for my Blackberry 10 native app.
Im able to compile my extension correctly but im getting a deadlock with this code:

char window_group_name[256];
snprintf(window_group_name, 256, "SDL-window-%d", getpid());

SDL_SysWMinfo sysInfo;
SDL_VERSION(&sysInfo.version);
screen_window_t screen_window = NULL;
int a = SDL_GetWMInfo(&sysInfo);

if(a>0)
{
    screen_window = sysInfo.window;
}

ad_banner = 0;
int ad_is_visible = 0;

if (BBADS_EOK != bbads_banner_create(&ad_banner, screen_window, window_group_name, BANNER_TEST_ZONE_ID))
{
    return;
}

The deadlock occurs when I call "bbads_banner_create", my app freezes and I have to kill it from Qde.
I fail to find the cause of the problem, maybe someone has some hint on this?

Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Blackberry Ads deadlock

Does the AdSample work as expected for you?

https://github.com/blackberry/NDK-Samples/tree/master/AdSample

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.
New Contributor
DanielUranga
Posts: 9
Registered: ‎07-26-2013
My Device: Blackberry Dev Alpha C, Blackberry Playbook, Developer
My Carrier: None

Re: Blackberry Ads deadlock

Yes, only a few things to notice:

- I get this warning:

 

- The adds shows smaller than the white box containing it.

 

But it works, so it must be something NME/SDL related...

Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Blackberry Ads deadlock

That error is expected if using an SDK that does not match the OS of your device.

 

Could you create a sample minimalist NME app that reproduces this issue and log it here:

https://www.blackberry.com/jira/secure/Dashboard.jspa

 

I can investigate further to see if there's a way it can be fixed/workedaround.

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.
New Contributor
DanielUranga
Posts: 9
Registered: ‎07-26-2013
My Device: Blackberry Dev Alpha C, Blackberry Playbook, Developer
My Carrier: None

Re: Blackberry Ads deadlock

Thank you a lot. Will create the example and link the issue here.

Please use plain text.
New Contributor
DanielUranga
Posts: 9
Registered: ‎07-26-2013
My Device: Blackberry Dev Alpha C, Blackberry Playbook, Developer
My Carrier: None

Re: Blackberry Ads deadlock

I cant access the webpage, not even trying from different computers. Is the webpage up?

Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Blackberry Ads deadlock

It's up. WHat do you see when you try to browse?

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.
New Contributor
DanielUranga
Posts: 9
Registered: ‎07-26-2013
My Device: Blackberry Dev Alpha C, Blackberry Playbook, Developer
My Carrier: None

Re: Blackberry Ads deadlock

I can only see a black bar in the top of the screen with the BB logo and some options, it blinks and reloads continuously, like a redirection loop.

 

Tested on Mac Os X+Chrome, Windows+Chrome & Windows+Firefox.

Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Blackberry Ads deadlock

Could you try clearing the cache? This was a problem a few weeks ago but should have been resolved

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.
New Contributor
DanielUranga
Posts: 9
Registered: ‎07-26-2013
My Device: Blackberry Dev Alpha C, Blackberry Playbook, Developer
My Carrier: None

Re: Blackberry Ads deadlock

Nope, cant connect, even after clearing the cache.

Please use plain text.