Bug report - missing serial port

Here you can provide suggestions on how to improve the product, website, etc.
Post Reply
486
Posts: 3
Joined: 6. May 2016, 19:27

Bug report - missing serial port

Post by 486 »

Hi. I did not found where to post bug reports.

The problem which I found:
- VirtualBox with COM1 and COM2 redirected to real ports (COM2 was usb2com);
- Saved state
- COM2 is disconnected;
- After VirtualBox start it was closed with error message. Solved the problem when removed saved state and disabled COM2 from settings.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Bug report - missing serial port

Post by mpack »

You should tell us the exact error message, e.g. with a screenshot.

Do I gather that "COM2 is disconnected" means that the USB device was unplugged while the VM was in a saved state?

What was the guest OS? Host OS? VirtualBox version?

If this was a Windows host then it's normal Windows behaviour: the serial port "session" that the app was using no longer exists, so you get an error. Plugging the USB device back in creates a new session, it does not restore the old one. If this is likely to be a recurring problem for you then I think you should stop using saved states.
486
Posts: 3
Joined: 6. May 2016, 19:27

Re: Bug report - missing serial port

Post by 486 »

Yes, COM2 (usb2com) was disconnected when VirtualBox was in saved state. Guest OS is XP, host OS Win7-x64.

The problem is that I had to manually remove saved session (I guest to do this). Some unexperienced user may think that needs guest OS re-install.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Bug report - missing serial port

Post by mpack »

I can speak from personal (bitter) experience that if a program on a Windows host is using a serial port, and unknown to you it's actually a usb serial adapter, and the user unplugs the USB device... then the comms channel is dead and can't be recovered by plugging the USB device back in. You have to somehow detect the dead condition, close the handle and open a new one. Note that if you don't do this then the old handle has not been closed, so it's still valid - but attempting to use it in some functions will cause a hang or an abort. IME most apps that use serial ports don't check for this condition, as they are often legacy and not written with USB in mind.

I suggest that you pass the USB device itself to the guest, don't use a virtual serial port. Then your app can do its own checks.
486
Posts: 3
Joined: 6. May 2016, 19:27

Re: Bug report - missing serial port

Post by 486 »

I agree. However this situation could be handled in some way, e.g. with dialog box like: "Serial port is missing. Discard saved state and reboot? Y/N"
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Bug report - missing serial port

Post by mpack »

Well, you still haven't told us what actual error message you get, so its hard to comment on how it could be improved.
Post Reply