the stack overflow in parse_wu_header a history
--------------------------------------
I set a break at seti_header.cpp line 251
251 buffer += buf;
after the break buffer shows
<workunit_header>
<name>01mr99ab.14893.2848.703400.3.151</name>
<group_info>
<tape_info>
<name>01mr99ab</name>
<start_time>2451239.5778227</start_time>
<last_block_time>2451239.5778227</last_block_time>
<last_block_done>2848</last_block_done>
<missed>0</missed>
<tape_quality>0</tape_quality>
<sb_id>0</sb_id>
</tape_info>
<name>01mr99ab.14893.2848.703400.3</name>
<data_desc>
<start_ra>8.3103311246938</start_ra>
<start_dec>27.91552777321</start_dec>
<end_ra>8.3542955650728</end_ra>
<end_dec>27.83540577987</end_dec>
<true_angle_range>0.60488405578199</true_angle_range>
<time_recorded>Tue Mar 2 01:52:05 1999</time_recorded>
<time_recorded_jd>2451239.5778356</time_recorded_jd>
<nsamples>1048576</nsamples>
<coords>
<coordinate_t>
<time>2451239.5778356</time>
<ra>8.3103311246938</ra>
<dec>27.91552777321</dec>
</coordinate_t>
<coordinate_t>
<time>2451239.5778934</time>
<ra>8.3125413024574</ra>
<dec>27.911197182893</dec>
</coordinate_t>
<coordinate_t>
<time>2451239.5779514</time>
<ra>8.3147416668476</ra>
<dec>27.90693256333</dec>
</coordinate_t>
<coordinate_t>
<time>2451239.5780093</time>
<ra>8.3169450560065</ra>
<dec>27.902621906048</dec>
</coordinate_t>
<coordinate_t>
<time>2451239.578067</time>
<ra>8.3191452260533</ra>
<dec>27.898298175788</dec>
</coordinate_t>
<coordinate_t>
<time>2451239.578125</time>
<ra>8.3213405864986</ra>
<dec>27.894014752898</dec>
</coordinate_t>
<coordinate_t>
<time>2451239.5781829</time>
<ra>8.3217405142933</ra>
<dec>27.899328820752</dec>
</coordinate_t>
<coordinate_t>
<time>2451239.5782407</time>
<ra>8.3236184661523</ra>
<dec>27.896734172274</dec>
</coordinate_t>
<coordinate_t>
<time>2451239.5782985</time>
<ra>8.325834215088</ra>
<dec>27.892305831529</dec>
</coordinate_t>
<coordinate_t>
<time>2451239.5783565</time>
<ra>8.3280041431626</ra>
<dec>27.888138576843</dec>
</coordinate_t>
<coordinate_t>
<time>2451239.5784144</time>
<ra>8.3302006840738</ra>
<dec>27.883798135736</dec>
</coordinate_t>
<coordinate_t>
<time>2451239.5784721</time>
<ra>8.332395258493</ra>
<dec>27.879438073973</dec>
</coordinate_t>
<coordinate_t>
<time>2451239.5785301</time>
<ra>8.3345999455565</ra>
<dec>27.875038063474</dec>
</coordinate_t>
<coordinate_t>
<time>2451239.5785878</time>
<ra>8.3367837326947</ra>
<dec>27.870706325634</dec>
</coordinate_t>
<coordinate_t>
<time>2451239.5786457</time>
<ra>8.3389835210763</ra>
<dec>27.866287225636</dec>
</coordinate_t>
<coordinate_t>
<time>2451239.5787037</time>
<ra>8.3411633518307</ra>
<dec>27.861977834223</dec>
</coordinate_t>
<coordinate_t>
<time>2451239.5787615</time>
<ra>8.3433656733927</ra>
<dec>27.857498886392</dec>
</coordinate_t>
<coordinate_t>
<time>2451239.5788193</time>
<ra>8.3455480635596</ra>
<dec>27.853130175559</dec>
</coordinate_t>
<coordinate_t>
<time>2451239.5788773</time>
<ra>8.3477402284459</ra>
<dec>27.848707725239</dec>
</coordinate_t>
<coordinate_t>
<time>2451239.5789352</time>
<ra>8.3499266964689</ra>
<dec>27.844286361793</dec>
</coordinate_t>
<coordinate_t>
<time>2451239.5789929</time>
<ra>8.3521124345577</ra>
<dec>27.839838544895</dec>
</coordinate_t>
<coordinate_t>
<time>2451239.5790508</time>
<ra>8.3542955650728</ra>
<dec>27.83540577987</dec>
</coordinate_t>
</coords>
</data_desc>
<receiver_cfg>
<s4_id>1</s4_id>
<name>ao1420</name>
<beam_width>0.0829999968</beam_width>
<center_freq>1420</center_freq>
<latitude>18.3538056</latitude>
<longitude>-66.7552222</longitude>
<elevation>497</elevation>
<diameter>168</diameter>
<az_orientation>0</az_orientation>
<az_corr_coeff length=49 encoding="x-csv">
7.4,5.4,-49.1,-1091,0,0,0,0,0,0,0,0,0
</az_corr_coeff>
<zen_corr_coeff length=53 encoding="x-csv">
-5146.7,66.1,14.3,321.7,0,0,0,0,0,0,0,0,0
</zen_corr_coeff>
</receiver_cfg>
<recorder_cfg>
<name>sah_ao1420</name>
<bits_per_sample>2</bits_per_sample>
<sample_rate>2500000</sample_rate>
<beams>1</beams>
<version>1.39999998</version>
</recorder_cfg>
<splitter_cfg>
<version>0.170000002</version>
<data_type>encoded</data_type>
<fft_len>2048</fft_len>
<ifft_len>8</ifft_len>
<filter>fft</filter>
<window>welsh</window>
</splitter_cfg>
<analysis_cfg>
<spike_thresh>24</spike_thresh>
<spikes_per_spectrum>1</spikes_per_spectrum>
<gauss_null_chi_sq_thresh>2.23918462</gauss_null_chi_sq_thresh>
<gauss_chi_sq_thresh>1.41999996</gauss_chi_sq_thresh>
<gauss_power_thresh>3</gauss_power_thresh>
<gauss_peak_power_thresh>3.20000005</gauss_peak_power_thresh>
<gauss_pot_length>64</gauss_pot_length>
<pulse_thresh>19.7613773</pulse_thresh>
<pulse_display_thresh>0.5</pulse_display_thresh>
<pulse_max>40960</pulse_max>
<pulse_min>16</pulse_min>
<pulse_fft_max>8192</pulse_fft_max>
<pulse_pot_length>256</pulse_pot_length>
<triplet_thresh>8.76140499</triplet_thresh>
<triplet_max>131072</triplet_max>
<triplet_min>16</triplet_min>
<triplet_pot_length>256</triplet_pot_length>
<pot_overlap_factor>0.5</pot_overlap_factor>
<pot_t_offset>1</pot_t_offset>
<pot_min_slew>0.00209999993</pot_min_slew>
<pot_max_slew>0.0104999999</pot_max_slew>
<chirp_resolution>0.333</chirp_resolution>
<analysis_fft_lengths>262136</analysis_fft_lengths>
<bsmooth_boxcar_length>8192</bsmooth_boxcar_length>
<bsmooth_chunk_size>32768</bsmooth_chunk_size>
<chirps>
<chirp_parameter_t>
<chirp_limit>1</chirp_limit>
<fft_len_flags>262136</fft_len_flags>
</chirp_parameter_t>
<chirp_parameter_t>
<chirp_limit>2.5</chirp_limit>
<fft_len_flags>65528</fft_len_flags>
</chirp_parameter_t>
</chirps>
<pulse_beams>1</pulse_beams>
<max_signals>30</max_signals>
<max_spikes>8</max_spikes>
<max_gaussians>0</max_gaussians>
<max_pulses>0</max_pulses>
<max_triplets>0</max_triplets>
<keyuniq>-12348</keyuniq>
</analysis_cfg>
<sb_id>0</sb_id>
</group_info>
<subband_desc>
<number>151</number>
<center>1418978879.8359</center>
<base>1418974607.375</base>
<sample_rate>9765.625</sample_rate>
</subband_desc>
<sb_id>0</sb_id>
</workunit_header>
------------------------------------------------------------------------
next statements are
252
253 if ( wu ) delete wu;
254 wu = new workunit( buffer ); //seti_britta:
here I have a problemif line 254 executed we come to dbgnew.cpp line 50
50{
51 /* _nh_malloc_dbg already calls _heap_alloc_dbg in a loop and calls _callnewh
52 if the allocation fails. If _callnewh returns (very likely because no
53 new handlers have been installed by the user), _nh_malloc_dbg returns NULL.
54 */
55
void *res = _nh_malloc_dbg( cb, 1, nBlockUse, szFileName, nLine ); RTCCALLBACK(_RTC_Allocate_hook, (res, cb, 0));
/* if the allocation fails, we throw std::bad_alloc */
if (res == 0)
{
static const std::bad_alloc nomem;
_RAISE(nomem);
}
return res;
}
---------------------------------------------------------------------------------------
if we execute line 55 we come to dbgheap.c line 294
294{
295 int errno_tmp = 0;
296
void * pvBlk = _nh_malloc_dbg_impl(nSize, nhFlag, nBlockUse, szFileName, nLine, &errno_tmp); if ( pvBlk == NULL && errno_tmp != 0 && _errno())
{
errno = errno_tmp; // recall, #define errno *_errno()
}
return pvBlk;
}
-----------------------------------------------------
if we execute line 296 we goto dbgheap.c line 232
232{{
void * pvBlk;
for (;
{
/* do the allocation
*/
239
pvBlk = _heap_alloc_dbg_impl(nSize, nBlockUse, szFileName, nLine, errno_tmp);we came back and run into dbgheao.c line 296
296
void * pvBlk = _nh_malloc_dbg_impl(nSize, nhFlag, nBlockUse, szFileName, nLine, &errno_tmp);if we execute we come to dbgnew.cpp line 55
55
void *res = _nh_malloc_dbg( cb, 1, nBlockUse, szFileName, nLine );if we execute we came back to seti_header.cpp line 254
254wu = new workunit( buffer ); //seti_britta:here I have a problemif we execute with F10 it switches to sah_gfx.cpp line 287
286 ra_string( wu.start_ra, ra_buf );
287
dec_string( wu.start_dec, dec_buf ); <--- here it crashes sprintf(
buf,
"From: %s, %s\nRecorded on: %s\nRecorded at: %s\nBase frequency: %.9f GHz",
ra_buf,
dec_buf,
short_jd_string( wu.time_recorded ),
locations[s4_id],
wu.subband_base / 1e9 );
}
-----------------------------------------------------------------------------------------------------------------
> seti_boinc.exe!SAH_GRAPHICS::get_data_info_string(char * buf=0x044360d8) Line 287 + 0x21 bytes C++
First-chance exception at 0x7c93a321 in seti_boinc.exe: 0xC00000FD: Stack overflow.
First-chance exception at 0x7c812a7b in seti_boinc.exe: Microsoft C++ exception: std::bad_alloc at memory location 0x000337e4..
First-chance exception at 0x7c91eddd in seti_boinc.exe: 0xC0000005: Access violation writing location 0x00030ffc.
Unhandled exception at 0x7c91eddd in seti_boinc.exe: 0xC0000005: Access violation writing location 0x00030ffc.
--------------------
dec_buf ---->looks like well prepared
sb_id>
</group_info>
<subband_desc>
<number>151</number>
<center>1418978879.8359</center>
<base>1418974607.375</base>
<sample_rate>9765.625</sample_rate>
</subband_desc>
<sb_id>0</sb_id>
</workunit_header>
------------------------------------------------------------------
but wu looks bad --->
- wu {data_type=??? data_class=??? splitter_version=??? ...} SETI_WU_INFO
track_mem<SETI_WU_INFO> {...} track_mem<SETI_WU_INFO>
data_type CXX0030: Error: expression cannot be evaluated
data_class CXX0030: Error: expression cannot be evaluated
splitter_version CXX0030: Error: expression cannot be evaluated
start_ra CXX0030: Error: expression cannot be evaluated start_dec CXX0030: Error: expression cannot be evaluated
end_ra CXX0030: Error: expression cannot be evaluated
end_dec CXX0030: Error: expression cannot be evaluated
angle_range CXX0030: Error: expression cannot be evaluated
true_angle_range CXX0030: Error: expression cannot be evaluated
time_recorded CXX0030: Error: expression cannot be evaluated
subband_center CXX0030: Error: expression cannot be evaluated
subband_base CXX0030: Error: expression cannot be evaluated
subband_sample_rate CXX0030: Error: expression cannot be evaluated
fft_len CXX0030: Error: expression cannot be evaluated
ifft_len CXX0030: Error: expression cannot be evaluated
subband_number CXX0030: Error: expression cannot be evaluated
+ receiver_cfg {id=??? s4_id=??? name=0x2f3c2130 <Bad Ptr> ...} receiver_config
nsamples CXX0030: Error: expression cannot be evaluated
bits_per_sample CXX0030: Error: expression cannot be evaluated
+ position_history ... std::_Vector_const_iterator<coordinate_t,std::allocator<coordinate_t> >
num_positions CXX0030: Error: expression cannot be evaluated
+ tape_version 0x2f3c2290 <Bad Ptr> char [16]
+ analysis_cfg {id=??? spike_thresh=??? spikes_per_spectrum=??? ...} analysis_config
num_fft_lengths CXX0030: Error: expression cannot be evaluated
+ analysis_fft_lengths 0x2f3c2384 int [32]
beam_width CXX0030: Error: expression cannot be evaluated
+ chirp_fft_table 0x2f3c2410 {MaxChirpRate=??? DoFft=0x2f3c2418 <Bad Ptr> } ChirpFftTable_t [2]
wu CXX0030: Error: expression cannot be evaluated ----------------------------------------------------------------------------------------------------------------------------
I have no idea why wu is not allocated
your hints are welcome
heinz