Cannot safely remove memory card, ever...

  • Thread starter Thread starter Carlos Rodrigues
  • Start date Start date
C

Carlos Rodrigues

Hi!

My laptop has a memory card reader, which I use to read my camera's xD
cards. Up until recently it worked just fine, but now it won't let me do
a safe removal.

The error is:

"The device 'XD2 Device' cannot be stopped because a program is still
accessing it."

Rebooting doesn't work, activating "optimize for quick removal" in the
device properties page (which I know let's me skip the safe removal
altogether) doesn't work, reinstalling the drivers doesn't work (both
the current ones, and older versions). Plus, Process Explorer (from
sysinternals.com) doesn't see any open files on the device.

BTW, a regular thumb drive can be safely removed just fine, it's just
the card reader that shows this behavior.

This is annoying me, does anyone have a clue about what's happening here?

Thanks,
Carlos Rodrigues
 
Carlos said:
My laptop has a memory card reader, which I use to read my camera's xD
cards. Up until recently it worked just fine, but now it won't let me do
a safe removal.

The error is:

"The device 'XD2 Device' cannot be stopped because a program is still
accessing it."

Try to discover who has an open handle to the drive:

Get Sysinternals ProcessExplorer
http://www.sysinternals.com/Utilities/ProcessExplorer.html

Start the ProcessExplorer. Go to 'Find'->'Find Handle' and enter
the root path (like U:\) of your drive. Click 'Search'.
Then it lists all processes that hold open handles to your drive.


But save removal removes the whole card reader so you have to
reboot to use it again. 'Ejecting' the card is the right choice
here. It's in the drives context menu in the Windows Explorer.
But this requires admin previleges, ask Microsoft why.



Greetings from Germany

Uwe
 
Uwe said:
Try to discover who has an open handle to the drive:

Get Sysinternals ProcessExplorer
http://www.sysinternals.com/Utilities/ProcessExplorer.html

Start the ProcessExplorer. Go to 'Find'->'Find Handle' and enter
the root path (like U:\) of your drive. Click 'Search'.
Then it lists all processes that hold open handles to your drive.

Like I said, Process Explorer shows no open handles on the device.
But save removal removes the whole card reader so you have to
reboot to use it again. 'Ejecting' the card is the right choice
here. It's in the drives context menu in the Windows Explorer.
But this requires admin previleges, ask Microsoft why.

There is no "Eject" on the drive's context menu.

Safe removal doesn't remove the whole card reader, at least not with
this type of reader (this isn't an USB reader, it's a PCI one - Texas
Instruments TIxx21 FlashMedia Controller).

I've been working with this reader and exactly the same memory cards for
almost a year without any problems, using "safe removal".

My main problem is Windows not telling me why it can't remove the
device, just spitting out that generic error which offers zero
information to try and fix the problem.
 
I have the TIxx21 in my HP laptop. With your card in the reader, go to Control
Panel > System > Device Manager > Disk Drives, and check the Policies
setting in your flash card Properties. On my system, "Optimize for performance"
was set by default, so I changed it to "Optimize for quick removal." Then one
can pull the card anytime after reading or writing is finished.

ID
 
Carlos said:
Like I said, Process Explorer shows no open handles on the device.

Oops, I should read more carefully...
There is no "Eject" on the drive's context menu.

That's strange because what could be more removable
than a card in a cardreader...
Safe removal doesn't remove the whole card reader, at least not with
this type of reader (this isn't an USB reader, it's a PCI one - Texas
Instruments TIxx21 FlashMedia Controller).

Aha, never seen such a device live. On multislot cardreaders an
open handle to another slot can prevent the removal of the whole
device but this doesn't seem to be applicable here.
I've been working with this reader and exactly the same memory cards for
almost a year without any problems, using "safe removal".

Have you instlalle any virus or adware blockers since then?
Or photo tools that wait for a new card in the reader?

If it's not a handle to the logical drive than it maybe a
handle to the volume like
\\?\Volume{88674220-d605-11da-af91-000102b35cc3} (get the
name with MOUNTVOL on the commandline) or a handle to
the disk like \Device\HarddiskX\DRy (X and y are numbers).


Uwe
 
Uwe said:
Have you instlalle any virus or adware blockers since then?
Or photo tools that wait for a new card in the reader?

No, not that I can remember...
If it's not a handle to the logical drive than it maybe a
handle to the volume like
\\?\Volume{88674220-d605-11da-af91-000102b35cc3} (get the
name with MOUNTVOL on the commandline) or a handle to
the disk like \Device\HarddiskX\DRy (X and y are numbers).

Ok, I did this. There is a "\\?\Volume..." handle open by the "System"
process, and another "\Device\Harddisk1" open by "svchost.exe". I closed
both (handles), but safe removal still doesn't work.

Carlos Rodrigues
 
Carlos said:
No, not that I can remember...


Ok, I did this. There is a "\\?\Volume..." handle open by the "System"
process, and another "\Device\Harddisk1" open by "svchost.exe". I closed
both (handles), but safe removal still doesn't work.

No more ideas :-(
My commandline tool EjectMedia eject the media only, not the
whole device. But if someone still accesses the drive it will
fail to. If you would like to try:
http://www.uwe-sieber.de/files/ejectmedia.zip


Uwe
 
Back
Top