Bug 209652 - "Could not open 'file name' Reason: Cannot create storage." Happens when opening any file from the hard disk
Summary: "Could not open 'file name' Reason: Cannot create storage." Happens when open...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: unspecified
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Adrian Page
URL:
Keywords:
: 211126 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-10-06 18:49 UTC by niallabrown
Modified: 2012-10-03 21:13 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description niallabrown 2009-10-06 18:49:00 UTC
Version:           Version 2.1 Beta 2 Using KDE 4.3.1 on Windows (using KDE 4.3.1)
Compiler:          Unsure installed through: kdewin-installer-gui-latest 
OS:                MS Windows
Installed from:    MS Windows

From a clean install when opening an image file through the file>open dialog or when dragging an image file to the canvas to open an error dialog states "Could not open
C:\Users\niallbrown\Documents\brush1.png.
Reason: Cannot create storage"

The same happens for JPG and PNG files of various sizes and opening from various drives including the local hard drive.


Krita is beautiful... Thank you for bringing it to Windows.
Comment 1 niallabrown 2009-10-06 18:50:39 UTC
The same bug happens when trying to open a file through file>import.
Comment 2 Halla Rempt 2009-10-06 18:52:40 UTC
Thank you for your report. I'll ask some of the windows guys whether they know what's going on -- it doesn't happen on Linux and I haven't heard recently from any OS X user.
Comment 3 Patrick Spendrin 2009-10-06 19:16:50 UTC
can you please go into systemsettings, 'advanced' tab, and platform (alternatively use 'kcmshell4 platform' from commandline) and there please disable 'native file dialogs', then please restart krita and check if you still have this error message.
(this is of course not a fix and only a poor workaround, but it might give a first idea).
Comment 4 niallabrown 2009-10-06 19:35:33 UTC
(In reply to comment #3)
> can you please go into systemsettings, 'advanced' tab, and platform
> (alternatively use 'kcmshell4 platform' from commandline) and there please
> disable 'native file dialogs', then please restart krita and check if you still
> have this error message.
> (this is of course not a fix and only a poor workaround, but it might give a
> first idea).

I tried your suggestion, then restarted the computer and loaded Krita but the problem is persisting.
Comment 5 Halla Rempt 2009-10-07 10:00:18 UTC
do you have only krita installed or also karbon? If so, could you try to open a file with karbon? If that fails too, it's probably that the plugins cannot be found.
Comment 6 niallabrown 2009-10-09 00:11:58 UTC
(In reply to comment #5)
> do you have only krita installed or also karbon? If so, could you try to open a
> file with karbon? If that fails too, it's probably that the plugins cannot be
> found.

I experimented in Karbon a little and was able to successfully save and open a ODG file, import an SVG file and use the "add shape" function to import a PNG.  All of these functions worked perfectly.
Comment 7 Sven Langkamp 2009-10-09 00:50:23 UTC
Can you try to save an image as .kra and try to open that?
Comment 8 niallabrown 2009-10-09 13:14:38 UTC
(In reply to comment #7)
> Can you try to save an image as .kra and try to open that?

I saved and opened a KRA document but could only put vector graphics on it due to not being able to import photos.  I When I re-opened the document the canvas was showing through (the Grey checked background) with none of the vector graphics on it.

On a side note I tried using the add shape image tool and it did add a JPG image but it was choppy and only showed up when I moved it with the mouse then would disappear when it was untouched.

Please let me know if this is too much information.  The programs seem to have many rough edges at this point, maybe these are all things that get worked out in the natural process.  Tell me is these bug reports are not worth your time at this stage. If they are however I am glad to lend a hand with any basic testing.
Comment 9 Halla Rempt 2009-10-09 16:44:03 UTC
Windows isn't really the platform the developers work on, and on Linux the experience is much better (though it's still in beta, and there are still a number of issues). But your reports are very welcome!
Comment 10 Halla Rempt 2009-10-19 21:55:18 UTC
*** Bug 211126 has been marked as a duplicate of this bug. ***
Comment 11 Licc 2009-10-20 18:13:03 UTC
Thank you!!!

D.Y>

--- On Mon, 10/19/09, boud@valdyas.org <boud@valdyas.org> wrote:

From: boud@valdyas.org <boud@valdyas.org>
Subject: [Bug 209652] "Could not open 'file name' Reason: Cannot create storage." Happens when opening any file from the hard disk
To: licccr@yahoo.com
Date: Monday, October 19, 2009, 2:55 PM

https://bugs.kde.org/show_bug.cgi?id=209652


boud@valdyas.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |licccr@yahoo.com




--- Comment #10 from  <boud valdyas org>  2009-10-19 21:55:18 ---
*** Bug 211126 has been marked as a duplicate of this bug. ***
Comment 12 Adrian Page 2009-10-29 14:31:34 UTC
This problem is due to using KUrl::path() instead of KUrl::toLocalFile() when opening files. They're the same on Linux, but different on Windows. I'll fix these, though jpeg then crashes due to another problem.
Comment 13 Halla Rempt 2009-10-29 14:48:59 UTC
Sounds good! We can toss the jpeg problem to Cyrille as soon as he's done his phd + rest & recuperation :-).
Comment 14 Patrick Spendrin 2009-10-29 14:58:56 UTC
@adrian:
the jpeg stuff could be due to some calls in libjpeg that need a FILE* pointer. You cannot share these over the border of dlls. So one needs to rework the jpeg accessing code to read the file into memory and give over the memory area to libjpeg instead of providing it with the file pointer. There are multiple points in KDE code where these problems have occured (and where it got fixed already), so maybe it can be solved without needing cyrille to look into it...
Comment 15 Adrian Page 2009-10-29 15:12:53 UTC
(In reply to comment #14)
> @adrian:
> the jpeg stuff could be due to some calls in libjpeg that need a FILE* pointer.

Yep, that looks like the problem as it does pass a FILE* in. I'll have a look at changing it to passing in memory instead. Thanks for the tip.
Comment 16 Adrian Page 2009-11-08 22:46:47 UTC
SVN commit 1046501 by page:

Fix loading and saving in various formats on Windows:

- Use KUrl::toLocalFile() instead of KUrl::path() when accessing local files. They happen to be the same on Linux, but not on Windows.
- Provide data to the jpeg library using source and destination managers, rather than passing in FILE pointers. This is not possible on Windows.

BUG: 209652

 M  +1 -1      plugins/extensions/extensionsmanager/ExtensionsManager.cpp  
 M  +2 -2      plugins/formats/bmp/kis_bmp_export.cpp  
 M  +3 -3      plugins/formats/gmagick/kis_image_magick_converter.cc  
 M  +2 -0      plugins/formats/jpeg/CMakeLists.txt  
 AM            plugins/formats/jpeg/README  
 M  +18 -11    plugins/formats/jpeg/kis_jpeg_converter.cc  
 AM            plugins/formats/jpeg/kis_jpeg_destination.cpp   [License: GPL (v2+)]
 AM            plugins/formats/jpeg/kis_jpeg_destination.h   [License: GPL (v2+)]
 M  +1 -0      plugins/formats/jpeg/kis_jpeg_import.cc  
 AM            plugins/formats/jpeg/kis_jpeg_source.cpp   [License: GPL (v2+)]
 AM            plugins/formats/jpeg/kis_jpeg_source.h   [License: GPL (v2+)]
 M  +1 -1      plugins/formats/pdf/kis_pdf_import.cpp  
 M  +4 -4      plugins/formats/tiff/kis_tiff_converter.cc  
 M  +2 -2      ui/kis_png_converter.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1046501
Comment 17 guanx 2012-10-03 21:13:46 UTC
I'm running Krita 2.4.3 on KDE 4.8.5.
Still getting this same error when opening CR2 (Canon raw) images.
Opening JPG, PNG, etc. works properly.