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  




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