Hi,
My program crashes when it reaches a certain line. There is nothing
wrong with that particular line as I have changed it to something
simple like i=0, and it still crashes.
If I remove some paras of code from lines previous to this line, the
program run fine and does not crash. So I think that this has to do
with some kind of overflow. It seems to me that if the number of lines
of code accessed by my program goes above a limit, it crashes. So I
tried reducing the size of my program by removing the debug info during
compilation, but the program still crashes.
So I need help with understanding the crash dump. This is given below:
Exiting due to SIGSEGV
General protection fault at eip = 00002380
eax=01da2724 ebx=001190e4 ecx=001190e4
edx=00078500 esi=0011ed54 edi=00119060
ebp=00118fe8 esp=00118f60 program=a:\test .exe
cs: sel=00a7 base=10000000 limit=0012ffff
ds: sel=00af base=10000000 limit=0012ffff
es: sel=00af base=10000000 limit=0012ffff
fs: sel=00bf base=00000000 limit=0010ffff
gs: sel=00bf base=00000000 limit=0010ffff
ss: sel=00af base=10000000 limit=0012ffff
App stack: [0011912c..00099 12c]
Exception stack: [00099080..00097 140]
Call frame traceback EIPs:
0x00002380
0x000024a7
0x000094d3
0x0000267d
0x0003aa08
Btw, the program is written in C using the DJGPP compiler (GCC for DOS)
and compiled on a xp computer. Then I transfer the program on a floppy
to my DOS box, and run it - where it crashes. Can it have anything to
do with this XP->DOS transfer with subtly differing exe formats.
Any help is appreciated!!
Thanks,
Ahmad 4 2834
It looks like 'some paras of code' is the source of error. Check it
carefully for array index running out of range, wrong pointer arithmetic
and so on.
arizvi wrote: Hi,
My program crashes when it reaches a certain line. There is nothing wrong with that particular line as I have changed it to something simple like i=0, and it still crashes.
If I remove some paras of code from lines previous to this line, the program run fine and does not crash. So I think that this has to do with some kind of overflow. It seems to me that if the number of lines of code accessed by my program goes above a limit, it crashes. So I tried reducing the size of my program by removing the debug info during compilation, but the program still crashes.
arizvi wrote: My program crashes when it reaches a certain line. There is nothing wrong with that particular line as I have changed it to something simple like i=0, and it still crashes.
If I remove some paras of code from lines previous to this line, the program run fine and does not crash. So I think that this has to do with some kind of overflow. It seems to me that if the number of lines of code accessed by my program goes above a limit, it crashes. So I tried reducing the size of my program by removing the debug info during compilation, but the program still crashes.
So I need help with understanding the crash dump. This is given below:
Exiting due to SIGSEGV General protection fault at eip = 00002380
eax=01da2724 ebx=001190e4 ecx=001190e4 edx=00078500 esi=0011ed54 edi=00119060 ebp=00118fe8 esp=00118f60 program=a:\test .exe
cs: sel=00a7 base=10000000 limit=0012ffff ds: sel=00af base=10000000 limit=0012ffff es: sel=00af base=10000000 limit=0012ffff fs: sel=00bf base=00000000 limit=0010ffff gs: sel=00bf base=00000000 limit=0010ffff ss: sel=00af base=10000000 limit=0012ffff
App stack: [0011912c..00099 12c] Exception stack: [00099080..00097 140]
Call frame traceback EIPs: 0x00002380 0x000024a7 0x000094d3 0x0000267d 0x0003aa08
Btw, the program is written in C using the DJGPP compiler (GCC for DOS) and compiled on a xp computer. Then I transfer the program on a floppy to my DOS box, and run it - where it crashes. Can it have anything to do with this XP->DOS transfer with subtly differing exe formats.
You are off-topic in c.l.c, which does not deal with compiler or
system specific things, but only the portable language. You have
shown no code. If you had included a minimal compilable program
that exhibited the problem, and was written in standard C, your
question would be topical.
At any rate I have set follow-ups and cross-posted to
comp.os.msdos.d jgpp. Go there for any answers.
--
"If you want to post a followup via groups.google.c om, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
arizvi wrote: Hi,
My program crashes when it reaches a certain line. There is nothing wrong with that particular line as I have changed it to something simple like i=0, and it still crashes.
If I remove some paras of code from lines previous to this line, the program run fine and does not crash. So I think that this has to do with some kind of overflow. It seems to me that if the number of lines of code accessed by my program goes above a limit, it crashes. So I tried reducing the size of my program by removing the debug info during compilation, but the program still crashes.
So I need help with understanding the crash dump. This is given below:
Exiting due to SIGSEGV General protection fault at eip = 00002380
This means that yhe program counter registerwas at 0x2380
when the fault occurred.
Now, you have to find out to which line of code corresponds
to that address.
There are several methods of finding that information:
1:
call the linker with some "map" option, that will print
a map of the gegerated program, specifying at which address
all procedures are loaded. Then you have to find 0x2380 in that
list of procedures.
2: Use some debugger to load the program in memory and try to
find out the addresses that are nearest to 0x2380.
eax=01da2724 ebx=001190e4 ecx=001190e4 edx=00078500 esi=0011ed54 edi=00119060 ebp=00118fe8 esp=00118f60 program=a:\test .exe
All those registers do not tell you much about the crash unless
you have pinned down the exact disassembly of the instruction
provoking the crash. In that case, it will allow you
to see which variables were involved in the crash. To read
that though, you will need a good knowledge of assembly language.
cs: sel=00a7 base=10000000 limit=0012ffff ds: sel=00af base=10000000 limit=0012ffff es: sel=00af base=10000000 limit=0012ffff fs: sel=00bf base=00000000 limit=0010ffff gs: sel=00bf base=00000000 limit=0010ffff ss: sel=00af base=10000000 limit=0012ffff
App stack: [0011912c..00099 12c] Exception stack: [00099080..00097 140]
Call frame traceback EIPs: 0x00002380 0x000024a7 0x000094d3 0x0000267d 0x0003aa08
This is a bonus information and very useful. You repeat the
steps you did to find out which procedure corresponds to
0x2380 and apply it to 0x24a7, 0x94d3, etc, and you will
be able to restitute the whole stack as it was when the
exception happened.
Btw, the program is written in C using the DJGPP compiler (GCC for DOS) and compiled on a xp computer. Then I transfer the program on a floppy to my DOS box, and run it - where it crashes. Can it have anything to do with this XP->DOS transfer with subtly differing exe formats.
Unlikely since if the exe format was wrong, the program wouldn't be
loaded at all.
Hi Jacob,
Thanks for your reply. I was able to find the source of error. It was
due to incorrect initialization.
The source of error was hard to debug, since the program had undefined
behavior - it crashed at different locations on different runs of the
program.
Thanks guys,
Ahmad This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Christoph Pingel |
last post by:
Can anybody tell me what's going on here (or give me a pointer where
to start looking):
Nov 22 18:05:03 localhost crashdump: Unable to determine
CPSProcessSerNum pid: 1230 name: python
This is form python.crash.log
------
|
by: Yadnesh |
last post by:
Hi,
I have a working application compiled on VC++ 6.0. It is linked using the
linker flags:
-debug -debugtype:both
Now, I want to compile and run the application in the .NET framework. I
found that "-debugtype" option no longer exists for linking using .NET.
I there another equivalent option that I can use?
|
by: Mark Loveless |
last post by:
Back in my mainframe days a crash dump could be parsed by hand to
reveal the application program running at crash time as well as the
offset into said program, which combined with a extended program
listing could be used to determine the partcular application program
statement that killed the thing.
I realize this is a totally different...
|
by: Cheung, Jeffrey Jing-Yen |
last post by:
Hi all,
I need some help with debugging a "deadlock" in a production
environment. I've managed to get a crash dump and have tried to
analyzed it via WinDbg and SOS. Unfortunately, I am not skilled enough
in debugging to pinpoint the exact problem; however, I have narrowed it
down to the garbage collection process. All threads seem to be...
|
by: zhengfish |
last post by:
Hi, all,
my server crashed at odbc my_strcasecmp_8bit().
OS: redhat linux 9.0,
DB: MySQL-server-4.1.14-0.glibc23,MyODBC-3.51.11-2, unixODBC-2.2.3-6
I guessed it caused by odbc driver.
but how to fix it?
when the server crashed it output a coredump as follows:
-----------------------------------------------------------
| |
by: Abubakar |
last post by:
Hi,
I want to know that when my application is running outside of the debugger
(in debug or release build) can I set the application/project settings in a
way that when it crashes it tells me which method of which class it was
running while it crashed. And can it also give me the stack trace of when
the crash happened? I'm asking this cuz...
|
by: matt287 |
last post by:
Hi,
I am tracing this c program and I know nothing about this x_DUMP code. Can somebody explain to me ? Thanks.
/* header */
# include <stdlib.h>
# if x _DUMP
# include <stdio.h>
# endif
|
by: ycinar |
last post by:
Can anyone advise on how to open a crash dump in Visual Studio?
|
by: Bob Altman |
last post by:
I have an application that runs a bunch of programs. Occasionally, one of the
programs dies a horrible death due to a coding error of some sort in the
program. As things are configured today, when one of these programs dies, it
simply disappears from the computer, leaving behind no trace of why it died.
Can someone please tell me how I can...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |