Csound Csound-dev Csound-tekno Search About

[CSOUND-DEV:4972] RE: Diagnosing Csound5

Date2004-07-14 15:03
From"gogins@pipeline.com"
Subject[CSOUND-DEV:4972] RE: Diagnosing Csound5
backtrace or bt will print a stack trace. But if you have had a seg fault,
the stack may be blown away and bt may not tell you anything. In that case
you should set a breakpoint as close to the seg fault as possible and then
use the step command to approach the seg fault one line of code at a time.

You are running on what platform?

Original Message:
-----------------
From: stevenyi stevenyi@csounds.com
Date: Wed, 14 Jul 2004 01:44:29 -0700
To: csound-dev@eartha.mills.edu
Subject: [CSOUND-DEV:4964] Diagnosing Csound5


Hi all,

I've been working on my fluid wrapper tonight to get rid of underscores
and I found that csound5 was almost altogether busted for me, not
running in deferred or realtime.  I ran with --verbose flag and got this
last statement:

argoff array:
        0       1       24      1       2       1       25      1      
2      26       1       3       1       27      1       4       1      
37      1      38       1       5       1       39      1       5      
1       32      1      33       2       1       32      5       32     
33      33      5       5      34       2       1       32      5      
32      34      34      5       5      35       2       1       32     
5       32      35      35      5       5      36       2       1      
32      5       32      36      36      5       5      -9       1      
-4      1       -10     1       -5      1       -11     2      -9      
6       1       -12     1       -9      1       -13     3       -11   
-12      -9      1       -9      1       -13     1       -14     2      
-10    -15      1       -10     1       -16     3       -14     -15    
-10     1      -10      1       -16     1       -17     3       -9     
-3      -10     1      -18      1       -6      1       -19     1      
-18     1       -20     1      -7       1       -21     1       -8     
1       -22     1       5       1      -23      2       -9      -10    
1       -24     3       -23     -9      -10    -25      1       -24    
1       -26     2       -21     5       2       -26    -32768   1      
-27     2       -19     4       1       -28     2       -3     -29     
2       -19     4       1       -30     7       5       9       -29   
-28      -27     8       5       1       -63     7       -30     -17    
-25    -64      5       -63     11      10      5       5       1      
-65     5      -63      13      12      5       5       1       -66    
5       -63     14     10       5       5       1       -67     2      
15      -64     1       -68    -67      -65     1       -69     2      
15      -66     1       -70     2      -68      -69     1       -71    
2       16      -63     1       -72     2      -70      -71     1      
-73     4       -72     -63     17      5       1      -31      2      
-21     3       2       -31     -32767  1       -32     2      -19     
4       1       -33     2       -3      7       1       -34     2     
-19      4       1       -30     7       5       9       -34     -33    
-32    -35      2       3       -7      1       -36     2       -35    
-3      1      -37      2       -36     18      1       -38     2      
-7      -3      1      -39      7       -5      -38     -5      18     
-6      -37     -6      1      -63      7       -30     -39     -5     
5       3       5       5       1      -64      5       -63     11     
10      5       5       1       -65     5      -63      13      12     
5       5       1       -66     5       -63     14     10       5      
5       1       -74     2       15      -64     1       -75    -74     
-65     1       -76     2       15      -66     1       -77     2     
-75      -76     1       -78     2       16      -63     1       -79    
2      -77      -78     1       -73     4       -79     -63     17     
5       1      -40      2       -21     4       2       -40     -32766 
1       -41     2      -19      4       1       -42     2       -3     
19      1       -43     2      -19      4       1       -30     7      
5       9       -43     -42     -41    20       5       1       -73    
7       -30     -5      -5      5       21     -44      2       -20    
22      1       -45     2       -44     23      1      -20      1      
-45     1       -46     1       4       1       -47     2      -46     
4       1       -48     1       -20     1       -49     1       -20   
-50      2       -48     -49     1       -51     2       -47     -50    
1      -52      1       -51     1       -53     1       4       1      
-54     2      -53      4       1       -55     1       -20     1      
-56     1       -20    -57      2       -55     -56     1       -58    
2       -54     -57     1      -59      1       -58     1       -80    
2       -73     -52     1       -81    -80      1       -82     2      
-73     -59     1       -83     1       -82    -84      2       37     
-81     1       37      1       -84     1       -85    38       -83    
1       38      1       -85     4       32      33      -4     -5      
4       32      34      -4      -5      4       32      35      -4    
-5       4       32      36      -4      -5      2       -4      -5     
1      32       1       -6      2       -4      28      1       -4     
1       -6     -7       2       -5      28      1       -5      1      
-7      2       -4     -5
Csound tidy up: Segmentation fault

I'd like to run in gdb but wasn't sure what would be the best way to go
about it (I don't use gdb very regularly).  When I'm running gdb and get
a segfault like this, what command should I use to figure out where
things died?

Also, a separate question, what do using 0xffff, 0xfffe, 0xfffd, and
0xfffc mean for dsblksize in an OENTRY?  I came across this in entry2.c
while trying to remember parameters for OENTRY and I realized I never
understood exactly what this meant.  

Thanks,
steven





--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .

Date2004-07-14 18:48
Fromsteven yi
Subject[CSOUND-DEV:4977] RE: Diagnosing Csound5
Hi Michael,

I'm developing on Linux; bt last night didn't tell me much, though now 
that I think of it, I might have compiled csound with -O2 which I think 
obfuscates things for gdb.  I'm going to try using 'where' as suggested 
by John tonight and if not I think I'll place a breakpoint at the 
beginning of the main csound function and just step away until I find 
the segfault.

Thanks for the advice!
steven


gogins@pipeline.com wrote:
> backtrace or bt will print a stack trace. But if you have had a seg fault,
> the stack may be blown away and bt may not tell you anything. In that case
> you should set a breakpoint as close to the seg fault as possible and then
> use the step command to approach the seg fault one line of code at a time.
> 
> You are running on what platform?
>