Bug 145050 - Crash on exit when using fits based data source
Summary: Crash on exit when using fits based data source
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-04 22:06 UTC by Netterfield
Modified: 2007-05-08 20:30 UTC (History)
0 users

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


Attachments
backtrace from the crash (769 bytes, text/plain)
2007-05-04 22:09 UTC, Netterfield
Details
145050.badpatch (1.09 KB, text/x-diff)
2007-05-05 08:59 UTC, Netterfield
Details
patch_tsk_20070505_healpix_metadata (755 bytes, text/x-diff)
2007-05-05 20:16 UTC, Ted Kisner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Netterfield 2007-05-04 22:06:46 UTC
Version:           1.4.0 (using KDE 3.5.6, Kubuntu (feisty) 4:3.5.6-0ubuntu14)
Compiler:          Target: i486-linux-gnu
OS:                Linux (i686) release 2.6.20-15-generic

Crash on exit after reading a fits based data source.

kst -z 1 b2kf151smooth42am.fits

then exit.
crash.

I will attach a data file, and the backtrace.
Comment 1 Netterfield 2007-05-04 22:09:02 UTC
Created attachment 20485 [details]
backtrace from the crash
Comment 2 Netterfield 2007-05-05 08:59:38 UTC
Here is a patch which stops the crash by removing the removal of metadata 
strings from the destructor.

This could be thought of as a clue more than a patch.

This bug is important for 1.4.0.

Eli?


Created an attachment (id=20487)
145050.badpatch
Comment 3 Ted Kisner 2007-05-05 20:16:08 UTC
I have confirmed that the attached patch, which disables populating the 
metadata, fixes the crash for the healpix datasource.  This is probably 
cleaner than disabling the destruction of all metadata.  I do not know if 
this problem arises from other datasources that populate the metadata...

-Ted

On Friday 04 May 2007 23:58, Barth Netterfield wrote:
> Here is a patch which stops the crash by removing the removal of metadata
> strings from the destructor.
>
> This could be thought of as a clue more than a patch.
>
> This bug is important for 1.4.0.
>
> Eli?



Created an attachment (id=20490)
patch_tsk_20070505_healpix_metadata
Comment 4 George Staikos 2007-05-05 22:48:35 UTC
On 5-May-07, at 2:58 AM, Barth Netterfield wrote:

> Here is a patch which stops the crash by removing the removal of  
> metadata
> strings from the destructor.
>
> This could be thought of as a clue more than a patch.
>
> This bug is important for 1.4.0.


    We have to figure out why it's crashing.  I don't think we can  
just leave them in there.  I will investigate shortly.

--
George Staikos
KDE Developer				http://www.kde.org/
Staikos Computing Services Inc.		http://www.staikos.net/
Comment 5 George Staikos 2007-05-08 15:46:48 UTC
SVN commit 662516 by staikos:

Another case of variable declarations in the wrong place causing subtle bugs.
If the object lives beyond the scope it was supposed to be in we end up with
an object destruction order problem.
BUG: 145050


 M  +1 -2      main.cpp  


--- trunk/extragear/graphics/kst/src/kst/main.cpp #662515:662516
@@ -382,7 +382,6 @@
     KstApp *kst = new KstApp;
     InType in;
     QColor color;
-    KstDataSourcePtr file;
     QCStringList ycolList;
     QCStringList matrixList;
     QCStringList yEqList;
@@ -514,7 +513,7 @@
         } else {
           fullPath = args->arg(i_file);
         }
-        file = KstDataSource::loadSource(fullPath);
+        KstDataSourcePtr file = KstDataSource::loadSource(fullPath);
         if (file) {
           if (!file->isValid() || file->isEmpty()) {
             kstdError() << i18n("No data in file %1.  Trying to continue...").arg(args->arg(i_file)) << endl;
Comment 6 Andrew Walker 2007-05-08 20:30:06 UTC
SVN commit 662612 by arwalker:

CCBUG:145050 Forward port from 1.4

 M  +3 -2      main.cpp  


--- branches/work/kst/1.5/kst/src/kst/main.cpp #662611:662612
@@ -383,7 +383,6 @@
     KstApp *kst = new KstApp;
     InType in;
     QColor color;
-    KstDataSourcePtr file;
     QCStringList ycolList;
     QCStringList matrixList;
     QCStringList yEqList;
@@ -517,7 +516,9 @@
         } else {
           fullPath = args->arg(i_file);
         }
-        file = KstDataSource::loadSource(fullPath);
+
+        KstDataSourcePtr file = KstDataSource::loadSource(fullPath);
+
         if (file) {
           if (!file->isValid() || file->isEmpty()) {
             kstdError() << i18n("No data in file %1.  Trying to continue...").arg(args->arg(i_file)) << endl;