Summary: | crash - no user input, no new data, full on kst crash | ||
---|---|---|---|
Product: | [Applications] kst | Reporter: | Matthew Truch <matt> |
Component: | general | Assignee: | kst |
Status: | RESOLVED FIXED | ||
Severity: | crash | ||
Priority: | NOR | ||
Version: | 1.x | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Matthew Truch
2003-09-26 10:22:41 UTC
Subject: Re: [Kst] New: crash - no user input, no new data, full on kst crash On Friday 26 September 2003 04:22, Matthew Truch wrote: > Backtrace as below. > > No user input to kst (it was in another virtual desktop) at the time of the > crash. There was no live data coming into kst, in fact, blastcom may have > been restarted when it happened (exact timing unknown). > > There were 3 other kst's running, which did not crash. > > I'm sorry I don't know any more. > > [New Thread 1098147776 (LWP 2840)] > 0xffffe002 in ?? () > #0 0xffffe002 in ?? () > #1 0x406c957d in KCrash::defaultCrashHandler(int) () > from /usr/lib/libkdecore.so.4 > #2 <signal handler called> > #3 0x0805d026 in GetNFrames () > #4 0x080a0b58 in KstFile::dirfileUpdate() () Can you recompile with debug? Run ./configure --enable-debug --prefix=/wherever , make clean, make install. Then the backtrace will have more information. This could be related to my fix for the disappearing KstFiles, but without a line number it's hard to know exactly what went wrong. Subject: kdeextragear-2/kst/kst CVS commit by staikos: Ah this could be the reason. Does this patch help? CCMAIL: 64977@bugs.kde.org M +8 -7 getdata.c 1.10 --- kdeextragear-2/kst/kst/getdata.c #1.9:1.10 @@ -268,5 +268,5 @@ struct FormatType *GetFormat(const char sprintf(format_file,"%s/format", filedir); fp = fopen(format_file, "r"); - if (fp ==NULL) { + if (fp == NULL) { *error_code = GD_E_OPEN_FORMAT; Formats.n--; /* no need to free. The next realloc will just do nothing */ @@ -1327,5 +1327,5 @@ int GetData(char *filename_in, char *fie if (filename[strlen(filename)-1]=='/') filename[strlen(filename)-1]='\0'; F = GetFormat(filename, error_code); - if (*error_code!=GD_E_OK) { + if (!F || *error_code != GD_E_OK) { return(0); } @@ -1364,9 +1364,9 @@ int GetNFrames(char *filename_in, int *e if (filename[strlen(filename)-1]=='/') filename[strlen(filename)-1]='\0'; F = GetFormat(filename, error_code); - if (*error_code!=GD_E_OK) { + if (*error_code != GD_E_OK) { return(0); } - if (F->n_raw==0) { + if (!F || F->n_raw==0) { *error_code = GD_E_FORMAT; return(0); @@ -1382,6 +1382,7 @@ int GetNFrames(char *filename_in, int *e (F->rawEntries[0].size*F->rawEntries[0].samples_per_frame); - nf-=2; - if (nf<0) nf = 0; + nf -= 2; + if (nf < 0) + nf = 0; return(nf); } @@ -1411,5 +1412,5 @@ int GetSamplesPerFrame(char *filename_in } - if (F->n_raw==0) { + if (!F || F->n_raw==0) { *error_code = GD_E_FORMAT; return(0); Please reopen if you consider to experience crashes with the patch applied. Be sure to include a backtrace with --enable-debug. Thank you. |