Removable Devices - Bug/Limitation

A forum for general AmigaOS 4.x support questions that are not platform-specific
Post Reply
User avatar
djrikki
Posts: 138
Joined: Fri Jun 17, 2011 10:21 pm
Location: Grimsby, Lincolnshire, UK
Contact:

Removable Devices - Bug/Limitation

Post by djrikki »

Hello,

Okay heres the scenerio atm under update 3.

I insert a USB stick called "Flash Drive"and double-click it to open the window and do some stuff. I then take out the stick and insert it into my Mac Mini to do some stuff. Once finished I re-insert the USB stick back into my Amiga. Now I have two instances of "Flash Drive" and the system is messed up asking me to insert "Flash Drive" when I double-click it. So the cure is, I firstly close the original "Flash Drive" window because you see I didn't close it in the first place - I then remove the USB stick - pause a moment before re-inserting it and now I can access the device correctly.

The Fix:

My suggestion is that when the user removes a USB Stick (or any other removable device from that matter) IF there is a workbench window associated with the device it is automatically closed.

Thanks.
User avatar
Slayer
Beta Tester
Beta Tester
Posts: 851
Joined: Tue Dec 21, 2010 4:19 am
Location: New Zealand

Re: Removable Devices - Bug/Limitation

Post by Slayer »

It must be something to do with what the Mac is doing? and also brand of USB?

I use USB sticks (and memory cards for that matter via a 7 in 1 though) quite often between FLEX, X1000 and Win7 Work laptop and never experienced anything of this nature you describe (two instances & messed up system)

to be prefectly honest this fix is a lazy man fix eg close the devices windows BEFORE removing the USB stick :P
~Yes I am a Kiwi, No, I did not appear as an extra in 'Lord of the Rings'~
1x AmigaOne X5000 2.0GHz 2gM RadeonR9280X AOS4.x
3x AmigaOne X1000 1.8GHz 2gM RadeonHD7970 AOS4.x
xenic
Posts: 1165
Joined: Sun Jun 19, 2011 12:06 am

Re: Removable Devices - Bug/Limitation

Post by xenic »

@djrikki
I don't have a classic Amiga anymore but I think that the WorkBench window behavior was necessary in the days of single Floppy disk Amigas (A1000 A500) with no hard disk. Here is how I think copying worked back then:
1. Insert Floppy-1 in the drive and open the window for that disk (volume).
2. Remove Floppy-1 and insert Floppy-2.
3. Open the window for Floppy-2 and drag a file to the Floppy-1 window.
4. WorkBench opens a requester asking you to insert Floppy-1.
5. You swap Floppy-1 and Floppy-2 into the drive until the copy is complete.

Unfortunately, when I tried the above procedure (copying a 12k text file) with 2 USB memory sticks it doesn't work like it did with floppy disks. After swapping the USB sticks several times the system gets lost and doesn't recognize the USB memory sticks correctly anymore and the copy fails. I'd like to know how large the USB file buffers are because the copy should have only taken 1 or 2 swaps.

Since most people don't use Floppys anymore and copying by swapping volumes in a single USB port doesn't appear to work, I'd have to agree that it might be better for WorkBench to close volume windows when a volume is removed from a drive or USB port.
AmigaOne X1000 with 2GB memory - OS4.1 FE
xenic
Posts: 1165
Joined: Sun Jun 19, 2011 12:06 am

Re: Removable Devices - Bug/Limitation

Post by xenic »

Slayer wrote: to be prefectly honest this fix is a lazy man fix eg close the devices windows BEFORE removing the USB stick :P
I don't think it's a lazy man issue. I see by your signature that you have an A4000D. Boot it with OS3.x and see if copying a file from one floppy to another in a single floppy drive still works. The only way to accomplish that is to open the window for the destination floppy before removing it to insert the source floppy. I believe that when I had a zip drive on my (now dead) A4000, I could copy files from one zip volume to another by swapping zips. The only way to start the copy was to leave the destination zip window open before removing it so I could drag files from the source window into the destination window. It was a slow process but it worked. Swapping seems to confuse the volumes with USB so maybe USB volume windows should be closed when a volume is removed. Either that or the the system should be fixed so that copying by swapping USB volumes works.
AmigaOne X1000 with 2GB memory - OS4.1 FE
User avatar
Slayer
Beta Tester
Beta Tester
Posts: 851
Joined: Tue Dec 21, 2010 4:19 am
Location: New Zealand

Re: Removable Devices - Bug/Limitation

Post by Slayer »

While I appreciate your insight there xenic I think you're describing a completely different set of rules and a methodology to accomplish something that could be easily rectified by using RAM DISK: as a buffer or Diskcopy for an entire floppy disk

What I got from the original post that prompted my "lazy man" comment was if a user forgets to close a window on the workbench screen could the OS sense it is related to the removed device and automatically close it instead.

Hey call it a WIP if you like or a feature coming to AmigaOS soon, but we already live in such a PC world where nothing is your fault anymore and everything SHOULD be taken care of for you, I don't mind closing my windows myself for as long as I possibly can ;)
~Yes I am a Kiwi, No, I did not appear as an extra in 'Lord of the Rings'~
1x AmigaOne X5000 2.0GHz 2gM RadeonR9280X AOS4.x
3x AmigaOne X1000 1.8GHz 2gM RadeonHD7970 AOS4.x
xenic
Posts: 1165
Joined: Sun Jun 19, 2011 12:06 am

Re: Removable Devices - Bug/Limitation

Post by xenic »

Slayer wrote:While I appreciate your insight there xenic I think you're describing a completely different set of rules and a methodology to accomplish something that could be easily rectified by using RAM DISK: as a buffer or Diskcopy for an entire floppy disk
Of course I wouldn't use disk-swapping with a modern Amiga. I was just trying to provide some historical perspective for the fact that windows are left open when a disk is removed. I might also add that RAM: was a lot less useful on my A1000 with 256k memory than current systems with much more memory available for RAM:.
What I got from the original post that prompted my "lazy man" comment was if a user forgets to close a window on the workbench screen could the OS sense it is related to the removed device and automatically close it instead.
My point was that if there is no longer a purpose (like disk-swap copying) for leaving the window open when a disk is removed (USB or Floppy) then the window should probably be closed automatically. I couldn't get disk-swap copying to work with USB memory sticks but it would be interesting to know if it still works with OS4 hardware (AmigaOne with floppy drive) or Classic Amigas with OS4 installed.
Hey call it a WIP if you like or a feature coming to AmigaOS soon, but we already live in such a PC world where nothing is your fault anymore and everything SHOULD be taken care of for you, I don't mind closing my windows myself for as long as I possibly can ;)
Neither do I if there is a reason for leaving the window open when a disk is removed.

With regard to djrikki's original suggestion that the WorkBench window for a USB stick should be closed when the USB stick is removed; I would have to agree that if there is no good reason to leave the window open (disk-swap copying doesn't work) then the window should be closed. However, that could get a little complicated if a number drawer windows are open for that disk. The system shouldn't close the disk window and leave the drawer windows open. That would be really confusing.

Edit: After thinking about this for a while, I think that leaving windows open for a removed disk should be a Prefs option so that users who have some reason for leaving the windows open could do so.
Last edited by xenic on Mon Dec 05, 2011 4:49 pm, edited 1 time in total.
AmigaOne X1000 with 2GB memory - OS4.1 FE
User avatar
samo79
Posts: 555
Joined: Fri Jun 17, 2011 11:13 pm
Location: Italy

Re: Removable Devices - Bug/Limitation

Post by samo79 »

xenic
Posts: 1165
Joined: Sun Jun 19, 2011 12:06 am

Re: Removable Devices - Bug/Limitation

Post by xenic »

samo79 wrote:Maybe it's the same problem ?
http://forum.hyperion-entertainment.biz ... f=14&t=116
Similar but I think that topic is focused on volume icons being removed when a volume is removed. That's an issue related to system locks on volumes that are removed. Locks should be removed when a file is no longer needed but some programs (even system programs) keep the locks longer than they need to.

I think the issue here is whether WokBench should leave windows open when a volume is removed. I think it should be a Prefs choice because there may be reasons why a user would want the windows to remain open.
AmigaOne X1000 with 2GB memory - OS4.1 FE
User avatar
ChrisH
Beta Tester
Beta Tester
Posts: 920
Joined: Mon Dec 20, 2010 9:09 pm
Contact:

Re: Removable Devices - Bug/Limitation

Post by ChrisH »

djrikki wrote:So the cure is, I firstly close the original "Flash Drive" window because you see I didn't close it in the first place - I then remove the USB stick - pause a moment before re-inserting it and now I can access the device correctly.
Yeah, this is "normal", unfortunately. It happens because Workbench keeps a lock on the folder that is open, which means the USB device is "in use" when you remove it. Windows/Mac/etc do not have this problem (so much), because you are SUPPOSED to "Safely Remove/Eject/Unmount" a removable device (and it will warn you if something is still in use), before you actually remove it. Where-as AmigaOS4 has no way to "Safely Remove/Eject/Unmount" anything, and so you don't know if it is really safe to remove it or not.

But it would be nice if OS4 could handle this "unsafe removal" a bit more gracefully.
User avatar
djrikki
Posts: 138
Joined: Fri Jun 17, 2011 10:21 pm
Location: Grimsby, Lincolnshire, UK
Contact:

Re: Removable Devices - Bug/Limitation

Post by djrikki »

Yeah I've seen that on MacOS - well it doesn't warn you at all before you remove it - it just tells you afterwards 'Boy you shouldn't have just done that!'.

As far as I see it - as long as the USB stops flashing its neon light at you - its safe to remove and the OS should unmount the device for you. I was hoping Apple would remove that notice - its pretty lame - but I guess its there to cover themselves.
Post Reply