paiprashanth / ardupilot-mega

Automatically exported from code.google.com/p/ardupilot-mega
0 stars 0 forks source link

APM Planner will crash when USB connection unplugged when active #779

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Start APM Planner
2. Connect APM Planner to 3DR Ground Radio over USB 
    - i.e. Start the MavLink Connection and wait for a full connect
3. Pull USB connection out
4. APM Planner crashes

What is the expected output? What do you see instead?
I would expect that the link is disconnected. Plugging in the radio and 
pressing connect restores the telemetry link

What version of the product are you using? On what operating system?
Windows7x64 APMPlanner 1.2.14 Mavlink 1.0

Please provide any additional information below.

Original issue reported on code.google.com by billbon...@gmail.com on 7 Oct 2012 at 2:57

GoogleCodeExporter commented 8 years ago
ive tested this, can cant get it to crash. what exactly are you doing?

Original comment by Meee...@gmail.com on 10 Oct 2012 at 12:13

GoogleCodeExporter commented 8 years ago
Hi,

I am psychically pulling the USB connection out of the computer when the 
connection has been established between the MAVLink and the ArduPilotMega. 
Instead of APM Planner, just saying disconnected, Windows says the App is not 
responding, and I need to kill the process and start the APM Planner again. 

Can you describe the steps how you have repeated the steps?

Thx

Original comment by billbon...@gmail.com on 10 Oct 2012 at 3:11

GoogleCodeExporter commented 8 years ago
demo link on youtube http://www.youtube.com/watch?v=E7ZPhUDQLfE

Original comment by billbon...@gmail.com on 10 Oct 2012 at 3:31

GoogleCodeExporter commented 8 years ago
I have tested this again recently, and I am not able to reproduce the crashing 
every time. I did manage to reproduce once. The only change I have made to my 
system is to use an FrSky tx/rx. This leads me to believe that something else 
is the problem. I can happily unplug the ground radio via usb and it 
reconnects. I'll keep an eye on this and see if i can determine a pattern to 
reproduce as before.

Original comment by billbon...@gmail.com on 17 Oct 2012 at 5:48

GoogleCodeExporter commented 8 years ago
This is an Operating System issue not an APM issue. Basically what happens is 
that the hardware communicates with the OS through its drivers installed on 
your machine so that the kernel knows what to do with it. There are safeguads 
in place to keep the kernel from going into an 'error state' or crashing when 
the hardware fails. There are instances when the hardware and your Software is 
'talking' to each other and a hardware failure, such as you detailed, occurs 
that the OS don't know how to handle because its resources was lost during an 
important phase of computation.

Original comment by jaimehon...@gmail.com on 5 Nov 2012 at 12:03

GoogleCodeExporter commented 8 years ago

Original comment by Meee...@gmail.com on 11 Nov 2012 at 1:22

GoogleCodeExporter commented 8 years ago
I think you can mark it as "not going to fix", but I don't think that an 
application crash is acceptable when the cable is unplugged.  I also understand 
that this type of issue can be hard on windows to fix.

So where is the failure. The device driver? if the kernel, as Jamie says, is 
marshalling the resource and something went bad. The OS will let the APM 
software know that, since as you say (and I know;-) ) the OS is in control. If 
on the other hand the OS said to the APM software the resource is unavailable 
and the app locks, and then the OS indicates to the user the app is 
unresponsive and then closes it. The issue is with the app, not the OS. The app 
isn't checking for an exception, just waiting for the expected to happen, 
frozen forever.

Again I know this can be hard to program against, but not impossible.

I'll keep an eye on this, and if i can find an easy way to reproduce i will let 
you know.

(The original report was on an old install of Win7 64. I was forced to 
re-install Win7 and that's when the issue went to an intermittent state)

Original comment by billbon...@gmail.com on 12 Nov 2012 at 2:45