Need help! Urgent!

  • Thread starter Thread starter Tomer
  • Start date Start date
T

Tomer

Hi,
I've developed an application that uses a gprs card in pocket pc to send
data to a remote server on the internet.

The whole connection to the server procedure goes like this:

1.use connection manager to establish a connection to the internet.
2.use socket object to connect to the server.
3.transfer the data.
4.disconnect from the server.
5.disconnect from the internet.

At first I had some 'application gets stuck' issues because I've used the
garbage collector.
After I've canceled the GC the number of error reduced to 1 for every ~10
connection procedures ( with the GC was 1:5 ratio ).

The application gets stuck when I fill a DataTable with records using a
DataAdapter. Note that in every connection procedure I'm transfering the
same data, so that the procedures are exactly the same.

I've been try to solve this mystery for 2 whole days, I've tried different
ways to declare/dispose variables but nothing.

Please help.

Tomer.
 
Hi Alex,

During the send of each record I'm updating a progress bar which is on
another form.
The progress bar form is declared on the form that doing the connect
procedure.

I've also some timers in the app that update a battery level status on the
UI is that a problem also?

How can I know for certain that another thread is doing me the trouble??

Tomer.
 
Hi Tomer!!!

I think that displaying a separated form might be the source of your
issue. If I may suggest, try to have the socket connection in the progress
bar form, or don't show the progress bar form at all during the socket
connection.

I am also sending information to a server doing sockets, and I also
tried to show a progress bar form. Everytime I showed the form, the socket
connection went down. I suspected this was a thread / form / Application
issue, so I stopped showing the form. That solved my problem.

Good luck!!!

Tarh ik
 
Well, after a week of fighting this problem and almost coming to a complete
despair,
I've finally found the problem, after I've copied the connection code to a
whole new empty smartdevice application.
I've found that I should declare a certain DataTable in the form itself and
not use it as declared static on the mainform.

All of this very weird since up until now everything worked perfectly.
Once I've declared another DataTable on the form itself, and filled with
data, the problem got solved, and it never existed.

I'm now also using the progress bar update and even more, and it seems to
work just fine (for now!)

Tomer.
 
Back
Top