Version: 0.99-devel (using KDE KDE 3.2.1) Installed from: RedHat RPMs OS: Linux kst will crash (sig 11) when you try to select an indirect data file when the indirect data file points to an existing file with zero size. how to reproduce: create an empty file (touch a.txt); create an indirect file pointing to a.txt (echo "a.txt" > a.cur); point kst to this a.cur file. expected behavior: kst doesn't crash, and doesn't let you use the file for data (which it does do correctly if you point it directly to the zero length file).
#0 QString::deref (this=0x64) at tools/qstring.cpp:1523 #1 0x0ee5f5bc in QString::operator= (this=0x64, s=@0x7fffe428) at tools/qstring.cpp:1568 #2 0x0fed1ed4 in findPluginFor (filename=@0x7fffe548, type=@0x0) at kstdatasource.cpp:60 #3 0x0fed2178 in KstDataSource::loadSource (filename=@0x7fffe548, type=@0x1018e7b4) at kstdatasource.cpp:213 #4 0x100a1488 in KstVectorDialogI::updateCompletion (this=0x103c4b90) at kstvectordialog_i.cpp:96
CVS commit by staikos: indirect plugin requires the ability to return null from the factory, so it needs to be handled CCMAIL: 85593-done@bugs.kde.org M +3 -1 kstdatasource.cpp 1.24 --- kdeextragear-2/kst/kst/kstdatasource.cpp #1.23:1.24 @@ -58,5 +58,7 @@ namespace KST { //kdDebug() << "Trying to create " << filename << " type=" << type << " with " << service->property("Name").toString() << endl; KstDataSource *ds = (sym)(filename, type); + if (ds) { ds->_source = service->property("Name").toString(); + } //kdDebug() << (ds ? "SUCCESS" : "FAILED") << endl; return ds;