PrusaSlicer trying to access my floppy disk (A:\)
 
Notifications
Clear all

PrusaSlicer trying to access my floppy disk (A:\)  

  RSS
mjgtp
(@mjgtp)
Active Member
PrusaSlicer trying to access my floppy disk (A:\)

Why is PrusaSlicer 2.2.0 trying to access my floppy drive (A:\) on startup?   It won't stop either until I shut down PrusaSlicer.  I would think it should only be trying to access the drive it was installed on.  Weird!

Best Answer by Vojtěch Bubník:

Implemented with https://github.com/prusa3d/PrusaSlicer/commit/58192ba6c224298bfa9804e016831e77051c1be7

After this commit, Win32 builds will no more poll for removable media, but system notifications will be used instead.

By the way, God knows why Windows send the same media insert / eject event 37x !

Thanks for the hint.

Napsal : 26/03/2020 1:06 pm
Neophyl
(@neophyl)
Illustrious Member
RE: PrusaSlicer trying to access my floppy disk (A:\)

I think its the new stuff where you have the ability to send the gcode to...., its constantly checking if drives and other resource locations are available now.  SO SD cards, USB sticks etc.  Looks like it lumps the floppy disk in there with them.  Not that Ive seen a computer with a floppy disc in awhile lol.

Napsal : 26/03/2020 2:12 pm
mjgtp
(@mjgtp)
Active Member
Topic starter answered:
RE: PrusaSlicer trying to access my floppy disk (A:\)

It's still weird...  Looks like it's just repeatedly accessing, creating, closing..... rinse and repeat (every 2 seconds).  It's still going on hours later...   I had to put an old disk in the drive just to shut up the noise of it failing to access when the disk isn't there.  Granted there's currently higher priorities at Prusa, i'm sure, but can anyone at Prusa chime in here?  

 

10:19:11.5208142 AM prusa-slicer.exe 13856 CloseFile A:\ SUCCESS
10:19:11.5209045 AM prusa-slicer.exe 13856 CreateFile A:\ SUCCESS Desired Access: Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, AllocationSize: n/a, OpenResult: Opened
10:19:11.5209898 AM prusa-slicer.exe 13856 CloseFile A:\ SUCCESS
10:19:11.5210820 AM prusa-slicer.exe 13856 CreateFile A:\ SUCCESS Desired Access: Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Open For Free Space Query, Attributes: n/a, ShareMode: None, AllocationSize: n/a, OpenResult: Opened
10:19:11.5211637 AM prusa-slicer.exe 13856 QuerySizeInformationVolume A:\ SUCCESS TotalAllocationUnits: 2,847, AvailableAllocationUnits: 2,847, SectorsPerAllocationUnit: 1, BytesPerSector: 512
10:19:11.5212045 AM prusa-slicer.exe 13856 CloseFile A:\ SUCCESS
10:19:13.5214789 AM prusa-slicer.exe 13856 CreateFile A:\ SUCCESS Desired Access: Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, AllocationSize: n/a, OpenResult: Opened
10:19:13.5216274 AM prusa-slicer.exe 13856 CloseFile A:\ SUCCESS
10:19:13.5217500 AM prusa-slicer.exe 13856 CreateFile A:\ SUCCESS Desired Access: Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: None, AllocationSize: n/a, OpenResult: Opened
10:19:13.5218660 AM prusa-slicer.exe 13856 QueryNameInformationFile A:\ SUCCESS Name: \
10:19:13.5219300 AM prusa-slicer.exe 13856 QueryInformationVolume A:\ SUCCESS VolumeCreationTime: 0, VolumeSerialNumber: 14A3-D7EC, SupportsObjects: False, VolumeLabel:
10:19:13.5219849 AM prusa-slicer.exe 13856 QueryAttributeInformationVolume A:\ SUCCESS FileSystemAttributes: Case Preserved, Unicode, MaximumComponentNameLength: 255, FileSystemName: FAT
10:19:13.5220417 AM prusa-slicer.exe 13856 CloseFile A:\ SUCCESS
10:19:13.5221627 AM prusa-slicer.exe 13856 CreateFile A:\ SUCCESS Desired Access: Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, AllocationSize: n/a, OpenResult: Opened
10:19:13.5222788 AM prusa-slicer.exe 13856 CloseFile A:\ SUCCESS
10:19:13.5223959 AM prusa-slicer.exe 13856 CreateFile A:\ SUCCESS Desired Access: Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Open For Free Space Query, Attributes: n/a, ShareMode: None, AllocationSize: n/a, OpenResult: Opened
10:19:13.5225108 AM prusa-slicer.exe 13856 QuerySizeInformationVolume A:\ SUCCESS TotalAllocationUnits: 2,847, AvailableAllocationUnits: 2,847, SectorsPerAllocationUnit: 1, BytesPerSector: 512
10:19:13.5225676 AM prusa-slicer.exe 13856 CloseFile A:\ SUCCESS
10:19:15.5225860 AM prusa-slicer.exe 13856 CreateFile A:\ SUCCESS Desired Access: Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, AllocationSize: n/a, OpenResult: Opened
10:19:15.5227252 AM prusa-slicer.exe 13856 CloseFile A:\ SUCCESS
10:19:15.5228141 AM prusa-slicer.exe 13856 CreateFile A:\ SUCCESS Desired Access: Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: None, AllocationSize: n/a, OpenResult: Opened
10:19:15.5229182 AM prusa-slicer.exe 13856 QueryNameInformationFile A:\ SUCCESS Name: \
10:19:15.5229637 AM prusa-slicer.exe 13856 QueryInformationVolume A:\ SUCCESS VolumeCreationTime: 0, VolumeSerialNumber: 14A3-D7EC, SupportsObjects: False, VolumeLabel:
10:19:15.5230020 AM prusa-slicer.exe 13856 QueryAttributeInformationVolume A:\ SUCCESS FileSystemAttributes: Case Preserved, Unicode, MaximumComponentNameLength: 255, FileSystemName: FAT
10:19:15.5230418 AM prusa-slicer.exe 13856 CloseFile A:\ SUCCESS
10:19:15.5231256 AM prusa-slicer.exe 13856 CreateFile A:\ SUCCESS Desired Access: Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, AllocationSize: n/a, OpenResult: Opened
10:19:15.5232283 AM prusa-slicer.exe 13856 CloseFile A:\ SUCCESS
10:19:15.5233089 AM prusa-slicer.exe 13856 CreateFile A:\ SUCCESS Desired Access: Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Open For Free Space Query, Attributes: n/a, ShareMode: None, AllocationSize: n/a, OpenResult: Opened
10:19:15.5234097 AM prusa-slicer.exe 13856 QuerySizeInformationVolume A:\ SUCCESS TotalAllocationUnits: 2,847, AvailableAllocationUnits: 2,847, SectorsPerAllocationUnit: 1, BytesPerSector: 512
10:19:15.5234502 AM prusa-slicer.exe 13856 CloseFile A:\ SUCCESS
10:19:17.5236548 AM prusa-slicer.exe 13856 CreateFile A:\ SUCCESS Desired Access: Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, AllocationSize: n/a, OpenResult: Opened
10:19:17.5237943 AM prusa-slicer.exe 13856 CloseFile A:\ SUCCESS
10:19:17.5239096 AM prusa-slicer.exe 13856 CreateFile A:\ SUCCESS Desired Access: Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: None, AllocationSize: n/a, OpenResult: Opened
10:19:17.5240224 AM prusa-slicer.exe 13856 QueryNameInformationFile A:\ SUCCESS Name: \
10:19:17.5240889 AM prusa-slicer.exe 13856 QueryInformationVolume A:\ SUCCESS VolumeCreationTime: 0, VolumeSerialNumber: 14A3-D7EC, SupportsObjects: False, VolumeLabel:
10:19:17.5241305 AM prusa-slicer.exe 13856 QueryAttributeInformationVolume A:\ SUCCESS FileSystemAttributes: Case Preserved, Unicode, MaximumComponentNameLength: 255, FileSystemName: FAT
10:19:17.5241724 AM prusa-slicer.exe 13856 CloseFile A:\ SUCCESS
10:19:17.5242657 AM prusa-slicer.exe 13856 CreateFile A:\ SUCCESS Desired Access: Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, AllocationSize: n/a, OpenResult: Opened
10:19:17.5243604 AM prusa-slicer.exe 13856 CloseFile A:\ SUCCESS
10:19:17.5244684 AM prusa-slicer.exe 13856 CreateFile A:\ SUCCESS Desired Access: Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Open For Free Space Query, Attributes: n/a, ShareMode: None, AllocationSize: n/a, OpenResult: Opened
10:19:17.5245783 AM prusa-slicer.exe 13856 QuerySizeInformationVolume A:\ SUCCESS TotalAllocationUnits: 2,847, AvailableAllocationUnits: 2,847, SectorsPerAllocationUnit: 1, BytesPerSector: 512
10:19:17.5246206 AM prusa-slicer.exe 13856 CloseFile A:\ SUCCESS

This post was modified před 5 years by mjgtp
Napsal : 26/03/2020 2:53 pm
Vojtěch Bubník
(@vojtech-bubnik)
Member Admin
RE: PrusaSlicer trying to access my floppy disk (A:\)

It is the new removable media detection.

Actually I heard one complaint passed to me by our support about an external USB floppy making noise. I even had such a unit bough for me and my unit does not do that. So I was considering this to be an extremely rare thus non issue.

There is likely a way to get such information from Windows passed to an application as a callback, but it took me a considerable time to just found its existence and it is extremely convoluted, therefore we are just polling removable media every 2 seconds. Cura does the same.

 

 

Napsal : 26/03/2020 4:24 pm
mjgtp
(@mjgtp)
Active Member
Topic starter answered:
RE: PrusaSlicer trying to access my floppy disk (A:\)

@bubnikv

Should be able to catch the exception though if the drive isn't available or there's no media in the drive and fail there.  Can you guys just try and access the drive triggered by user action?  Like once the user tries to "export to sd / flash drive"?  What are you trying to do interactively?  When a user puts in a disk to pop up a dialog to load?

 

This constant loading on the floppy is REALLY annoying with no disk in the drive.  It's that growling whirring noise... constant.

Napsal : 26/03/2020 4:48 pm
Vojtěch Bubník
(@vojtech-bubnik)
Member Admin
RE: PrusaSlicer trying to access my floppy disk (A:\)

@mjgtp

As noted above, there are technical reasons why we are doing it. Maybe we will just skip A:, B:, though people are creative and someone will certainly map a flash drive or SD card to A: and B: and it will be shame then that PrusaSlicer will not detect them.

 

Napsal : 26/03/2020 5:41 pm
Vojtěch Bubník
(@vojtech-bubnik)
Member Admin
RE: PrusaSlicer trying to access my floppy disk (A:\)

@mjgtp By the way did you contact support with this floppy noise issue? Or are you a 2nd customer with that trouble? Is it an internal or external drive?
Why do you have that drive for, if you may satisfy my curiosity?

Napsal : 26/03/2020 5:43 pm
Vojtěch Bubník
(@vojtech-bubnik)
Member Admin
RE: PrusaSlicer trying to access my floppy disk (A:\)

I checked Cura source code. They are skipping A: and B:. We will do the same in the next release. We found a critical error in MMU2 prints with wipe towers, so the PrusaSlicer 2.2.1 will likely be released quite soon.

 

Napsal : 26/03/2020 5:59 pm
Ty se líbí
mjgtp
(@mjgtp)
Active Member
Topic starter answered:
RE: PrusaSlicer trying to access my floppy disk (A:\)

@bubnikv

I did send an email earlier today via the contact-us on the prusa website -- figured i'd put a post here in the forum though in case it was just me having the issue or if it was an already-solved issue.  

My desktop is older, but I've keep the guts updated and plug up the a:\ out of habit, I guess.  I haven't used it in ages though.  Just found it very strange since I've never seen an app hit it repeatedly like that. 

I've been a .net /c# developer for 20 yrs and strange things like this get me thinking.  I know you guys have proprietary code in there and the last thing I want to do is meddle.    Having said that,  I don't think you need to ignore those drives, just check them only when the user requests them.  When the user hits that "send to" button you're already showing the save-as dialog - you just need to list the drives available, which Microsoft already does for you, and let the user choose where to save it.  Just seems there's a LOT of polling, and if it's just to be able to default to a specific drive -- I really don't think it's worth the effort (or the tax on the hardware).  If there's a reason you have to, then I guess it is what it is.  

My only concern then is the log above looks like it's trying to create a file as a test -- wonder if that has any impact on the longevity of the sd card? -- might not be too good for the card to continually peg it like that (in my case, the green read/write light on my drive has been on solid for hours).

 

 

Napsal : 26/03/2020 6:47 pm
Vojtěch Bubník
(@vojtech-bubnik)
Member Admin
RE: PrusaSlicer trying to access my floppy disk (A:\)

@mjgtp

If you are a Windows developer, then you will certainly appreciate this. It is likely the only way to get notifications on media plug / unplug.

// Windows do not send an update on insert / eject of an SD card into an external SD card reader.
// Windows also do not send an update on software eject of a FLASH drive.
// We can likely use the Windows WMI API, but it will be quite time consuming to implement.
// https://www.codeproject.com/Articles/10539/Making-WMI-Queries-In-C
// https://docs.microsoft.com/en-us/windows/win32/wmisdk/wmi-start-page
// https://docs.microsoft.com/en-us/windows/win32/wmisdk/com-api-for-wmi
// https://docs.microsoft.com/en-us/windows/win32/wmisdk/example--receiving-event-notifications-through-wmi-

 

> I did send an email earlier today via the contact-us on the prusa website -- figured i'd put a post here in the forum though in case it was just me having the issue or if it was an already-solved issue.  

You are a 2nd customer then.

>  I know you guys have proprietary code in there and the last thing I want to do is meddle. 

The source code is open on github.

> My only concern then is the log above looks like it's trying to create a file as a test -- wonder if that has any impact on the longevity of the sd card?

You may review the following function. I don't think anything is written to the SD card.

https://github.com/prusa3d/PrusaSlicer/blob/3fdd643f4990686cde528024376e46df7042f680/src/slic3r/GUI/RemovableDriveManager.cpp#L34

 

 

 

Napsal : 26/03/2020 7:00 pm
mjgtp
(@mjgtp)
Active Member
Topic starter answered:
RE: PrusaSlicer trying to access my floppy disk (A:\)

@bubnikv

The code for getting the list of drives (search_for_removable_drives) seems pretty straight forward and should be problem free -- the issue comes up if this method is called repeatedly.  On line 442 inside the RemovableDriveManager::thread_proc() method -- why the loop?  Correct me if i'm wrong, but is all this in a infinite loop so code elsewhere can subscribe to the "RemovableDriveManager" object if a drive changes? 

Still curious as to the need to know immediately when the user mounts or unmounts an sdcard? -- instead of letting them decide at time of save (code asks on-demand, instead of being notified)?  If it's to pop up a dialog to load something, I don't know if you're really saving any time versus the user just hitting a button to load a file, and get the dialog then?  Pretty sure it's not this scenario:  If I have a model loaded in the slicer and the user saves a new version outside the app, the app could reload the new model automatically (or prompt), but that wouldn't need to know if a drive or card was mounted.  Guess I need to read up on the new feature list.

 

C++ eh.  Well, following the rabbit hole, I'm not sure if you need to know about new drives, or media inserted into existing drives.  Code appears to be just looking for new drives.  Detecting new drives seems much easier.  Would this help?  https://stackoverflow.com/questions/16214768/detecting-usb-insertion-removal-in-c-non-gui-application .  Seems like there's more code samples and articles for C# out there than C/C++, but still seeing lots of references to SHChangeNotifyRegister - this was another that might be promising: https://stackoverflow.com/questions/25041349/detecting-if-a-sd-card-reader-has-a-card-inserted .  I can definitely understand the complexity though if you're going through WMI.  Low level stuff there.

 

Other than that though, I really to love the software and the updates you've made.  I haven't had my Mk3s for long, but i'm LOVING it!

Napsal : 26/03/2020 8:17 pm
Vojtěch Bubník
(@vojtech-bubnik)
Member Admin
RE: PrusaSlicer trying to access my floppy disk (A:\)

> On line 442 inside the RemovableDriveManager::thread_proc() method -- why the loop?  Correct me if i'm wrong, but is all this in a infinite loop so code elsewhere can subscribe to the "RemovableDriveManager" object if a drive changes? 

It is there mainly to detect plug unplug of a removable device to show / hide the export to SD card icon. Other actions could be handled by synchronous queries on demand.

> Detecting new drives seems much easier.  Would this help? https://stackoverflow.com/questions/16214768/detecting-usb-insertion-removal-in-c-non-gui-application  

This does not work for insert / eject of a media. Actually this notification is already there in PrusaSlicer 2.2.0 and I hoped initially to replace polling with it.

> https://stackoverflow.com/questions/25041349/detecting-if-a-sd-card-reader-has-a-card-inserted  

This is a synchronous call, not registration to a callback.

> Seems like there's more code samples and articles for C# out there than C/C++, but still seeing lots of references to SHChangeNotifyRegister - this was another that might be promising:

Thanks, SHChangeNotifyRegister was not known to me, it is worth looking into. Though I wonder whether it is worth the effort, as Cura uses the same polling method for years.

> I really to love the software and the updates you've made.  I haven't had my Mk3s for long, but i'm LOVING it!

Thanks.

 

Napsal : 27/03/2020 3:47 am
Vojtěch Bubník
(@vojtech-bubnik)
Member Admin
RE: PrusaSlicer trying to access my floppy disk (A:\)

SHChangeNotifyRegister is really promissing

https://www.codeproject.com/Articles/3226/Using-the-Shell-to-Receive-Notification-of-Removab

 

Napsal : 27/03/2020 3:57 am
Vojtěch Bubník
(@vojtech-bubnik)
Member Admin
RE: PrusaSlicer trying to access my floppy disk (A:\)

Implemented with https://github.com/prusa3d/PrusaSlicer/commit/58192ba6c224298bfa9804e016831e77051c1be7

After this commit, Win32 builds will no more poll for removable media, but system notifications will be used instead.

By the way, God knows why Windows send the same media insert / eject event 37x !

Thanks for the hint.

Napsal : 27/03/2020 7:11 am
mjgtp se líbí
DJ
 DJ
(@dj-6)
Trusted Member
RE: PrusaSlicer trying to access my floppy disk (A:\)

@bubnikv

Wow...three hours between first sight and commit of implementation!  Keep up the great work!

DJ

Napsal : 27/03/2020 12:22 pm
bobstro a mjgtp se líbí
mjgtp
(@mjgtp)
Active Member
Topic starter answered:
RE: PrusaSlicer trying to access my floppy disk (A:\)

This is precisely why I purchased a MK3s.  The Prusa peeps are the best!  Thanks bubnikv!

Napsal : 27/03/2020 12:32 pm
Vojtěch Bubník
(@vojtech-bubnik)
Member Admin
RE: PrusaSlicer trying to access my floppy disk (A:\)

: Wow...three hours between first sight and commit of implementation!  Keep up the great work!

It was something I spent too much time already before, so I knew myself around quite well already and I really wanted to get it out of my plate for good.

 

Napsal : 27/03/2020 12:36 pm
bobstro se líbí
dos
 dos
(@dos)
New Member
RE: PrusaSlicer trying to access my floppy disk (A:\)

This is still happening as of 8/2020, super annoying.

Napsal : 16/08/2020 3:13 am
dos
 dos
(@dos)
New Member
RE: PrusaSlicer trying to access my floppy disk (A:\)
Posted by: @dos

This is still happening as of 8/2020, super annoying.

To add to this (forum doesn't seem to allow editing), I found that putting a disk in quiets it down so that's a good fix until it is actually fixed in the software.

Napsal : 17/08/2020 9:23 am
Share: