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
New Developer
Posts: 25
Registered: ‎10-29-2009
My Device: Not Specified

MapField create new thread every time when instantiate it.

Hi,

 

I am facing problem Too many thread error. I m using JDE 4.5 with eclipse.

 

I am using MapField in my application. And every time I instanciating MapField,  it create a new RenderThread which goes in wait state. As VM only accept only 16 thread for an Application, it gives too many thread error, after sometime while I browsing in my application. Also I prefer new MapField object for all screen with different capabilities.

 

Please someone tell me how to handel situation like this.

 

Thanks in advanc.

 

Thanks

Adarsh Pandey

New Developer
Posts: 25
Registered: ‎10-29-2009
My Device: Not Specified

Re: MapField create new thread every time when instantiate it.

Please help me out

Developer
Posts: 100
Registered: ‎04-07-2009
My Device: Not Specified

Re: MapField create new thread every time when instantiate it.

Hello,

 

does this mean you have more than 15 MapField instances added on some Screen on the stack?

New Developer
Posts: 25
Registered: ‎10-29-2009
My Device: Not Specified

Re: MapField create new thread every time when instantiate it.

I mean to say, I want to add new MapField in new screen. I poped out all the previous screen which contain map before push new screen.

 

But result is there is a RenderThread are still in wait condition which make too many thread error.

Developer
Posts: 100
Registered: ‎04-07-2009
My Device: Not Specified

Re: MapField create new thread every time when instantiate it.

Did you use UIEngine.popScreen() or Screen.closo() ? If first, try second, because as you tell this, i guess MapField interrupts its render thread on screen close.

New Developer
Posts: 25
Registered: ‎10-29-2009
My Device: Not Specified

Re: MapField create new thread every time when instantiate it.

no luck, Still getting same problem as UiEnging.popup does.

New Developer
Posts: 25
Registered: ‎10-29-2009
My Device: Not Specified

Re: MapField create new thread every time when instantiate it.

Please reply.

Developer
Posts: 100
Registered: ‎04-07-2009
My Device: Not Specified

Re: MapField create new thread every time when instantiate it.

[ Edited ]

I have the same Code (new MapField instance for new Screen instance) working on 4.7, but I think there are 64 Threads allowed. And there are also daemon threads. So maybe at 4.6 MapField never interrupts its render thread, because maybe there are no daemon threads. That's all I can say. And actually I don't even know whether MapField interrups its render thread in my app, but I havn't recognized anything yet.

New Developer
Posts: 25
Registered: ‎10-29-2009
My Device: Not Specified

Re: MapField create new thread every time when instantiate it.

Thanks for reply Hagen. I m not working on 4.7, so I don't know the behaveor of the MapField over 4.7.

 

Is there anyone else or BB Admin working on this.

 

 

Please reply.

 

Thanks

New Developer
Posts: 11
Registered: ‎12-31-2009
My Device: Not Specified

Re: MapField create new thread every time when instantiate it.

I worked with OS version 5.0 (Tour 9630) and got the same issue. The maximal number of threads allowed in one applications in 5.0 seems 64 as well.