11-18-2009 07:36 AM
Hi All,
I am developing one BB aplication where Ineed to use Global Screen. My application stops after running for sometime and shows Outof memory error. A have checked the display stack. the count shows 118.
My program works with GLOBAL_SHOW_LOWER as like below
Ui.getUiEngine().pushGlobalScreen(screen,0,UiEngin
what might be the possible cause. how do i empty the stack. or is it for any other reason.
Thanks in advance.
11-18-2009 07:58 AM
Are you closing these global screens?
11-18-2009 08:19 AM
Hi,
No. I am not closing Global screen. the VM is showing as below..
VM:HSB4v=27736045
VM:+GC(f)w=12
VM:-GCt=3,b=0,r=0,g=f,w=12
VM:AHSDt=51,i=1,x=18,s=26.4M,q=26.4M,z=15365
VM:+CR
VM:TI2Rv=100
VM:-CR=2
VM:HSB4v=27738109
VM:+GC(f)w=12
VM:-GCt=3,b=0,r=0,g=f,w=12
VM:AHSDt=51,i=1,x=18,s=26.4M,q=26.4M,z=15365
VM:HPEXv=15365
TrialImage
RX=1014.3K,RF=1018.1K,FF=39.9M,OF=396.7K,OS=42.2M,
RA=25.8M,RS=23.1M,RN=4.1K
TA=17.6M,TS=17.4M,TN=74.6K
PA=1.6M,PS=1.6M,PN=7.1K
R0=105.7M,1=420.6K,2=24K,3=71.1K,4=2.1M,7=66.2K,8=
Thanks,
11-18-2009 08:29 AM
Post the exception stack trace.
11-19-2009 05:20 AM
VM Stack
0x03896000
11-19-2009 08:42 AM
That is not the stack trace. I wonder how you expect to successfully create programs if you cannot perform basic problem determination?
Is this on the device or the simulator? If you can duplicate the issue on the simulator, you can view the call stack at the time of the exception. This call stack will show you the sequence of method calls leading yup to the point of the exception.
If this is the device, the stack trace must be retrieved from the device event log, or by duplicating the issue while the device is attached to the debugger.
11-20-2009 02:14 AM
Sorry, I copied the wrong stack.
Stack trace as below..
Calling Method
Bitmap.Bitmap( int, int, int, byte[], boolean, boolean, boolean ) 613
Bitmap.Bitmap( int, int, int, byte[], boolean, boolean ) 441
Bitmap.Bitmap( int, int, int, byte[], boolean ) 422
Bitmap.Bitmap( int, int )
BackingStore.createBitmap( boolean ) 130
BackingStore.BackingStore( int, int, boolean ) 67
GlobalScreenManager.getTransparentBackingStore( ) 1113
Screen.doPaint0( boolean, boolean ) 1369
UiEngineImpl.paintToBackingStores( ) 442
UiEngineImpl.doPainting( )
UiEngineImpl.processMessage( Object, Message, boolean ) 2442
Application.processNextMessage( Message ) 1835
Application.enterEventDispatcher( )
TrialImage.main( String[] )
Thanks
11-20-2009 08:42 AM
Nothing jumps out at me - can you post some code where the exception occurs?
11-20-2009 09:53 AM
How big is the Bitmap you are creating?
11-20-2009 10:31 AM
Actually I am trying to display a clock on my homescreen. I am drawing 3 hands of the cloch using bitmap & rotate method. I am able to get them all on my homescreen but when the soconds hand reaches some perticular point, the application throws out of memory error.
UiApplication.getUiApplication().invokeLater(new Runnable(){
public void run(){
try{
TestClockHands screen =new TestClockHands();
screen.loadCanvas(count,secVect,minVect,hourVect,i ndex,index1);
synchronized(Application.getEventLock()){
Ui.getUiEngine().pushGlobalScreen(screen, 0, UiEngine.GLOBAL_SHOW_LOWER);
}
}catch(Exception e){
System.out.println(e);
}
}
});