View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0001997 | Scribus | OS-PPCOSX | public | 2005-05-16 13:36 | 2006-11-08 17:04 |
| Reporter | juh | Assigned To | avox | ||
| Priority | normal | Severity | crash | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Platform | Macintos | OS | OSX | OS Version | 10.4 |
| Product Version | 1.3 | ||||
| Fixed in Version | 1.3.2cvs | ||||
| Summary | 0001997: Scribus crashes when looking for ICC profile | ||||
| Description | Scribus crashes while trying to import an image (tried with png, tif and jpeg) into an empty document. Loading a 1.2 file with images works, and importing images into this old 1.2 file works too. | ||||
| Additional Information | Konsole tells me: lcms: Error 0012288; File '(null)' not found | ||||
| Tags | No tags attached. | ||||
| Attached Files | cms-readprofile.diff (1,812 bytes)
Index: scribus/scribus.cpp
===================================================================
RCS file: /cvs/Scribus/scribus/scribus.cpp,v
retrieving revision 1.228.2.331
diff -u -p -r1.228.2.331 scribus.cpp
--- scribus/scribus.cpp 25 May 2005 22:00:13 -0000 1.228.2.331
+++ scribus/scribus.cpp 26 May 2005 21:50:55 -0000
@@ -9314,7 +9387,7 @@ void ScribusApp::initCMS()
void ScribusApp::GetCMSProfilesDir(QString pfad)
{
#ifdef HAVE_CMS
- QDir d(pfad, "*.*", QDir::Name, QDir::Files | QDir::NoSymLinks);
+ QDir d(pfad, "*", QDir::Name, QDir::Files | QDir::Readable | QDir::Dirs | QDir::NoSymLinks);
if ((d.exists()) && (d.count() != 0))
{
QString nam = "";
@@ -9323,10 +9396,29 @@ void ScribusApp::GetCMSProfilesDir(QStri
for (uint dc = 0; dc < d.count(); ++dc)
{
- QFileInfo fi(pfad + d[dc]);
+ QFileInfo fi(pfad + "/" + d[dc]);
+ if (fi.isDir() && d[dc][0] != '.')
+ {
+ qDebug(QString("GetCMSProfiles: recursing into %2: %1").arg(fi.filePath()).arg(nam));
+ GetCMSProfilesDir(fi.filePath()+"/");
+ continue;
+ }
+#ifdef QT_MAC
+ QFile f(fi.filePath());
+ QByteArray bb(40);
+ if (!f.open(IO_ReadOnly)) {
+ qDebug(QString("couldn't open %1 as ICC").arg(fi.filePath()));
+ continue;
+ }
+ f.readBlock(bb.data(), 40);
+ f.close();
+ if (bb[36] == 'a' && bb[37] == 'c' && bb[38] == 's' && bb[39] == 'p')
+#else
QString ext = fi.extension(false).lower();
if ((ext == "icm") || (ext == "icc"))
+#endif
{
+ qDebug(QString("GetCMSProfiles: reading profile %1").arg(fi.filePath()));
hIn = cmsOpenProfileFromFile(pfad + d[dc], "r");
if (hIn == NULL)
continue;
@@ -9360,6 +9452,7 @@ void ScribusApp::GetCMSProfilesDir(QStri
}
}
#endif
+ qDebug("GetCMSProfile: done");
}
void ScribusApp::RecalcColors(QProgressBar *dia)
| ||||
| Patch | |||||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2005-05-16 13:36 | juh | New Issue | |
| 2005-05-16 17:31 |
|
Assigned To | => avox |
| 2005-05-16 17:31 |
|
Status | new => assigned |
| 2005-05-26 18:45 | mhanski | Relationship added | related to 0002015 |
| 2005-05-26 20:33 | avox | Note Added: 0004794 | |
| 2005-05-26 20:34 | avox | File Added: cms-readprofile.diff | |
| 2005-06-06 11:48 | cbradney | Category | Default => MacOSX |
| 2005-10-03 19:39 | avox | Status | assigned => resolved |
| 2005-10-03 19:39 | avox | OS | => OSX |
| 2005-10-03 19:39 | avox | OS Version | => 10.4 |
| 2005-10-03 19:39 | avox | Platform | => Macintos |
| 2005-10-03 19:39 | avox | Build | => aqua-prealpha |
| 2005-10-03 19:39 | avox | Fixed in Version | => 1.3.2cvs |
| 2005-10-03 19:39 | avox | Summary | Scribus native Aqua Build on Tiger Mac OS X 1.4 => Scribus crashes when looking for ICC profile |
| 2005-10-10 22:41 | avox | Status | resolved => closed |
| 2006-11-08 17:03 | avox | Status | closed => resolved |
| 2006-11-08 17:03 | avox | Resolution | open => fixed |
| 2006-11-08 17:03 | avox | Status | resolved => closed |
| 2014-10-08 18:38 | Kunda | Category | PPCOSX => OS-PPCOSX |