Bug #55926 unnecessary error when exporting to csv
Submitted: 11 Aug 2010 19:40 Modified: 21 Aug 2010 4:00
Reporter: [ name withheld ] Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:5.2.26 OS:Windows (7)
Assigned to: CPU Architecture:Any

[11 Aug 2010 19:40] [ name withheld ]
Description:
When exporting query results to a file (e.g., CSV), Workbench automatically tries the folder to which a CSV was last exported. If that folder doesn't exist, that causes an error pop-up.

Setting to Windows; not sure what happens on other platforms (could be more severe, potentially).

How to repeat:
1. Run query, save query results to My Folder\foo.csv.
2. Rename My Folder to My Old Folder.
3. Restart Workbench.
4. Run query, begin to save query results to CSV.
5. Click '...' to pick the file to save to.

Workbench will default to My Folder, which no longer exists. This causes Windows to pop-up an error message.

Suggested fix:
Before defaulting to the previously-used folder, check that the folder exists. (The race condition remains, but it's much less likely to be a problem.)
[13 Aug 2010 16:03] Johannes Taxacher
I cannot reproduce that problem. in case the previously used export folder doesn't exist anymore, the windows dlg simply comes up pointing to the default document-directory (or the application directory when i tried on XP).
what kind of error msg do you see in that case? could you add a screenshot?
thanks in advance
[13 Aug 2010 19:44] [ name withheld ]
I was able to reproduce it easily (with a different directory than in my first report). The Windows error message is 

Location is not available.

<folder> refers to a location that is unavailable. It could be on a hard drive on this computer or on a network. ... [lots more boilerplate]

I'm on Windows 7 Enterprise 32bit.
[21 Aug 2010 2:56] Roel Van de Paar
It does not give a popup on my machine (Win7 HP x64) but it takes a fair while for a dialog box to return (consistently repeatable each time the "..." button is pressed). When it does return, it has just defaulted to "Libraries\Documents". I think I have seen this behavior elsewhere in Windows with other programs. It may be a Windows 7 issue.
[21 Aug 2010 3:39] Roel Van de Paar
Confirmed (last comment, not the bug). I am able to reproduce the exact same behavior with Notepad: takes some time, then the popup comes up with the directory set to "Libraries\Documents"

What is odd is that you are getting an error message.

There may be a difference in the steps you take which triggers the error. Would you be able to record on screen what is happening (from the start of WB until the crash happens) and upload a video to our FTP server?

You can get a (third party) screen recorder software here:
http://sourceforge.net/projects/camstudio/files/CamStudio%202.6%20beta/CamStudio_2.6b_r264...

When you've recorded the video into an .avi file, use swf producer to put it into a .swf + .html file (selecft 32 bit color and set the sample rate to 5 and keyframe rate to 20 and tick the "manage flash player internal memory" in the advanced options), zip those up and load them onto ftp.mysql.com/pub/mysql/upload/ (in binary mode) (anonymous ftp server)
[21 Aug 2010 4:00] Roel Van de Paar
"Location is not available." - after some more reading online I am fairly convinced this is a Windows error, not a WorkBench related issue.