BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 08-29-2008, 04:27 PM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: May 2008
Model: 8700
PIN: N/A
Carrier: Telcel
Posts: 69
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default net.rim.vm.TooManyThreadsError uncaught exception

Please Login to Remove!

I have been working on Blackberry 8700 recently, and while testing the program i'm developing i get this error pretty often

In the program i use several threads wich do differente things, but all are network based procedures that connects to a .NET SOAP WebService

The main system thread
1 thread to identifying the user and give him his working data
1 thread to send info whenever the user ends to use it
1 thread to retrieve all the info of the current state in wich the work is

All this thread are created and are running besides main system thread waiting to be called, as this article states

Networking, User Experience, and Threads

So, in the end, I created 3 worker threads wich are called when needed. The thread that is most called is the one used to send info, so I activate it each time i need to send info, so i'm never creating new thread, just calling them whenever I need, why am i recieving this error????
Offline  
Old 08-29-2008, 06:37 PM   #2 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default

The JVM limits you to 16 threads per application, and there is also an overall limit for the system.

However, I've seen this error before, always the programmer said "I'm only using three threads!"

Generally, it wound up being an error in the logic where the program spawned more threads than the developer intended.

Of course, that never happened to *me* lol
Offline  
Old 09-01-2008, 05:05 PM   #3 (permalink)
Thumbs Must Hurt
 
Join Date: May 2008
Model: 8700
PIN: N/A
Carrier: Telcel
Posts: 69
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yeah, well, i'm pretty aware of this problem, and its obvious i'm exceding the ammount of threads, but i'd like to know of a possible solution for this, or how can I kill the process once it has finished its work
Offline  
Old 09-05-2008, 07:24 AM   #4 (permalink)
Thumbs Must Hurt
 
Join Date: Apr 2006
Location: Boston
Model: 8900
Carrier: AT&T
Posts: 98
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Suggestion for tracking down *why* it's happening: log the creation, start, and end of each thread, preferably to the event log so you can search it (note: it's true, I'm a fan of "debugging-via-printf"). Once you know the "why", it should be easy to code a "don't do this" solution. As Dougsg38p mentioned, it's very likely an error in your coding logic.

Another suggestion: start Simple. Don't create *any* threads. See what happens. Then create just one thread (say, the thread to identify the user and give him his working data) and see what happens. In conjunction with the first suggestion above, you should either see that only one thread gets created-executed-dies, or that multiple ones are. And so on, and so on.

Cheers,

karl
__________________
Karl G. Kowalski
---------------
Owns a RAZR
Develops for BlackBerry
So next phone will be........an iPhone 3G!
Offline  
Old 10-27-2008, 06:38 AM   #5 (permalink)
New Member
 
Join Date: Oct 2008
Model: 8130
PIN: N/A
Carrier: alltel
Posts: 2
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default what do I do?

I use an application called CONFIDANT to measure and track my blood sugars and I am new to using a Blackberry.....I am getting this message when I try to use the CONFIDANT application “unhandled error occurred, application must exit net.rim.vm.TooManyThreadsError”

Help what do I do?
Offline  
Old 10-27-2008, 08:22 AM   #6 (permalink)
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

contact the developer
__________________
java developer, Devinto, hamburg/germany
Offline  
Old 10-28-2008, 05:38 AM   #7 (permalink)
New Member
 
Join Date: Oct 2008
Model: 8130
PIN: N/A
Carrier: alltel
Posts: 2
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

figured out what to do: pop out the fricking battery, then re-insert, it seems to clear it all up and re-sets everything.
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Copyright © 2004-2014 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.