Menu

#85 If Google File Stream is loaded, win32DiskImager Crashes on Startup

1.0
open
nobody
None
Critical
7(64bit)
2024-03-12
2020-07-18
No

If I disconnect Google File Stream drive, win32DiskImager loads fine.
Crash info:


Problem signature:
Problem Event Name: APPCRASH
Application Name: Win32DiskImager.exe
Application Version: 1.0.0.0
Application Timestamp: 58bdb94c
Fault Module Name: ntdll.dll
Fault Module Version: 6.1.7601.24545
Fault Module Timestamp: 5e0eb751
Exception Code: c00000fd
Exception Offset: 0002e11e
OS Version: 6.1.7601.2.1.0.256.1
Locale ID: 1033
Additional Information 1: c7f7
Additional Information 2: c7f7fbb466bc9723e417b7d2549bc651
Additional Information 3: dc16
Additional Information 4: dc16f8ce908694c4562d60a4f77f8067

Read our privacy statement online:
http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:
C:\Windows\system32\en-US\erofflps.txt


Discussion

  • Justin Spratt

    Justin Spratt - 2020-07-21

    Same here.

     
  • Steve

    Steve - 2020-08-05

    +1

     
  • Robert N Pascale

    Confirming I can replicate also Win 10 64 bit 20H2 (19042.423) release

     
  • Damian Dixon

    Damian Dixon - 2020-10-07

    +1 Windows 10.

     
  • Willi Neuberg

    Willi Neuberg - 2020-10-16

    Updated Link to make it run again modified on: 2023-12-07

    Win32Diskimager has a bug that make it run into into a recursive endless loop when it finds a Volume that has been mounted as a virtual disk. E.g. when used together with Google Drive or Veracrypt. So it runs until an internal Stackoverflow occurs without displaying any messages. The patch below for Win32DiskImage Version 1.0 fixes this bug:

    https://drive.google.com/file/d/10x5hIScQPyU0vAnDbJbW7wyAG0NJYNp-/view?usp=sharing

    Just download the .zip file, unpack it at and replace the original Win32DiskImage.exe file. If you want to see the modification, just run Windows FC.exe /b to compare original and patched version.

    If you do not trust the ready made patched Exe File from the above link you can do the patch by yourself. If your Win32DiskImager.exe has the Date 2017-03-06 and a file size of 190,076 Bytes just change byte at address: 0x0BFD from 0x74 to 0xEB using a binary editor. After the patch Win32DiskImager runs fine with Google Drive or Veracrypt.

    For me it was a great help!

    Have fun!!!

    Greetings from

    Willi!

     
    👍
    1

    Last edit: Willi Neuberg 2023-12-07
    • dotdash_underscore

      The only version I can find has a file size of 190,976, also that google drive link is dead, a reupload would be much appreciated.

       
  • lapin_forge

    lapin_forge - 2020-11-11

    Same error when using pCloud drive. When pCloud is disabled, Win32Diskimager works correctly.

     
  • James Cross

    James Cross - 2020-12-16

    Yes, - it doesn't like fake drive letters. Fortunately it works when the file stream is disabled (or just right click and exit).

     
  • flib

    flib - 2020-12-28

    I went through the source code and can provide a bit more context, as it seems there are 2 issues here:

    First, an error is thrown on some mounted virtual disks (I can reproduce with VeraCrypt, but not with a VHD created via Disk Management app). The error message is "Incorrect Function", which can be retrieved in a debugger by breaking at address Win32DiskImager.00404A4E;

    Second, this error is thrown inside method GetDisksProperty(), while the MainWindow instance is being created. The error logic calls MainWindow::GetInstance(), which triggers another constructor call, and another GetDisksProperty() call, and so on, causing the loop described by @willi9. His patch basically avoids entering this if statement in GetDisksProperty(), thus avoiding the next constructor call:

            if (DeviceIoControl(hDevice, IOCTL_STORAGE_CHECK_VERIFY2, NULL, 0, NULL, 0, &cbBytesReturned,
                                (LPOVERLAPPED) NULL))
            {
                wchar_t *errormessage=NULL;
                FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER, NULL, GetLastError(), 0, (LPWSTR)&errormessage, 0, NULL);
                QString errText = QString::fromUtf16((const ushort *)errormessage);
                QMessageBox::critical(MainWindow::getInstance(), QObject::tr("File Error"),
                                      QObject::tr("An error occurred while querying the properties.\n"
                                                  "This usually means something is currently accessing the device;"
                                                  " please close all applications and try again.\n\nError %1: %2").arg(GetLastError()).arg(errText));
                LocalFree(errormessage);
            }
    

    I took a stack trace and annotated it with the relevant method calls in specific addresses, so you can trace this loop (read from bottom to top):

    ntdll!NtDeviceIoControlFile+c
    KERNELBASE!DeviceIoControl+40
    kernel32!DeviceIoControlImplementation+4b
    Win32DiskImager+4f38
    Win32DiskImager+672a
    Win32DiskImager+cd65
    --- [Loop end]
    Win32DiskImager+4d2d
    Win32DiskImager+5083
    Win32DiskImager+672a
    Win32DiskImager+cd65
    [...]
    Win32DiskImager+4d2d = GetDisksProperty() -> QMessageBox::critical([...])
    Win32DiskImager+5083 = checkDriveType() -> GetDisksProperty(hDevice, pDevDesc, &deviceInfo)
    Win32DiskImager+672a = MainWindow::getLogicalDrives() -> checkDriveType(drivename, &pID)
    Win32DiskImager+cd65 = MainWindow::MainWindow() -> getLogicalDrives();
    --- [Loop begin]
    Win32DiskImager+58dc = main() -> MainWindow* mainwindow = MainWindow::getInstance();
    Win32DiskImager+10212
    Win32DiskImager+1825d
    Win32DiskImager+13e2
    

    A possible solution would be to remove the constructor's call to getLogicalDrives(), maybe calling it in main() after the instance is available.

     
  • Alexey Loukianov

    Hit this one too. Nowdays "Google File Stream drive" was rebranded to official "Google Drive" app and was pushed to insane amount of Google Drive service end-users. Have to close Google Drive app for now as a workaround. Looking forward for any source code patch appearing so it'd be possible to rebuild win32diskimager instead of relying on some binaries from third parties which is never a good idea for nowdays internet.

     
  • rafacure

    rafacure - 2023-11-14

    The problem has not yet been fixed even after the bugs and solutions were pointed out here several years ago. The bad thing is that this app is recommended by several Linux distros and some only work if you record using it. So I would like to reinforce my request to correct the bugs that require us to close certain apps for them to work.

     
  • El Zorro

    El Zorro - 2023-12-07

    +1

     
  • James Cross

    James Cross - 2023-12-11

    Remember - if its critical to your workflow, the workaround is to exit google drive. You can always restart it later on. There may also be other drive-stream apps that cause the same problem, onedrive can be configured that way and probably others like synology etc.

     
  • Jan Pawlak

    Jan Pawlak - 2024-03-12

    Here is located version based on this open source code ("fork), which corrects this bug: https://github.com/dnobori/DN-Win32DiskImagerRenewal

     
    👍
    1
    • rafacure

      rafacure - 2024-03-12

      I will try. Thank you for the recommendation.

       
  • Jan Pawlak

    Jan Pawlak - 2024-03-12

    Here You have corrected version ("fork" of this source code), search in Your favourite search engine: "DN-Win32DiskImagerRenewal"

     

Log in to post a comment.

MongoDB Logo MongoDB