Version: 1.1.0_devel (using KDE KDE 3.3.2) Installed from: Slackware Packages OS: Linux d2asc segfaults any time you try and extract any dirfile data. It segfaults before any data is extracted. This is true with d2asc from kst 1.0.0 as well as recent cvs.
CVS commit by staikos: Fix most of the dirfile crash problems, but not all of it. It crashes on exit now. CCBUG: 96039 M +32 -0 d2asc.cpp 1.18 --- kdeextragear-2/kst/kst/d2asc.cpp #1.17:1.18 @@ -1,7 +1,28 @@ +/*************************************************************************** + d2asc.cpp + ------------------- + begin : Tue Aug 22 13:46:13 CST 2000 + copyright : (C) 2000 by Barth Netterfield + email : + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + #include <stdlib.h> // atoi +#include <kconfig.h> #include <kinstance.h> +// hack to make main() a friend of kstdatasource +#define protected public #include "kstrvector.h" #include "kstdatacollection.h" +#undef protected void Usage() { @@ -12,9 +33,20 @@ void Usage() { } + +static void exitHelper() { + KST::vectorList.clear(); + KST::scalarList.clear(); + KST::dataObjectList.clear(); +} + int main(int argc, char *argv[]) { + atexit(exitHelper); KInstance inst("d2asc"); KstDataSourcePtr file; int i; + KConfig *kConfigObject = new KConfig("kstdatarc", false, false); + KstDataSource::setupOnStartup(kConfigObject); + char field_list[40][120], filename[180]; bool do_hex[40];
CVS commit by staikos: the rest of the crashes in d2asc BUG: 96039 M +0 -1 d2asc.cpp 1.19 --- kdeextragear-2/kst/kst/d2asc.cpp #1.18:1.19 @@ -103,5 +103,4 @@ int main(int argc, char *argv[]) { /** make vectors and fill the list **/ QPtrList<KstRVector> vlist; - vlist.setAutoDelete(true); for (i=0; i<n_field; i++) {