Bug 371012 - "There is no disk in drive D:\" dialog when starting KDevelop on some systems
Summary: "There is no disk in drive D:\" dialog when starting KDevelop on some systems
Status: RESOLVED FIXED
Alias: None
Product: frameworks-solid
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.27.0
Platform: Other Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Lukáš Tinkl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-17 17:47 UTC by Sven Brauch
Modified: 2016-10-18 07:33 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.28.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Brauch 2016-10-17 17:47:58 UTC
When starting KDevelop on Windows on some systems, we get several "There is no disk in drive D:\" dialogs. This seems to come from Solid's free space info code, here's a trace (no detailed debug symbols, sorry):

Thread 1 (Thread 5316.0x1034):
#0  0x00007ffa873209ea in ntdll!ZwOpenFile () from C:\Windows\SYSTEM32\ntdll.dll
#1  0x00007ffa84864246 in KERNELBASE!GetDiskFreeSpaceExW () from C:\Windows\system32\KernelBase.dll
#2  0x00007ffa69e83e9a in KF5Solid!?trUtf8@DeviceNotifier@Solid@@SA?AVQString@@PEBD0H@Z () from C:\Program Files\KDevelop\bin\KF5Solid.dll
#3  0x00007ffa69e83a0e in KF5Solid!?trUtf8@DeviceNotifier@Solid@@SA?AVQString@@PEBD0H@Z () from C:\Program Files\KDevelop\bin\KF5Solid.dll
#4  0x00007ffa69e7bbe3 in KF5Solid!?trUtf8@DeviceNotifier@Solid@@SA?AVQString@@PEBD0H@Z () from C:\Program Files\KDevelop\bin\KF5Solid.dll
#5  0x00007ffa69e7a42c in KF5Solid!?trUtf8@DeviceNotifier@Solid@@SA?AVQString@@PEBD0H@Z () from C:\Program Files\KDevelop\bin\KF5Solid.dll
#6  0x00007ffa69e7dee0 in KF5Solid!?trUtf8@DeviceNotifier@Solid@@SA?AVQString@@PEBD0H@Z () from C:\Program Files\KDevelop\bin\KF5Solid.dll
#7  0x00007ffa69e51776 in KF5Solid!?trUtf8@DeviceNotifier@Solid@@SA?AVQString@@PEBD0H@Z () from C:\Program Files\KDevelop\bin\KF5Solid.dll
#8  0x00007ffa6d917229 in KF5KIOFileWidgets!?dir@KRecentDirs@@YA?AVQString@@AEBV2@@Z () from C:\Program Files\KDevelop\bin\KF5KIOFileWidgets.dll
#9  0x000000006d38c38e in Qt5Core!?event@QObject@@UEAA_NPEAVQEvent@@@Z () from C:\Program Files\KDevelop\bin\Qt5Core.dll
#10 0x000000006d6bc5a6 in Qt5Widgets!?notify_helper@QApplicationPrivate@@QEAA_NPEAVQObject@@PEAVQEvent@@@Z () from C:\Program Files\KDevelop\bin\Qt5Widgets.dll
#11 0x000000006d6bbba6 in Qt5Widgets!?notify@QApplication@@UEAA_NPEAVQObject@@PEAVQEvent@@@Z () from C:\Program Files\KDevelop\bin\Qt5Widgets.dll
#12 0x000000006d367609 in Qt5Core!?notifyInternal2@QCoreApplication@@CA_NPEAVQObject@@PEAVQEvent@@@Z () from C:\Program Files\KDevelop\bin\Qt5Core.dll
#13 0x000000006d36834a in Qt5Core!?sendPostedEvents@QCoreApplicationPrivate@@SAXPEAVQObject@@HPEAVQThreadData@@@Z () from C:\Program Files\KDevelop\bin\Qt5Core.dll
#14 0x00007ffa5e82546f in qwindows!qt_plugin_instance () from C:\Program Files\KDevelop\bin\platforms\qwindows.dll
#15 0x000000006d3b47b6 in Qt5Core!?activateEventNotifier@QEventDispatcherWin32Private@@QEAAXPEAVQWinEventNotifier@@@Z () from C:\Program Files\KDevelop\bin\Qt5Core.dll
#16 0x00007ffa86fd24fd in USER32!DispatchMessageW () from C:\Windows\system32\user32.dll
#17 0x00007ffa86fd2357 in USER32!NotifyWinEvent () from C:\Windows\system32\user32.dll
#18 0x000000006d3b58de in Qt5Core!?processEvents@QEventDispatcherWin32@@UEAA_NV?$QFlags@W4ProcessEventsFlag@QEventLoop@@@@@Z () from C:\Program Files\KDevelop\bin\Qt5Core.dll
#19 0x00007ffa5e825449 in qwindows!qt_plugin_instance () from C:\Program Files\KDevelop\bin\platforms\qwindows.dll
#20 0x000000006d365020 in Qt5Core!?exec@QEventLoop@@QEAAHV?$QFlags@W4ProcessEventsFlag@QEventLoop@@@@@Z () from C:\Program Files\KDevelop\bin\Qt5Core.dll
#21 0x000000006d367c47 in Qt5Core!?exec@QCoreApplication@@SAHXZ () from C:\Program Files\KDevelop\bin\Qt5Core.dll
#22 0x00007ff6ce0ed64d in ?? ()

Any ideas what that could be?
Comment 1 Kevin Funk 2016-10-18 07:33:47 UTC
Git commit f544380db86301f4833b2149dd46dca47acc8042 by Kevin Funk.
Committed on 18/10/2016 at 07:33.
Pushed by kfunk into branch 'master'.

Windows: Don't display error dialogs

Summary:
Some Windows API functions like GetDiskFreeSpaceEx may produce error
dialogs. This is not desired. Fix this by temporarily blocking errors by
calling SetThreadErrorMode with certain error suppressing flags.
FIXED-IN: 5.28.0

Reviewers: #frameworks, brauch, vonreth

Reviewed By: vonreth

Subscribers: vonreth, nalvarez, broulik

Differential Revision: https://phabricator.kde.org/D3091

M  +4    -0    src/solid/devices/backends/win/winstoragevolume.cpp
A  +67   -0    src/solid/devices/backends/win/winutils_p.h     [License: LGPL]

http://commits.kde.org/solid/f544380db86301f4833b2149dd46dca47acc8042