Bug 127903 - Importing image with faulty filename extension hangs Krita
Summary: Importing image with faulty filename extension hangs Krita
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: File formats (other bugs)
Version First Reported In: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Halla Rempt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-23 21:27 UTC by Dik Takken
Modified: 2008-09-30 16:44 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dik Takken 2006-05-23 21:27:04 UTC
Version:           1.5.1 (using KDE KDE 3.5.2)
Installed from:    Gentoo Packages
OS:                Linux

When a TIFF image has a filename that ends '.tif' in stead of '.tiff' Konqueror thinks it is a RAW image. Krita makes the same mistake. When I try to open this image in Krita, I get a dialog that looks like a import dialog for RAW format images. Krita hangs forever when the image is loaded. It does not eat any CPU. The Krita window can be closed normally.
Comment 1 Cyrille Berger 2006-06-02 18:02:40 UTC
for tif being considered as RAW is a gentoo bug, and you should report it to gentoo, for me on kubuntu, tif is considered by KDE as tiff (note that you can make yourself the modification in konqueror : settings > configure konqueror > file associations).

as for the hanging of krita when trying to open an invalid raw file, this is a problem we need to fix (unfortunately I don't get the hang), can you give us the console output ? (if krita with build with debug)
Comment 2 Dik Takken 2006-06-15 10:55:13 UTC
Here is the output of krita-1.5.1 when loading a 'tif' image:

dik@dik ~/Desktop/druppels $ krita Scannen.tif
kio (KSycoca): Trying to open ksycoca from /var/tmp/kdecache-dik/ksycoca
koffice (lib kofficecore): kritapart.desktop found.
kio (KTrader): query for Krita/Tool : returning 9 offers
krita (plugins): found plugin Polylijngereedschap
kio (KTrader): query for Krita/Paintop : returning 2 offers
krita (plugins): found plugin Standaardschilderoperaties
krita (plugins): found plugin Vettige kwast
krita (plugins): found plugin Filtergereedschap
krita (plugins): found plugin Selectiegereedschappen
krita (plugins): found plugin Gereedsschap voor soortgelijke kleuren
krita (plugins): found plugin Polygoongereedschap
krita (plugins): found plugin Snijgereedschap
krita (plugins): found plugin Standaardgereedschappen
krita (plugins): found plugin Stergereedschap
krita (plugins): found plugin Vervormgereedschap
kio (KTrader): query for Krita/Filter : returning 13 offers
krita (plugins): found plugin Pixelfilter
krita (plugins): found plugin Olieverffilter
krita (plugins): found plugin Inversefilter
krita (plugins): found plugin Verdraaïngs
krita (plugins): found plugin Regendruppelfilter
krita (plugins): Image enhancement filter plugin. Class: KParts::Plugin, Parent: KisFilterRegistry
krita (plugins): found plugin Correctiefilters
krita (plugins): found plugin Kleurfilters
krita (plugins): found plugin CImg afbeeldingsrestauratiefilter
krita (plugins): found plugin Reliëffilter
krita (plugins): found plugin Bumpmapfilter
krita (plugins): found plugin Sobelfilter
krita (plugins): found plugin Sobelfilter
krita (plugins): found plugin Kleine tegeltjes
kio (KTrader): query for Krita/ColorSpace : returning 10 offers
krita (plugins): found colorspace RGB-kleurmodel (16-bit integer)
krita (plugins): found colorspace Kleurmodel voor grijswaarden (16-bit integers)
krita (plugins): found colorspace CMYK-kleurmodel (16-bit integer)
krita (plugins): found colorspace RGB-kleurmodel
krita (plugins): found colorspace CMYK-kleurmodel
krita (plugins): found colorspace RGB-kleurmodel (16-bit float 'half')
krita (plugins): found colorspace LMS-kleurmodel (32-bit float)
krita (plugins): found colorspace Grijswaarden kleurmodel
krita (plugins): found colorspace Waterkleur schilderplugin
krita (plugins): found colorspace RGB-kleurmodel (32-bit float)
koffice (lib kofficecore): KoDocument::openURL url=file:///home/dik/Desktop/druppels/Scannen.tif
koffice (lib kofficecore): kritapart.desktop found.
koffice (lib kofficecore): KoDocument::openFile /home/dik/Desktop/druppels/Scannen.tif type:image/x-raw
kio (KTrader): query for KOfficePart : returning 6 offers
koffice (filter manager): KoFilterEntry::query(  )
kio (KTrader): query for KOfficeFilter : returning 59 offers
koffice (filter manager): Filter: XSLT-exportfilter voor KOffice doesn't apply.
krita (file handling): Krita importing from Raw
krita (file handling): getImageData dcraw -c -h -4 "/home/dik/Desktop/druppels/Scannen.tif"
krita (file handling): Starting process
krita (file handling): /home/dik/Desktop/druppels/Scannen.tif: unsupported file format.
krita (file handling):
krita (file handling): process done!
krita (file handling): Return value of process: 1
krita (file handling): Retrieved 0 bytes of image data
krita (file handling): getImageData dcraw -c -4 "/home/dik/Desktop/druppels/Scannen.tif"
krita (file handling): Starting process
krita (file handling): /home/dik/Desktop/druppels/Scannen.tif: unsupported file format.
krita (file handling):
krita (file handling): process done!
krita (file handling): Return value of process: 1
krita (file handling): Total bytes: 0
 start of image data: 0
 bytes for pixels left: 0
 total pixels: 0
 total pixel bytes: 0
 total necessary bytes: 0
krita: going to set image
krita: everything ok
koffice (lib kofficecore): KoDocument::openFile - importedFile '', status: 0
koffice (lib kofficecore): KoMainWindow::slotLoadCompleted
X Error: BadDevice, invalid or uninitialized input device 162
  Major opcode:  146
  Minor opcode:  3
  Resource id:  0x0
X Error: BadDevice, invalid or uninitialized input device 162
  Major opcode:  146
  Minor opcode:  3
  Resource id:  0x0
kio (KTrader): query for KOfficePart : returning 6 offers
kio (KTrader): query for KOfficePart : returning 6 offers
kio (KTrader): query for KOfficePart : returning 6 offers
kio (KTrader): query for Krita/ViewPlugin : returning 13 offers
krita (math): Histogram
krita (math): Logarithmic histogram
krita (math): Dumping channel 0
krita (math):
krita (math): Max: 0
krita (math): Min: 0
krita (math): High: 0
krita (math): Low: 0
krita (math): Mean: 0
krita (math): Total: 0
krita (math):
krita (math): Histogram
krita (math): Logarithmic histogram
krita (math): Dumping channel 0
krita (math):
krita (math): Max: 0
krita (math): Min: 0
krita (math): High: 0
krita (math): Low: 0
krita (math): Mean: 0
krita (math): Total: 0
krita (math):
krita (plugins): found plugin Histogramcomponent
krita (plugins): found plugin Schermafbeelding
krita (plugins): found plugin Schaduw plaatsen
krita: ScriptGUIClient::ScriptGUIClient() Ctor
krita: ScriptGUIClient::loadScriptConfig file=/usr/share/apps/krita/scripts/invertpython/invertpython.rc
krita: Kross::Api::Module  created
krita: ScriptContainer::ScriptContainer() Ctor name=''
krita: Kross::Api::Module Kross created
krita: ScriptGUIClient::loadScriptConfig file=/usr/share/apps/krita/scripts/invertruby/invertruby.rc
krita: Kross::Api::Module  created
krita: ScriptContainer::ScriptContainer() Ctor name=''
krita: ScriptGUIClient::loadScriptConfig file=/usr/share/apps/krita/scripts/filterstest/filterstest.rc
krita: Kross::Api::Module  created
krita: ScriptContainer::ScriptContainer() Ctor name=''
krita: ScriptGUIClient::loadScriptConfig file=/usr/share/apps/krita/scripts/changecs/changecs.rc
krita: Kross::Api::Module  created
krita: ScriptContainer::ScriptContainer() Ctor name=''
krita: ScriptGUIClient::loadScriptConfig file=/usr/share/apps/krita/scripts/torturepainting/torture-painting.rc
krita: Kross::Api::Module  created
krita: ScriptContainer::ScriptContainer() Ctor name=''
krita: ScriptGUIClient::loadScriptConfig file=/usr/share/apps/krita/scripts/torturefilters/torture-filters.rc
krita: Kross::Api::Module  created
krita: ScriptContainer::ScriptContainer() Ctor name=''
krita: ScriptGUIClient::loadScriptConfig file=/usr/share/apps/krita/scripts/randompaint/randompaint.rc
krita: Kross::Api::Module  created
krita: ScriptContainer::ScriptContainer() Ctor name=''
krita: ScriptGUIClient::loadScriptConfig file=/usr/share/apps/krita/scripts/reshapehisto/reshapehisto.rc
krita: Kross::Api::Module  created
krita: ScriptContainer::ScriptContainer() Ctor name=''
krita (plugins): found plugin Scriptplugin
krita (plugins): found plugin Afbeelding schuintrekken
krita (plugins): found plugin Filtergalerij
krita (plugins): found plugin Histogramplugin
krita (plugins): found plugin Waterkleur schilderplugin
krita (plugins): found plugin Grootte wijzigen en schalen van afbeelding
krita (plugins): found plugin Plugin voor afbeeldingrotatie
krita (plugins): found plugin Kleurbereik
krita (plugins): found plugin Conversie van kleurspectrum
krita (plugins): found plugin Plugin voor aparte kanalen
kparts: 0x87e9628 emitting activePartChanged 0x86e3d28
QLayout "unnamed" added to QWidget "unnamed", which already has a layout
kparts: ReadOnlyPart::guiActivateEvent -> file:///home/dik/Desktop/druppels/Scannen.tif
koffice (lib kofficecore): KoMainWindow::addRecentURL url=file:///home/dik/Desktop/druppels/Scannen.tif
koffice (lib kofficecore): [KoMainWindow pointer (0x87c7820) to widget krita-mainwindow#1, geometry=1016x733+0+0] Saving recent files list into config. instance()=0x8210338
krita (math): Histogram
krita (math): Logarithmic histogram
krita (math): Dumping channel 3
krita (math):
krita (math): Max: 0
krita (math): Min: 0
krita (math): High: 0
krita (math): Low: 0
krita (math): Mean: 0
krita (math): Total: 0
krita (math):


----> Krita hangs here, no CPU consumption <----
Comment 3 Halla Rempt 2006-11-03 11:31:56 UTC
The issue here is that when raw loading fails, Krita doesn't say anything, doesn't set the hourglass cursor back to the pointer cursor and doesn't have an image loaded. But krita doesn't hang: you can do everything. I'll see what I can do about it, but it's a tricky and fiddly business.
Comment 4 Halla Rempt 2008-09-30 16:44:32 UTC
The raw filter has been completely replaced.