Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There is no disk in drive error messages with Windows gtk3 builds #3544

Closed
t-o-d-d opened this issue Dec 16, 2016 · 64 comments
Closed

There is no disk in drive error messages with Windows gtk3 builds #3544

t-o-d-d opened this issue Dec 16, 2016 · 64 comments

Comments

@t-o-d-d
Copy link

t-o-d-d commented Dec 16, 2016

Currently: Windows RawTherapee-64-release-gtk3-bugfix-4.2.1425
AboutThisBuild-RawTherapee-64-release-gtk3-bugfix-4.2.1425.txt

I've attached a screenshot of my Windows 10 info:
sshot-86

Exact steps: Launch RT, and these errors start popping up like crazy:
sshot-87

It cycles through about five of my drive letters with this error message about ten times before loading RT. This time I actually wiped everything RT related out of my OS drive and reinstalled RT, and had gaaned92's Windows 'RawTherapee-64-release-gtk3-bugfix-4.2.1412' installed since yesterday and used it off and on all day without experiencing this problem. Launched it again tonight and started having the problem. So uninstalled RawTherapee-64-release-gtk3-bugfix-4.2.1425 and deleted program files then installed gaaned92's Windows RawTherapee-64-release-gtk3-bugfix-4.2.1425 build but continued to get the error messages.

I then reinstalled Squyaders 'RawTherapee_WinVista_64_Gtk3_Release_4.2.1375' and do not have this issue with this build.

Lastly, I installed gaaned92's RawTherapee_WinVista_64_debug_gtk3-bugfix_4.2.1425, which also generates the 'no disk' error messages o'plenty.
AboutThisBuild.txt
***I followed the Windows debug steps twice but each time the log file was empty at the end of the run. I copied the command prompt info into a text file manually and have attached here so you can see that I did try. I don't know if the info helps any though...
debug-attempt.txt

***I also have two more of gaaned92's Windows builds installed that do not have the no disk problem:
RawTherapee-64-release-locallab-4.2.1265 and
RawTherapee-64-release-pixelshift-4.2.1241.

So the problem seems isolated to the gtk3 builds. I thought I might try thoroughly wiping everything out again entirely then reinstalling, but figured I'd submit this bug report first to see if we can isolate the problem in some better way...

More background info:
First experienced this 'No Disk' issue in gaaned92's Windows 'RawTherapee-64-release-gtk3-bugfix-4.2.1396' build. See this post.

At the time I had Sguyader's Windows 4.2.1291 build installed which didn't have this issue, as none of his builds have ever had this problem. I didn't have the problem with gaaned92's build until I'd been using it for a day or two.... I figured the issue was due to my modified options file conflicting with gaaned92's build but didn't want to mess with my working Sguyader install... Finally just some days ago decided to thoroughly uninstall Squyaders latest working 'RawTherapee_WinVista_64_Gtk3_Release_4.2.1375' including the appdata stuff and try the latest gaaned92 Windows 'RawTherapee-64-release-gtk3-bugfix-4.2.1412' build and was happy to not see the no disk error messages..

@Partha1b
Copy link

Partha1b commented Dec 16, 2016

This is an old gtk bug whereby when you build on a disk that is not available on the user's system but the disk drive is available (in this case the N-drive), it will do this.

Typically, the C-drive is available on everyone's system and so you don't see this. Best to build on a drive not likely to be available on the user's system (like I do on my Z-drive) or on the C-drive.

It's harmless but annoying.

@Beep6581
Copy link
Owner

Ping @gaaned92 @sguyader

@Beep6581 Beep6581 mentioned this issue Dec 16, 2016
26 tasks
@gaaned92
Copy link

@Partha1b : sorry but I don't really understand your first sentence. Could you elaborate.

I build on D-drive. And as I don't want to build in the C-drive, my only solution would be to create a partition somewhere and give it the letter Z: in order to safely build RT!

@t-o-d-d
Copy link
Author

t-o-d-d commented Dec 16, 2016

@gaaned92 @Partha1b I certainly have a D: drive and the drives that get the No Disk message are only certain drives, the USB drives in my screenshot here...
sshot-88

***Also, I shutdown my PC at night and I just ran 'RawTherapee-64-release-gtk3-bugfix-4.2.1425' to verify which exact drives get the No Disk error and now I am not getting the problem today... I will try to remember what was running last night... Maybe another app triggers this condition...

@t-o-d-d
Copy link
Author

t-o-d-d commented Dec 16, 2016

@Partha1b @gaaned92 Ok found it... I remembered that I had my SD Card in the drive last night (L: above)

I inserted the card and then the No Disk errors started.. It cycled through the N: M: and K: drives with the error a bunch of times, but not the L: drive.... Then I closed out RT and took the SD card out and then the No Disk errors started going through all four USB drives (N: M: L: K:).

One last thing I tried was clearing out my temp folders but RT still took me through all the No Disk errors after that... I guess there is no way to reset except to shutdown/reboot... Good thing though is there is a workaround going forward which is to make sure there is never an SD card in the drive when I launch RT...

@Partha1b
Copy link

@gaaned92 What I mean is the following: I have found that if you are using (say) Drive D to build RT and the user does not have a disk in drive D, it will give that error. I didn't think this error existed anymore and you can find references to it from 2006-2007.

I do my builds on drive Z which is unlikely to be on a user's system though of course it's possible. I think there are some registry cures for this though I have not encountered the error my to bother.

Finally the error is harmless and you can click cancel to continue. But it is annoying to the user of course.

Hope I am being clear?

@t-o-d-d
Copy link
Author

t-o-d-d commented Dec 16, 2016

Finally the error is harmless and you can click cancel to continue. But it is annoying to the user of course.

And to be clear, in my case I have to click cancel about 20 or more times, so it definitely is annoying. And there are times when the error messages come up when clicking on various tools in RT while editing, so there can be additional rounds of 20+ cancel clicks at random times...

@Partha1b
Copy link

@t-o-d-d Are you sure you haven't processed images from those drives with RT?

@t-o-d-d
Copy link
Author

t-o-d-d commented Dec 16, 2016

@Partha1b 100% positive that I haven't.

@gaaned92
Copy link

gaaned92 commented Dec 17, 2016

@Partha1b Thank you. I will set up a Z: partition to overcome the problem.
What is mysterious is how and where in the build, the build drive is encoded? perhaps in the innosetup install files and written in the registry RT uninstall key?
@t-o-d-d when you have multiple versions installed with innosetup, if you want to delete or uninstall a RT version, the easiest and safest way is to run the unins000.exe that is inside the directory.

@t-o-d-d
Copy link
Author

t-o-d-d commented Dec 22, 2016

@gaaned92
Don't know if you've switched to Z: yet but just tried your 'RawTherapee_WinVista_64_release_gtk3-bugfix_4.2.1445' and the problem remains... Also, I've found that I get the same No Disk behavior if any USB flash drives are plugged in to my computer...

@gaaned92
Copy link

gaaned92 commented Dec 22, 2016

@t-o-d-d not yet switched to Z: . First I have to build a new partition in existing disk or install a new disk.

@Floessie @heckflosse could you have a look on this issue?

@heckflosse
Copy link
Collaborator

@gaaned92 @t-o-d-d I always have a USB flash drive plugged into my computer but never had this issue (Win7/64)

@gaaned92
you don't need to build a new partition.
subst z: C:\rt_folder

@Partha1b
Copy link

@heckflosse Correct. The point is if you have a drive plugged in then you won't have the issue. :)

@heckflosse
Copy link
Collaborator

heckflosse commented Dec 22, 2016

I thought the point is to not waste time by creating a new partition to build rt when this can be done by a subst and

Also, I've found that I get the same No Disk behavior if any USB flash drives are plugged in to my computer...

@Partha1b
Copy link

Partha1b commented Dec 22, 2016 via email

@gaaned92
Copy link

gaaned92 commented Dec 22, 2016

@heckflosse thanks, much simpler
edit: new gtk3-bugfix builds available in a few minutes in my RT 64 drive, built in Y:

@heckflosse
Copy link
Collaborator

@Partha1b I don't have any issues, but @t-o-d-d wrote

Also, I've found that I get the same No Disk behavior if any USB flash drives are plugged in to my computer...

@gaaned92
Copy link

gaaned92 commented Dec 23, 2016

@t-o-d-d could you try the last gtk3-bugfix 4.2.1447 built in Y: uploaded in same place

@t-o-d-d
Copy link
Author

t-o-d-d commented Dec 24, 2016

@gaaned92 Problem remains. Opened gtk3-bugfix 4.2.1447 a couple times without No Disk errors, but as soon as I put an SD card in my card reader and ran it again, the errors came back upon launch. Took SD card out and No Disk errors remained on next launch. I actually counted this time too and I have to cancel the No Disk errors 49 times before RT appears...

*** Also just to be sure uninstalled all my versions of RT including appdata/options then only installed and tested this one, and still the No Disk errors... Reinstalled Sguyaders Gtk3_Release_4.2.1375 (which I revert to once I start getting No Disk errors so I don't have to reboot) and it still doesn't have the problem.

@gaaned92
Copy link

So the subst trick seems not sufficient to solve the issue.
Main differences with Sguyader's builds are:

  • I am on W10 and I think Sguyader use W8 or perhaps Winvista
  • Sguyader builds use GTK+3.18 and mine use GTK+3.22
  • build parameters. I will check that

I rather suspect GTK+3.22 but I am not able to test as I don't get the problem even with usb flash drive

@heckflosse @Floessie could it be related to network drive error or letter allocated to missing diskette (not remembering exactly of what was the problem).

@iliasg
Copy link
Collaborator

iliasg commented Dec 24, 2016

or letter allocated to missing diskette (not remembering exactly of what was the problem).

Andre, I had this problem with sguyader's builds .... I have no such drive in my machine but I could see it in "My computer" .. as soon as I dissactivated drive A: the problem dissappeared ..
I have not tryied if this happens with my builds (I build in drive C: ) or your latest builds if I reactivate the obsolete drive A: ..

@heckflosse
Copy link
Collaborator

heckflosse commented Dec 24, 2016

@t-o-d-d Can you please upload your rt options file to filebin.net and post the link here?

@t-o-d-d
Copy link
Author

t-o-d-d commented Dec 24, 2016

@heckflosse Here 'tis
options

@Beep6581
Copy link
Owner

Beep6581 commented Dec 25, 2016

as soon as I put an SD card in my card reader and ran it again, the errors came back upon launch. Took SD card out and No Disk errors remained on next launch

@t-o-d-d

  1. What must you do to stop the errors from appearing - does rebooting with no SD card inserted temporarily fix it until the next time you put the card in?
  2. Are drives D: and F: removable or otherwise not always accessible?

@t-o-d-d
Copy link
Author

t-o-d-d commented Dec 25, 2016

@Beep6581 1. Yes, rebooting with no SD card or flash drive media connected stops the errors.
2. Drives D: and F: are both internal hard drives, as are E: and G:.
sshot-88
I: is a ram drive.
Drives K: through N: are an internally connected USB card reader in a drive bay slot on front of the pc tower.

@heckflosse
Copy link
Collaborator

@t-o-d-d Can you try this please?

@Partha1b
Copy link

@t-o-d-d , Without meaning to muddy the waters so to speak, Would you be willing to try a new build from me?

It is portable and will not interfere with your current setup. Can you let me know if you get the above behaviour with this build: http://www.partha.com/temp/RT-4.2-1447-portable.exe? I didn't see the above behavior in this build.

If yes, please download the 7z archive exe above and unzip anywhere by double-clicking on it. This will create a folder called RTPortable. Inside the folder is an executable rawtherapee-4.2.1447.exe. Double-click to start RT.

You may need to change the font in the preferences in case they look a little jagged.

@t-o-d-d
Copy link
Author

t-o-d-d commented Dec 26, 2016

@heckflosse I was 99% sure that I don't even have the option to enable legacy floppy in my BIOS and this morning confirmed this to be the case.

I did check every bios screen and came across this one below, however my SD card is 32GB and my flash drives are 16GB... Just thought it was curious because these are the (four) drives that come up in the No Disk errors...
bios

@Partha1b Tried it and it works fine in general (after realizing that I needed to set the 'run as admin' property to the .exe in order for preferences to stick, because I wanted it on C:)... But got the same No Disk errors once I tried with my SD card in the drive. Now it's up to 56 cancels of the No Disk errors per launch of RT, which I noticed with the other Edmond's 1447 build as well... Curious that the number of cancels has increased.. Early on the number of times to cancel was down in the 20's...

@Partha1b
Copy link

@t-o-d-d @Beep6581 ,

Here are my disk drives. I inserted an SD card from one of my cameras.
image

Then I started my RTportable version from my D: drive. No issues. So, I am unable to replicate this error. ☹️

@Beep6581
Copy link
Owner

Beep6581 commented Dec 27, 2016

@Partha1b @t-o-d-d's screenshot had DVD and USB drives, and four of them were grayed-out. Maybe relevant?

@Partha1b
Copy link

@Beep6581 No, not grayed out. Just how it looks. My color combination is very subdued.

Anyway, replaced my SD Drive (F:) with another card and restarted my portable version. Started without errors.

@t-o-d-d
Copy link
Author

t-o-d-d commented Dec 27, 2016

@Partha1b @Beep6581 @gaaned92 @heckflosse @iliasg
I didn't try anything from those links but thanks! because it got me thinking about the problem from a different angle so tried something that resolved the problem for me... Went into the Windows Device Manager and disabled the other three card reader slots (CF, MS and SM), which is fine for me since I only use the SD card slot.
sshot-91
After this did not get any No Disk errors with your portable build or Edmond's .1447 build with my SD card inserted... Also tried with flash drive connected and did not get No Disk errors... Still would be interested to know why there is a difference between these builds and Sguyaders, not that I'd understand it unless you guys dumbed it down for me... Thanks all! ;)

@t-o-d-d
Copy link
Author

t-o-d-d commented Dec 28, 2016

@Partha1b @Beep6581 @gaaned92 @heckflosse @iliasg
Just FYI if I have the SD card inserted and run 4.2.1447, no problem. If I close RT, then later take the SD card out then run RT again, I get the No Disk errors, about 40 of them, but of course just for the L: that is now the empty SD card drive. I verified that I can at least disable the SD card drive in the device manager to avoid this as per the previous post, if I ever forget to not do what I've just described... And then remember to re-enable the SD card drive in the device manager. :)

@gaaned92
Copy link

@t-o-d-d , just back from home from travel. Happy that you finally found the problem. But the solution to manually disable the SD card is not very handy.
I verified on my PC. I have two usb HDD backup drives, one SSD, usb SD card reader. when I connect any of them it appears in the device manager and automatically disapears when I disconnect them. So I never have the nodisk error. Why it is not the same on your PC?
Sguyaders builds are done with older GCC version and with gtk3.18. Perhaps it is the reason of the different behaviour.

@t-o-d-d
Copy link
Author

t-o-d-d commented Dec 28, 2016

@gaaned92
Sounds like your USB SD card reader is not an internal reader and that you're plugging it into a USB port then unplugging it. My USB card reader is always connected directly to the motherboard inside the case and sits in one of the drive bays accessible at the front of my tower/case like a CD/DVD-Rom drive...

@gaaned92
Copy link

gaaned92 commented Dec 28, 2016

@t-o-d-d yes, each time I want to read a SD card I have to plug my SD card reader into a USB port. Thus when I have finished with the SD cards, I unplug the card reader and it disappears from the disk drive list
Now, If I take out the SD card, the empty card reader stays in the list and if I start RT 1447, I sometimes (not always) get the no disk error.
edit: @t-o-d-d could you download master 4.2.1224 and test if you have the same problem? If no, the culprit should certainly be gtk3

@t-o-d-d
Copy link
Author

t-o-d-d commented Dec 31, 2016

@gaaned92 yes, tried it and no problem.. I've never had this problem with any of your non-gtk3 versions... (I sometimes use the pixel shift and local lab versions too....)

FYI tonight I inserted my SD card, copied my files off it, pulled the SD card out, then started your 4.2.1447 and still got the No Disk errors. I used this version a few different times earlier today before inserting my SD card and did not get any No Disk errors, so there is something about the state of the SD card drive after having been used that triggers this... Tomorrow or next time I am copying images off my SD card I will observe the device manager to see if I can find anything...

@t-o-d-d
Copy link
Author

t-o-d-d commented Jan 1, 2017

Yeah, so observed the Device Manager and the Disk Management windows before and after SD card today, and have no idea what the issue is because the device manager doesn't change its state observably at any point. The Disk Management record for the SD card drive shows the presence of the SD card when plugged in then returns to the same state of 'no media' after the SD card is removed..

@Beep6581
Copy link
Owner

Beep6581 commented Feb 4, 2017

To bump and summarize this issue so far, compiling RT on some unusual drive letter such as Y: does not fix/prevent this problem, and the most likely culprit seems to be the GTK+ version.

@sguyader
Copy link

sguyader commented Feb 4, 2017

In fact, since we build Windows packages in MSYS2, I don't think building on a different hard drive is going to change anything, since the compiler doesn't know the Windows drive letters as it is compiling in a Unix environment, I think.
Could the problem come from some of the libraries that we have to compile ourselves in MSYS2 environment? Sometimes in pkgconfig files there's a path to library which is set to some location.

@heckflosse
Copy link
Collaborator

@sguyader
I'm not completely sure about that the compiler, make, cmake, whatever does not know the windows drive letters when building on MSYS2.
One line from my log when building RT on MSYS2:

-- Up-to-date: H:/rt5gtk3/build/Release/share/man/man1/rawtherapee.1

Maybe that drive letter bug is related to gtk3 version. As you I also use 3.18 and never saw this bug with my builds...

Sometimes in pkgconfig files there's a path to library which is set to some location.

That's something we should inspect indeed!

@Partha1b
Copy link

Partha1b commented Feb 4, 2017

@heckflosse I agree. Despite the masking, drive letters do get used as demonstrated by you. Definitely used in my case as I use the Msys shell. cmake and libtool are notorious in this respect.

I am beginning to think that this drive letter issue is a runtime problem when a user has a disk when running RT and not having a disk inserted when running a second time?

@heckflosse
Copy link
Collaborator

heckflosse commented Feb 4, 2017

@Partha1b

I think it's caused by gtk3. Seems that using gtk3 3.18 on windows does not have this issue:
https://discuss.pixls.us/t/rawtherapee-5-0-revision-1-released/3234/26

@gaaned92
Copy link

gaaned92 commented Feb 6, 2017

@heckflosse @Floessie
I tried to reproduce the issue.
version 5.0-r1-gtk3 with gtk+3.22.7 on W10
To reproduce issue I made following steps

 -insert a sd card with photo in my usb sd card reader
- run RT, then open the photo folder on sd card and process a file
- close RT
- unplug the sd card (not the usb card reader)
- run RT

the annoying window no disk in drive appears

Following this page, I inserted in main.cc the line
SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX);
that seems solve the issue.

@Partha1b
Copy link

Partha1b commented Feb 6, 2017

@heckflosse Looks like this confirms what I was speculating above.

I am guessing, we can patch the code to default to user's home folder (or Pictures) if the last used folder no longer exists?

@gaaned92 If I am understanding your fix, does this simply tell the app to move on to a default folder once the last accessed folder is no longer available?

@Floessie
Copy link
Collaborator

Floessie commented Feb 6, 2017

@gaaned92 Although I'm not involved with Windows specific problems, this sounds like a good idea. For reference, here is the "man page". Please post a patch for review.

@gaaned92
Copy link

gaaned92 commented Feb 6, 2017

@Partha1b I don't really understand what the fix is doing.
If you don't have the fix above you have to click many times on "continue" button of the error window, then RT goes on. With the fix the window don't appear.
@Floessie You are very ambitious with me. The last time I coded was about in 1990.
What I made above is just a hack. I will try to provide a patch but I will not be upset if somebody proposes a patch before me (for instance @heckflosse ).

@heckflosse
Copy link
Collaborator

@gaaned92 As you already inserted the line in main.cc you just have to execute
git diff > foo.patch and post the content of foo.patch here.
Or tell me the number of the line you inserted, then I can make the patch.

@gaaned92
Copy link

gaaned92 commented Feb 6, 2017

Yes my first patch:

diff --git a/rtgui/main.cc b/rtgui/main.cc
index 20cd626e..5d4c6985 100644
--- a/rtgui/main.cc
+++ b/rtgui/main.cc
@@ -180,7 +180,8 @@ int main(int argc, char **argv)
 
 #ifdef WIN32
     bool consoleOpened = false;
-
+    // suppression of annoying error boxes
+    SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX);
     if (argc > 1 || options.rtSettings.verbose) {
         if (options.rtSettings.verbose || ( !Glib::file_test (fname_to_utf8 (argv[1]), Glib::FILE_TEST_EXISTS ) && !Glib::file_test (fname_to_utf8 (argv[1]), Glib::FILE_TEST_IS_DIR))) {
             bool stdoutRedirectedtoFile = (GetFileType(GetStdHandle(STD_OUTPUT_HANDLE)) == 0x0001);

@heckflosse
Copy link
Collaborator

@gaaned92 👍 for your patch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants