File Manager always pops up "no disk drives error" and closes itself upon first run on WIndows 10. #69935

Closed
opened 2019-09-16 10:31:01 +02:00 by Chingiz Jumagulov · 20 comments

System Information
Operating system: Windows 10
Graphics card: Nvidia GTX 1080, Nvidia GTX 1070

Blender Version
Broken: blender-2.81-b043bef000e9-windows64
Worked: (optional)

Short description of error

Blender's File Browser always returns the error that "there are no disks in the drive" first time you run File Browser when you click Open file or by evoking it any other way. After that error File Browser will always close it's window and you will have to open it again. It will give out this error even when your folders and inactive USB drives and other volumes connected to your motherboard are hidden. I have experienced the same bug with some other software, namely LMMS, and it was acknowledged by their devs that the error persists because of compatibility issues with Windows 10 and that they didn't code it correctly.

It's not a workflow breaking bug, it doesn't cause crashes, but it closes File Browser window 100% of the times you open it on Windows 10 platform for the first time and can be a tad bit annoying. Most probably it is happening because File browser tries to access absolutely all drives even those that do not have any devices connected to them.

Exact steps for others to reproduce the error

1.(Make sure you connected all USB drives on your motherboard and there are USB spare ports that are not occupied by any devices)
2. Run latest builds of Blender on Windows 10.
3. Click Open File.
4. See the error message

Here's a video where I replicate the bug:
2019-09-16_14-13-21.flv

**System Information** Operating system: Windows 10 Graphics card: Nvidia GTX 1080, Nvidia GTX 1070 **Blender Version** Broken: blender-2.81-b043bef000e9-windows64 Worked: (optional) **Short description of error** Blender's File Browser always returns the error that "there are no disks in the drive" first time you run File Browser when you click Open file or by evoking it any other way. After that error File Browser will always close it's window and you will have to open it again. It will give out this error even when your folders and inactive USB drives and other volumes connected to your motherboard are hidden. I have experienced the same bug with some other software, namely LMMS, and it was acknowledged by their devs that the error persists because of compatibility issues with Windows 10 and that they didn't code it correctly. It's not a workflow breaking bug, it doesn't cause crashes, but it closes File Browser window 100% of the times you open it on Windows 10 platform for the first time and can be a tad bit annoying. Most probably it is happening because File browser tries to access absolutely all drives even those that do not have any devices connected to them. **Exact steps for others to reproduce the error** 1.(Make sure you connected all USB drives on your motherboard and there are USB spare ports that are not occupied by any devices) 2. Run latest builds of Blender on Windows 10. 3. Click Open File. 4. See the error message Here's a video where I replicate the bug: [2019-09-16_14-13-21.flv](https://archive.blender.org/developer/F7750483/2019-09-16_14-13-21.flv)

Added subscriber: @MeshVoid

Added subscriber: @MeshVoid

Added subscribers: @JulianEisel, @Harley, @brecht

Added subscribers: @JulianEisel, @Harley, @brecht

Is this a new issue in 2.81, or did it also happen in 2.80?

@Harley @JulianEisel I guess either of your changes caused this, can you check?

Is this a new issue in 2.81, or did it also happen in 2.80? @Harley @JulianEisel I guess either of your changes caused this, can you check?

There was this error prompt in 2.8 only if you expand the Volumes tab in File Manager and start clicking on disk drives. In 2.8 Volumes tab is closed by default so you won't get the error message just by pressing on Open in the File menu, also this error prompt in 2.8 won't close the File Manager Window completely, because, I guess it was not opened as a separate window.

image.png

There was this error prompt in 2.8 only if you expand the Volumes tab in File Manager and start clicking on disk drives. In 2.8 Volumes tab is closed by default so you won't get the error message just by pressing on Open in the File menu, also this error prompt in 2.8 won't close the File Manager Window completely, because, I guess it was not opened as a separate window. ![image.png](https://archive.blender.org/developer/F7753190/image.png)
Member

Added subscribers: @Sergey, @LazyDodo

Added subscribers: @Sergey, @LazyDodo
Member

Pretty sure i know what's up, but i'm unsure how to go about debugging/fixing it.

I used to have a SD card reader with 4 slots for various media types, the thing would enumerate 4 drives to the OS regardless if there was a card inserted or not, when you clicked it in explorer you got a similar popup about no media being inserted (can't read the Russian popup but i assume it says something similar? @Sergey can you help here?)

now that thing was some garbage SD card reader i picked up for $3 online somewhere, so yeah... it's been long long dead so i can't repro anymore....

Pretty sure i know what's up, but i'm unsure how to go about debugging/fixing it. I used to have a SD card reader with 4 slots for various media types, the thing would enumerate 4 drives to the OS regardless if there was a card inserted or not, when you clicked it in explorer you got a similar popup about no media being inserted (can't read the Russian popup but i assume it says something similar? @Sergey can you help here?) now that thing was some garbage SD card reader i picked up for $3 online somewhere, so yeah... it's been long long dead so i can't repro anymore....
Member

So just for the records, seems this isn't a new issue introduced with our changes, but we exposed it by opening the {nav Volumes} panel by default.
Then things actually make sense ;)

So just for the records, seems this isn't a new issue introduced with our changes, but we exposed it by opening the {nav Volumes} panel by default. Then things actually make sense ;)

Added subscriber: @StephenSwaney

Added subscriber: @StephenSwaney

Popup basically says there is "No disk in device. Insert disk in drive F"

Popup basically says there is "No disk in device. Insert disk in drive F"

We have a solution for this problem elsewhere:
https://developer.blender.org/diffusion/B/browse/master/source/blender/blenlib/intern/storage.c$233

We could consider setting SEM_FAILCRITICALERRORS globally, but someone needs to check the implications.
https://docs.microsoft.com/en-us/windows/win32/api/errhandlingapi/nf-errhandlingapi-seterrormode

Best practice is that all applications call the process-wide SetErrorMode function with a parameter of SEM_FAILCRITICALERRORS at startup. This is to prevent error mode dialogs from hanging the application.

We have a solution for this problem elsewhere: https://developer.blender.org/diffusion/B/browse/master/source/blender/blenlib/intern/storage.c$233 We could consider setting `SEM_FAILCRITICALERRORS` globally, but someone needs to check the implications. https://docs.microsoft.com/en-us/windows/win32/api/errhandlingapi/nf-errhandlingapi-seterrormode > Best practice is that all applications call the process-wide SetErrorMode function with a parameter of SEM_FAILCRITICALERRORS at startup. This is to prevent error mode dialogs from hanging the application.

Added subscriber: @senteria

Added subscriber: @senteria

Hi, any news, because I have still this annoying problem. Maybe to optional disable some disc in Blender?

Hi, any news, because I have still this annoying problem. Maybe to optional disable some disc in Blender?
Member

As we absolutely certain that this error is not actually caused by an item in "Favorites" that is on "G:" drive? Because AFAIK we are testing the validity of items in the Favorites list, but the Volumes list should not care.

That would certainly explain why the error only happens on first launch of the File Browser since those items are validated and removed from the list if not. If the error was with the Volumes list then I would expect it to happen every time the File Browser was opened.

As we *absolutely certain* that this error is not actually caused by an item in "**Favorites**" that is on "G:" drive? Because AFAIK we are testing the validity of items in the Favorites list, but the Volumes list should not care. That would certainly explain why the error only happens on first launch of the File Browser since those items are validated and removed from the list if not. If the error was with the Volumes list then I would expect it to happen every time the File Browser was opened.
Member

When you run the following code on the python console and re-open the file dialog does the problem still occur?

import ctypes
ctypes.windll.kernel32.SetErrorMode(1)
When you run the following code on the python console and re-open the file dialog does the problem still occur? ``` import ctypes ctypes.windll.kernel32.SetErrorMode(1) ```

Hi! @Harley I don't have anything in favorites from drive G, When I delete favorites and do a factory reset I get the same error message first time I open file manager. @LazyDodo when I run this code: import ctypes ctypes.windll.kernel32.SetErrorMode(1) in Python console the error disappears.

Hi! @Harley I don't have anything in favorites from drive G, When I delete favorites and do a factory reset I get the same error message first time I open file manager. @LazyDodo when I run this code: import ctypes ctypes.windll.kernel32.SetErrorMode(1) in Python console the error disappears.
Member

Interesting that the API doc For SetErrorMode say that “Best practice is that all applications call the process-wide SetErrorMode function with a parameter of SEM_FAILCRITICALERRORS (1) at startup. This is to prevent error mode dialogs from hanging the application.”

So we could call this with SEM_FAILCRITICALERRORS before and restore previous after. Or just call it once with SEM_FAILCRITICALERRORS on startup.

https://docs.microsoft.com/en-us/windows/win32/api/errhandlingapi/nf-errhandlingapi-seterrormode

We do call SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX) in BLI_exists() and restore previous afterward.

Interesting that the API doc For SetErrorMode say that “Best practice is that all applications call the process-wide SetErrorMode function with a parameter of SEM_FAILCRITICALERRORS (1) at startup. This is to prevent error mode dialogs from hanging the application.” So we could call this with SEM_FAILCRITICALERRORS before and restore previous after. Or just call it once with SEM_FAILCRITICALERRORS on startup. https://docs.microsoft.com/en-us/windows/win32/api/errhandlingapi/nf-errhandlingapi-seterrormode We do call SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX) in BLI_exists() and restore previous afterward.
Member

why not just do it once in GHOST_SystemWin32::init() ?

why not just do it once in `GHOST_SystemWin32::init()` ?

Yes, that's what we should do.

Someone just has to figure out which possible additional flags to set besides SEM_FAILCRITICALERRORS.

Also not sure what the impact will be when Blender crashes, maybe some dialog box will no longer show? Probably that's a good thing.

Yes, that's what we should do. Someone just has to figure out which possible additional flags to set besides `SEM_FAILCRITICALERRORS`. Also not sure what the impact will be when Blender crashes, maybe some dialog box will no longer show? Probably that's a good thing.

This issue was referenced by 3a3e5fb365

This issue was referenced by 3a3e5fb365bac2f3ee653c446215727d9e339648
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Harley Acheson self-assigned this 2019-09-29 20:43:47 +02:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
8 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#69935
No description provided.