Sponsored Content
Full Discussion: Core dump error in code
Top Forums Programming Core dump error in code Post 302559767 by uday.sena.m on Wednesday 28th of September 2011 05:23:28 AM
Old 09-28-2011
Data

Getting same error bus error(core dump ) at the same location please help me

Code:
while (fgets(strLine, MAX_LINELEN, vobjFile) != NULL && feof(vobjFile) == 0) {

                /* Only consider STL or BLANK messages */

                if((strcmp(strLine, "BEGINTRANS\n") != 0) && (strcmp(strLine, "ENDTRANS\n") != 0)) {
                                continue;
                        }

                        /* Decode a single line in file LOG.stq.stdout.DDMonYY */
                _ParseReplyMessage(strLine, &objCountersInMessage); //Getting the error here :wall:


And the code of this function is

Code:
static void _ParseReplyMessage(const char *vstrLine, CountersInMessage *robjCountersInMessage)
{
        static const char *strRoutine = "_ParseReplyMessage";
        char strHHMMSS[9] = "";
        char strTransName[100];
        const char *tsstr;
        int intMSS = -1;

        _CountersInMessageInitialize(robjCountersInMessage);
        /*_FindTransactionDetails(vstrLine, &robjFindTransDetail);*/
        printf("Initial stage\n");
        if(strstr(vstrLine, "NEWOLUF2") !=0)
                tsstr = strstr( vstrLine, "Input <");
                sscanf( tsstr, "Input <%8s", &strTransName);
        strcpy(robjCountersInMessage->strTransactionName[LEN_TRANS_NAME], strTransName);

        tsstr=strstr(vstrLine, "Timestamp");
        sscanf(tsstr, "Timestamp <%[^>]>", strHHMMSS);
        robjCountersInMessage->intTimestamp = _ConvertTimestamp(strHHMMSS);
        if (strncmp(vstrLine, "Elapsetime", 10) == 0)
                sscanf( vstrLine, "Elapsetime <%d>", &intMSS);
        robjCountersInMessage->intProcTime = intMSS;
      objCounterInMessage->intProcTime = intMSS;
 }

Please help me in finding it and what is the error means exactly in this programe and y it is coming like this.

Thank you in advance.

Moderator's Comments:
Mod Comment Video tutorial on how to use code tags in The UNIX and Linux Forums.

Last edited by radoulov; 10-06-2011 at 12:37 PM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

help, what is the difference between core dump and panic dump?

help, what is the difference between core dump and panic dump? (1 Reply)
Discussion started by: aileen
1 Replies

2. UNIX for Dummies Questions & Answers

core dump

does any one have read a core dump? is there any reader for that? or may i know what is the use of that core which takes sometimes memory in GBs? :) (6 Replies)
Discussion started by: sskb
6 Replies

3. Programming

about core dump

MY friends: my program under sco unix have a problem? it create a core dump file on the path when execute program , but i can't find the error of the C program ,i don't know how to see the error about my program use core, please help me or give me some suggest and what tools can use... (1 Reply)
Discussion started by: zhaohaizhou
1 Replies

4. UNIX for Advanced & Expert Users

core dump

Hi All, i am new to this forum.i want detail of reading the core file and trace the problem because of what the program get crashed.please help me.if any body knows any website or tutoril plese let me know. sudhir (6 Replies)
Discussion started by: sudhir patnaik
6 Replies

5. UNIX for Advanced & Expert Users

Core Dump

Hello all, Iam new to unix while executing java program which finely working in windows know iam testing with unix ,but in unix while executing iam getting core dump, my application is in client server environment and it is menu drivrn application on clicking options no problem but after some time... (1 Reply)
Discussion started by: vinp
1 Replies

6. Programming

core dump

how to view core dumped file using gdb and how to extract information from the coredumped file.can we get similar information from the other utilites like strace or ptrace. (2 Replies)
Discussion started by: Manabhanjan
2 Replies

7. AIX

Core dump

Hi , I want to read core dump file on AIX5.3. While i am trying to use following commands, i am getting only few lines of information. ux201p3:e46123> dbx capsWrkstnMgr core Type 'help' for help. reading symbolic information ... Segmentation fault in malloc_common.extend_brk at... (1 Reply)
Discussion started by: rps
1 Replies

8. Shell Programming and Scripting

Unable to catch the output after core dump and bus error

I have a weird situation in which the binary dumps core and gives bus error. But before dumping the core and throwing the buss error, it gives some output. unfortunately I can't grep the output before core dump db2bfd -b test.bnd maxSect 15 Bus Error (core dumped) But if I do ... (4 Replies)
Discussion started by: rakeshou
4 Replies

9. Shell Programming and Scripting

Segmentation Fault(Core Dump) Error

Hi all, I have a folder with some 28 files. I have a script file that will iteratively take one file at a time from the folder and provide an output for the input file. Till the 7th file, there was no problem but from the 8th file onwards, i got this Segmentation Fault(Core Dump) error. A file... (2 Replies)
Discussion started by: mick_000
2 Replies

10. HP-UX

Core dump in HP-UX

Hi Guys, I was wondering if somebody could give me a link to a very good source of information or document about core dump process and How to's about it. I have also googled it and found some articles myself. Thanks Messi (1 Reply)
Discussion started by: messi777
1 Replies
All times are GMT -4. The time now is 03:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy