473,386 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Core Dump in Deleting STL [stlport4] vector

I am having problem with an application which core dumps while deleting
a vector
here is the snippet :

Event_Node_t struct defined in the header :

+++++++++++++++++++++++++++++++++++++
struct Event_Node_t
{
int id : 24;
int frame : 3;
unsigned is_first_start : 1;
unsigned disqualified : 1;
unsigned truncated : 1;
Event_t e_type;
int pos, pwm_sep;
// pos is the last base of the codon, numbered starting at 1
double score, pwm_score;
Event_Node_t * frame_pred;
Event_Node_t * best_pred;

Event_Node_t () // default constructor
{ is_first_start = disqualified = truncated = 0; }

void Set_Frame_From_Pos
(void);
};

+++++++++++++++++++++++++++++++++++++++++++++++

In the CC file

static Event_Node_t * Last_Event [6];

//Last_Event initialized

Initialize_Terminal_Events(First_Event, Final_Event, Best_Event,
Last_Event);

//function definition

static void Initialize_Terminal_Events(Event_Node_t & first_event,
Event_Node_t & final_event,
Event_Node_t * best_event [6], Event_Node_t * last_event [6])

// Set up first_event and final_event and make all
// entries in best_event and last_event point to
// first_event .

{
int i;

first_event . e_type = INITIAL;
first_event . pos = 0;
first_event . score = 0.0;
first_event . best_pred = NULL;
first_event . frame_pred = NULL;

for (i = 0; i < 6; i ++)
last_event [i] = best_event [i] = & first_event;

final_event . e_type = TERMINAL;
final_event . frame_pred = NULL;

return;
}
+++++++++++++++++++

A few operations done on the Last_Event

+++++++++++++++++++++

Clear_Events()

Definition :

static void Clear_Events(void)

// Free memory in chains pointed to by Last_Event . Note that
// the initial event is not dynamically allocated (it's the global
// variable First_Event ) so it is not cleared.

1>{
2 Event_Node_t * p, * q;
3 int i;
4 printf("inside clear events \n");
5 for (i = 0; i < 6; i ++)
6 for (p = Last_Event [i]; p != NULL && p -e_type !=
INITIAL; p = q) {
7 q = p -frame_pred;
8 delete p;
9 }
10>
11 return;
}
The program core dump during Last_Event[0] is deleted after a no. of
iterations in the loop at line 6 mentioned above . I Am not sure if
this issue is very much
related to the article posted here :

http://www.core-dump.com.hr/?q=node/129

The program is compiled with Sunpro CC compiler with stlport4 libraries

CC -o ../bin/jimmer3 ../obj/jimmer3.o -library=stlport4 -lm -L ../lib
-lGLMicm -lGLMcommon

The earlier problem was that when compiling the program with native
libCstd , it had a huge performence lag. so i opted to compile it with
stlport4

Kindly help me out on this.

Thanx in advance

Simon

Sep 19 '06 #1
1 2032
simon wrote:

I am having problem with an application which core dumps while deleting
a vector
I've reviewed your code, and see no vector.
here is the snippet :
[snipped]
The earlier problem was that when compiling the program with native
libCstd , it had a huge performence lag. so i opted to compile it with
stlport4
What are you using from the Standard Library?

Best regards,

Tom

Sep 19 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Ganesh Gella | last post by:
Hi All, I am using g++ on Linux, and my code has lot of vectors each stores a particualr type of structure. (Structure internally had some vectors). When I am trying to push_back an element to...
10
by: ken | last post by:
hello, i'm writing a c program on a linux system. i'm debugging a segmentation fault but i don't want it to dump a core file because the memory footprint of the program is over 300Mb and i don't...
10
by: John Liu | last post by:
We upgraded from 7.2 to 7.4, it looks like everything working, but when I issue a query such as select * from tab (tab has about 2-3 million records), it causes core dump. I tuned some the...
3
by: John Liu | last post by:
AIX pg version 7.4 Select * from document2 core dump. Did a few more experiments with select * from document2 limit... I limit to 500000 it works, 600000 it exits but says "calloc:...
7
by: Rylan | last post by:
I'm writing a program that uses a vector of classes for storing information from a file. Unfortunately, my program causes a core dump upon attempting to add a second item to the vector. Any...
10
by: wong_powah | last post by:
I want to find out where (which line) my C program core dump. How to do that? Is there a web site describing the procedure? One approach is to use stack trace of the mdb debugger, but I does not...
8
by: Rakesh | last post by:
Hi - What is wrong this implementation? I get a core dump at the free() statement? Thanks Rakesh #include <ext/hash_map> #include <iostream.h> #include <ext/hash_set>
14
by: Sheldon | last post by:
Hi, I have a python script that uses a C extention. I keep getting a recurring problem that causes a core dump a few lines after the C extention return data back tp python. I tried using pbd and...
4
by: Akila | last post by:
My application is built on sun solaris 9.0. 5.9 Generic_118558-26 sun4u sparc SUNW,Sun-Fire-V210 compiler : Sun C++ 5.5 Patch 113817-14 2005/07/19 I am creating a vector of int at the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.