Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reconnecting to device sometimes causes application to crash. #22

Open
GoogleCodeExporter opened this issue Mar 30, 2015 · 0 comments
Open

Comments

@GoogleCodeExporter
Copy link

I have made an air for desktop app on win 7 which communicates to an atmega 8 
based system.

When I first connect to the system it works absolutely fine but if I lose 
connection for example the system goes off or to simulate I sometimes 
disconnect and reconnect the USB from my laptop. Sometimes it will reconnect 
but most of the time it will crash my application like it went into a infinite 
while loop.

I will attach a simple version of my code here. The corresponding atmega system 
for this is setup to echo the letter "H" when I send it from the app by 
clicking button b1. Button b1 is used to reconnect and textfield t1 displayed 
the received string.

This is what I do to recreate the problem.

1. First open the app and while connected to a system that will echo u.
2. Press b1 to connect.
3. Press b2 to send H and see the reply displayed in the textfield t1
4. Now disconnect the USB cable from the computer and reconnect it.
5. Try to send H again by pressing b2 to check if the connection is still open. 
Usually here you will not receive anything.
6. Try to reconnect by pressing b1. Here the application usually crashes for 
me. if it reconnects repeat steps 4,5 and 6. It connects around 2 out of 5 
times the other times the app crashes.

Thank you for your help 

Regards,

Gautham




Original issue reported on code.google.com by [email protected] on 28 May 2013 at 12:38

Attachments:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant