BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 03-01-2009, 03:52 PM   #1 (permalink)
New Member
 
Join Date: Jul 2008
Model: 8310
PIN: N/A
Carrier: Rogers
Posts: 1
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Direct TCP socket outputs make Blackberry reset every few hours

Please Login to Remove!

Hello,

I have a JDE program connects with Windows desktop with direct TCP socket and sends data every 30 seconds.
If I remove those socket "write..." commands, the program can run more than 1 day without any problem.
Once I add those "write..." command, Blackberry will reset (just like pull off battery and put back) every 3 to 6 hours.
I check the built-in memry, it has more than 24 MB all the time, and run garbage collection every 30 minutes doesn't help.

Blackberry:
8310. V4.5.0.81 (platform 2.7.0.78), Rogers wireless.

JDE 4.3.0

I've stuck for weeks. Any help will be greatly appreciated.

James
------------------------------------------
Source codes:

StreamConnection conn = null;
DataOutputStream data_out;
DataInputStream data_in;

//----In worker thread--------------------------------

pSharedData1.conn=null;

pSharedData1.conn = (StreamConnection)Connector.open(URL1);
pSharedData1.data_out = new DataOutputStream (pSharedData1.conn.openOutputStream());
pSharedData1.data_in = new DataInputStream(pSharedData1.conn.openInputStream( ));
...
...
GPS location listeners...
...


//loop executed every 30 seconds

try
{
pSharedData1.data_out.writeLong(MyTelNo);
pSharedData1.data_out.writeInt(Cmd_out);
pSharedData1.data_out.writeInt(Status_out);
pSharedData1.data_out.writeDouble(Lat_out);
pSharedData1.data_out.writeDouble(Lng_out);
pSharedData1.data_out.writeDouble(Speed_out);
pSharedData1.data_out.writeDouble(Direction_out);
return 0;
}
catch(..)
{
...
}
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.