[Vm-dev] Re: error "please insert disk" (windows vm)

Nicolai Hess nicolaihess at gmail.com
Thu Jan 14 23:07:31 UTC 2016


attached a patch on
http://bugs.squeak.org/view.php?id=7841
I think this could be applied on pharo win32 source as well.
maybe with some small changes

2015-11-16 10:00 GMT+01:00 Nicolai Hess <nicolaihess at gmail.com>:

> I opened another bug report at mantis - >
> http://bugs.squeak.org/view.php?id=7841
>
> I can create a patch with the proposed solution.
>
>
>
> 2015-11-06 8:42 GMT+01:00 Nicolai Hess <nicolaihess at gmail.com>:
>
>> we have the following bug report
>> 16928
>> <https://pharo.fogbugz.com/f/cases/16928/no-disk-in-the-drive-reply-to-World-Save-As-and-other-places>
>> "no disk in the drive" reply to World | Save As (and other places)
>>
>> "On a clean Pharo4.0 #40618 image, on Windows 7
>> World Menu | Save As brings up a modal alert window, "There is no disk in
>> the drive. Please insert a disk into drive <etc>"
>>
>> On my system, it does this 4 times.
>>
>> I'm assuming that each instance refers to one of the card-reader drives
>> which are attached, but without a card inserted.
>>
>> This is a pain to deal with every single time a File Browser or World |
>> Save As dialog is opened.
>>
>> Could the alerts either be
>>  - only raised when that specific drive is requested by a user action
>> or, less preferably
>>  - given by a non-modal window, and fading away after a period"
>>
>> I was able to reproduce this error on squeaks and pharos window vm.
>> (insert a usb card reader, with card, wait some time , remove only the
>> card,
>> every access on this drive, for example open a FileList and scroll to the
>> drive letter).
>>
>>
>> The solution I found is to call SetErrorMode(
>> *SEM_FAILCRITICALERRORS)*
>> I would like to propose the following change to sqwin32directory.c
>> wrap the call to FindFirstFileW/FindNextFileW with
>>
>> UINT prevMode = SetErrorMode(SEM_FAILCRITICALERRORS);
>> call   FindFirstFileW/FindNextFileW
>> SetErrorMode(prevMode);
>>
>> ...
>>
>> and call this functions in at least dir_lookup()
>> (the other file/directory methods are save).
>>
>> Alternative solution, we could call the SetErrorMode function once at
>> program start
>> but I don't know if there are other "useful" errors message that we don't
>> want to disable.
>>
>> I tested both solution, both seems to work fine.
>>
>> What do you think?
>>
>>
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20160115/6d578e22/attachment.htm


More information about the Vm-dev mailing list