tix
Posts: 2
Joined: Sun Jun 08, 2008 6:36 pm

Stack corruption

Sun Jun 08, 2008 6:43 pm

Hello and thanks for this great product.
I am trying to implement a 2 phase communication.
At first (phase a) the windows mobile device is connecting to a pc and sends and receives a string.
At the second phase the windows mobile reconnects and sends a string.
The application works flawllesly for 5 times.
After it gives no response.
If i turn off and on the bluetooth before the 5 times the app works for another 5 times.
I suspect that the manager is not properly disposed.
Is there a way to programmaticaly turn off and on the bluetooth or see what isnt disposed ?

O/S windows mobile 5
Stack widcomm

Jonas
Posts: 2319
Joined: Mon Jan 09, 2006 2:20 pm
Location: Sweden

RE: Stack corruption

Mon Jun 09, 2008 12:25 pm

For Widcomm, no.
Only thing I can recommend is that you close all connections properly when you disconnect.

Regards,
Jonas

michael29
Posts: 12
Joined: Wed Feb 13, 2008 2:54 pm
Location: Germany

RE: Stack corruption

Mon Dec 08, 2008 2:45 pm

Originally posted by Jonas

For Widcomm, no.
Only thing I can recommend is that you close all connections properly when you disconnect.

Regards,
Jonas


Hello,

concerning to the stack corruption problem with Bluetools library I have another question:

Currently I have the same problem under a HQ iPAQ PDA, using WindowsMobile 5, .NET CF 2.0, WidComm Stack V1.7.1.1416.

When I close my application, wich is written in C#, the instruction to dispose the bluetools manager class will be always invoked.

But there's definitely another problem, but I have no idea where to fix this. I already tried out to disconnect within my application from the remote device and connect again to the device, a.s.o. This part works very fine, but when I close my application and open it again and connect to the deivce, and close it again..a.s.o. I get the same effect as described above in the first post.

Have you any idea or a proposal for this?

Thank you in advance,
Michael

tix
Posts: 2
Joined: Sun Jun 08, 2008 6:36 pm

RE: Stack corruption

Mon Dec 08, 2008 4:20 pm

The temporary workaround that i found was to disbale all the stack via ipaq tools.
This is ipaq specific and not a general solution.

michael29
Posts: 12
Joined: Wed Feb 13, 2008 2:54 pm
Location: Germany

RE: Stack corruption

Mon Dec 08, 2008 5:12 pm

Originally posted by tix

The temporary workaround that i found was to disbale all the stack via ipaq tools.
This is ipaq specific and not a general solution.


Thank you for your hint. Do you have a link for me to download the iPaq tools?

But for the professional use I can't use this workaround, because my application will be an international distributed one and I have to be sure that this problem doesn't pop up when our customers use the software more than 5 times per session. :-)

Did you install your application already on another PDA or smartphone (not HP) wich uses the WidComm stack?
Currently I have only the iPAQ here and it would be interesenting to see if this effect also exists on other devices to exclude, if this is a HP-bug or a bluetools bug.

Lisa
Posts: 4
Joined: Wed Dec 10, 2008 9:54 pm
Location: USA

RE: Stack corruption

Thu Dec 11, 2008 1:59 am

Hi, I have the same problem on my HP. I have not been able to reproduce it on my ASUS 696 (running WM 6 and Widcomm), but I haven't used it as much. I was wondering if I was using the wrong version of the bluetools dlls??

Also, by closing all connections - exactly what does this entail? Is calling GetManager().Dispose() sufficient, or does one also have to close all the open streams, etc?

- Lisa

Jonas
Posts: 2319
Joined: Mon Jan 09, 2006 2:20 pm
Location: Sweden

RE: Stack corruption

Thu Dec 11, 2008 3:21 am

Closing all connections means Stream.Close() on all open connections.
Calling GetManager().Dispose() is required on shutdown, it should be sufficient but closing all the open streams manually first is recommended.

Regards,
Jonas

michael29
Posts: 12
Joined: Wed Feb 13, 2008 2:54 pm
Location: Germany

RE: Stack corruption

Thu Dec 11, 2008 3:30 pm

Originally posted by Jonas

Closing all connections means Stream.Close() on all open connections.
Calling GetManager().Dispose() is required on shutdown, it should be sufficient but closing all the open streams manually first is recommended.

Regards,
Jonas


Yes, I always close the opened stream first before I invoke the Dispose()-Method of the Bluetools manager class, but the error still pops up after 5 times of opening my application. Is there anything else to dispose or to close before I terminate my application?
I still haven't found anything else to this topic in the Bluetools documentation.

Regards,
Michael

Jonas
Posts: 2319
Joined: Mon Jan 09, 2006 2:20 pm
Location: Sweden

RE: Stack corruption

Thu Dec 11, 2008 3:54 pm

No, it shouldn't be anything else that is required.
I don't know why it's happening.

Regards,
Jonas

michael29
Posts: 12
Joined: Wed Feb 13, 2008 2:54 pm
Location: Germany

RE: Stack corruption

Tue Dec 16, 2008 5:24 pm

Originally posted by Jonas

No, it shouldn't be anything else that is required.
I don't know why it's happening.

Regards,
Jonas


I excluded definetly the possibility that there's an error in parts of my sourcecode rather than in the neccessary bluetools classes "Service", "ServiceStream", "RemoteDevice" and "RemoteService", because I didn't used them for my last experiments now. But the error still occurs, after I opened my application, searched for bluetooth devices and then closed it again for 5 times.

So I've searched for another solution for my problem and I found an own written library by Joao Figueira, who wrote some wrapper classes around the WidComm stack based on the Broadcom SDK in C#.
I got them and wrote an application for testing purposes based only on one of his wrapper classes. It starts an inquiry for bluetooth devices and displays all of them on my iPAQ. I can use my test application more than an 5 times after I closed it. So, how could it be that I get so much problems with my licensed bluetools library?

Regards,
Michael

Jonas
Posts: 2319
Joined: Mon Jan 09, 2006 2:20 pm
Location: Sweden

RE: Stack corruption

Tue Dec 16, 2008 5:47 pm

Can you upload the project somewhere so I can test it?

Regards,
Jonas

michael29
Posts: 12
Joined: Wed Feb 13, 2008 2:54 pm
Location: Germany

RE: Stack corruption

Sat Jan 24, 2009 1:48 pm

Originally posted by Jonas

Can you upload the project somewhere so I can test it?

Regards,
Jonas


According to the last posts I sent you my application in december wich uses the BlueTools library. Were you able to collect any new informations about the described problem above in the passed time?

Jonas
Posts: 2319
Joined: Mon Jan 09, 2006 2:20 pm
Location: Sweden

RE: Stack corruption

Mon Jan 26, 2009 10:32 am

I could never reproduce your problem, sorry.

Regards,
Jonas

Return to “BlueTools”