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

Java Development

Reply
Developer
Posts: 39
Registered: ‎05-26-2009
My Device: BlackBerry Storm 9550

"UiEngine is null" error on device but not on simulator

Hi everyone,

 

I am currently experiencing a strange issue with my app that only occurs on the device and not on the simulator. I have just finished adding a custom fadein/fadeout animated transition in my app's screens. Basically when a screen is pushed, another screen, MangoAnimationScreen, is pushed on top of it and draws the animation. Then when the animation is completed, MangoAnimationScreen is popped to reveal the new screen below it.

 

This works fine on the simulator, however when I tested the app on the BlackBerry it does not work. Right after the fade animation completes, the app closes and I get a dialog box stating:

 

[code]Uncaught Exception popScreen: UiEngine is null !: net.rim.device.api.ui.

UiEngineImpl*some-numbers-here*[/code]

As I said, this popup appears right whenever the animation finishes. Presumably the "popScreen" the message is referring to is MangoAnimationScreen closing itself after completing its animation.

I can't think of why this would happen, and UiEngine is null doesn't really make sense to me. Plus, why does it only happen on the device and not in the simulator?

Anyone have any ideas?

Thanks!
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: "UiEngine is null" error on device but not on simulator

Don't think I can help, but it would be useful to know the JDE/Component pack and Device OS Levels involved here, also the Device.  Can you post these?

Developer
Posts: 39
Registered: ‎05-26-2009
My Device: BlackBerry Storm 9550

Re: "UiEngine is null" error on device but not on simulator

Building against JDE 4.7 component pack, simulator is running os 4.7.0.67 or something like that, and the device I'm testing on is Verizon 9530 running OS 4.7.0.148. If there were a way to "update" the simulator that might be useful in testing?

Developer
Posts: 905
Registered: ‎02-07-2009
My Device: BlackBerry Torch 9800
My Carrier: Globe Telecom

Re: "UiEngine is null" error on device but not on simulator

try attaching your device in the debugger and see where it gets "null".

 

you can also download verizon simulator here:

https://www.blackberry.com/Downloads/browseSoftware.do;jsessionid=RKJAXeJ6X-gwviE7JKhoog**

Developer
Posts: 39
Registered: ‎05-26-2009
My Device: BlackBerry Storm 9550

Re: "UiEngine is null" error on device but not on simulator

Well that's the thing: it never happens in the simulator. Maybe that's because of the differing OS versions... I'll try the verizon simulator now.

Developer
Posts: 39
Registered: ‎05-26-2009
My Device: BlackBerry Storm 9550

Re: "UiEngine is null" error on device but not on simulator

I tried using the Verizon simulator running OS 4.7.0.148 (the same OS running on the device) and got nothing. The simulator still chugs along happily where the device throws an error every time. :/

Developer
Posts: 98
Registered: ‎01-06-2009
My Device: Pearl 8110

Re: "UiEngine is null" error on device but not on simulator

I get the same exception for 4.5.

 

The exception occurs after  a soft reset or battery pull.

 

The reference for the UiEngine object points to the same address,

so I don't understand whey the exception says UiEngine is null != ...UiEngine.

I use

 

UiEngine eng = Ui.getUiEngine();

eng.popScreen(testGlobalScreen);

 

Can someone tell if this is bug on Rim's side?

Highlighted
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: "UiEngine is null" error on device but not on simulator

@BottomFish,

 

As a guess, and only a guess, I'd suggest your problem might be related to running things at startup before the UI is really available.  Try delaying if

 

ApplicationManager.inStartUp()

 

is true.

Developer
Posts: 98
Registered: ‎01-06-2009
My Device: Pearl 8110

Re: "UiEngine is null" error on device but not on simulator

I already solved it. Thanks, Peter. And you are right.

New Developer
Posts: 50
Registered: ‎03-18-2009
My Device: 8530
My Carrier: Movilnet

Re: "UiEngine is null" error on device but not on simulator

Mark this as Solved, btw, how you can Solve this? With the inStartup?

// Code for getting Thanks
if( iWasHelpful && solvedYourProblem ) {
Thanks++;
solution = true;
}