How to use a .dmp file for a system which crashes using a delphi app

Hi, I put this post here because I am not sure of the best location.

I have been given a memory dump (.dmp) file by a client who thinks that a Delphi 7 application is causing their system to blue screen from time to time. Does anyone know how I can use this .dmp file to locate the problem in the delphi app? The build the client is using has debug symbols turned on. 

I have downloaded Microsoft Debugging Tools for windows and have dupmchk.exe (and kd.exe) but I would really appreciate some help with how these or any other useful tools should be used?

Many thanks
Ben
0
Ben
11/14/2011 10:20:10 AM
embarcadero.delphi.non-tech 5934 articles. 1 followers. Follow

7 Replies
1530 Views

Similar Articles

[PageSpeed] 2

> I have downloaded Microsoft Debugging Tools for windows and have dupmchk.exe (and kd.exe)

You'd have to learn how to use WinDbg, which is a little too complex to explain here. Anyway you can start by opening the .dmp file and follow what WinDbg tell you, it will point you to the executable and stack trace that led to the error. At least you'll understand what is exactly causing the BSOD. Delphi debug symbols are not useful because they are in a differend format than those used by MS tools. You'd have convert them to a suitable format. It's a pity Delphi can't output debug informations in those
 formats.

Anyway I believe it is a little strange a "normal" Delphi app can lead to a BSOD, because it usually require some kernel-side error. But without knowing what error and where it happens is hard to tell.
0
Luigi
11/14/2011 8:07:56 PM
Am 14.11.2011 11:20, schrieb Ben Russell:
> Hi, I put this post here because I am not sure of the best location.
> 
> I have been given a memory dump (.dmp) file by a client who thinks that a Delphi 7 application is causing their system to blue screen from time to time. Does anyone know how I can use this .dmp file to locate the problem in the delphi app? The build the client is using has debug symbols turned on. 
> 
> I have downloaded Microsoft Debugging Tools for windows and have dupmchk.exe (and kd.exe) but I would really appreciate some help with how these or any other useful tools should be used?
> 
> Many thanks
> Ben


Hello,

the message of the blue screen would be helpful as well. If it reboots
to fast make sure the reboot after blue screen option under system in
windows settings is turned off.

Greetings

Markus
0
Markus
11/14/2011 8:39:39 PM
Caveats:

1)I have not done this for something like 6 years.
2)I have not done it for any applications built with embt/borl/codegear 
tools.

That said...

1)Best results likely if you can do this on a machine with same OS versions 
and service pack level as that experienced by customer.  Umm, same amount of 
memory _might_ be a consideration, but maybe not.
1b)If you're not familiar with the debugger's CPU pane, time to become so.
2)Is the .dmp file a minidump or a full dump? full dump preferred...
3)Use windbg to load the .dmp file you have.
4)Use EMBT/CG tools to load live instance of your application under 
debugger, if possible just stepping into first instruction.
5)Look a list of loaded modules/dlls in (delphi?) environment, and compare 
to list of loaded modules/dlls in your live instance.  Hopefully, the load 
addresses for them are the same.  If so, addresses can generally be used as 
is - if not same, then you may have to convert (code) addresses from .dmp 
file to addresses for live instance via subtract/add from module load 
address on .dmp side to live side.
6)Windbg (used to?) load .dmp file, positioning you to code that produced 
the fault.  Take this address, and using CPU pane in embt/cg tools, do a 
"goto" that address (possibly adjusted as mentioned previously) in the live 
version of the application.
7)Is the address in live application, anywhere in code you can recognize? 
If so, then you hopefully have a "starting" point to figuer out what went 
wrong.
8)If address is _not_ recognizable, or instructions in area are not same, 
then you can begin to do similar activities for addresses in the stack 
frame(s) of the .dmp instance, trying to locate them in the live instance.
9)If the windbg shown stack frames are useless, then you can attempt a 
literal memory dump of the stack area, and begin to visually compare areas 
(memory addresses) in the stack dump, looking for (possibly .dmp->live 
converted) address values that show up in your live instance, again, trying 
to find where you are in your application's code.

If you haven't already figured it out, it's a somewhat tedious process.  In 
past efforts, I was usually about 50% effective in figuring out what might 
have gone wrong.  In some cases, this did not lead to a fix, but led to at 
least seeing where diagnostic code might be added to help figure out what 
was going wrong, in a back and forth with the customer.

(And of course, application code shouldn't be able to blue-screen the OS 
anyway, but, I know that certain versions of cygwin certainly (repeatably) 
do that to a copy of Vista I use.  And some earlier version of cygwin 
hadn't, done that.  Unfortunately, I was not able to go back to it.)

Hope this helps.


<Ben Russell> wrote in message news:419784@forums.embarcadero.com...
> Hi, I put this post here because I am not sure of the best location.
>
> I have been given a memory dump (.dmp) file by a client who thinks that a 
> Delphi 7 application is causing their system to blue screen from time to 
> time. Does anyone know how I can use this .dmp file to locate the problem 
> in the delphi app? The build the client is using has debug symbols turned 
> on.
>
> I have downloaded Microsoft Debugging Tools for windows and have 
> dupmchk.exe (and kd.exe) but I would really appreciate some help with how 
> these or any other useful tools should be used?
>
> Many thanks
> Ben
0
david
11/14/2011 9:21:40 PM
On Mon, 14 Nov 2011 12:07:56 -0800, Luigi Sandon <> wrote:

>Anyway I believe it is a little strange a "normal" Delphi app can lead to a BSOD, because it usually require some kernel-side error. But without knowing what error and where it happens is hard to tell.

several months ago mine service written in bcb using my own socket transport (based on TSocketConnection) regularly crashed win 2003 server
with stop error pointing to tcpip

the problem went away after one expert told me that I should switch to win 2008 server where tcp stack was seriouslly rewritten, after that
transition those bsods never happened again

-- 
Vladimir Ulchenko aka vavan
0
Vladimir
11/15/2011 6:12:00 AM
> {quote:title=Ben Russell wrote:}{quote}
> I have been given a memory dump (.dmp) file by a client who thinks that a Delphi 7 application is causing their system to blue screen from time > to time. Does anyone know how I can use this .dmp file to locate the problem in the delphi app? The build the client is using has debug 
> symbols turned on. 
> I have downloaded Microsoft Debugging Tools for windows and have dupmchk.exe (and kd.exe) but I would really appreciate some help with 
> how these or any other useful tools should be used?

You can upload/send a Windows dump file to Microsoft online, and let them inspect what the reason of the BSOD was.
I have done this several times with Windows XP, and most times it was a bad hardware driver (mouse, videocard, etc).
So can you try this first and post the results here?

Besides that, I have only analyzed dump files of my own program (MakeMiniDump, or with Windows 7 c.q. ProcessExplorer: make dump of an exe). So I don't know if you can analyze Windows dump files with a Delphi exe.
You can try 2 things: 
1: use "map2dbg.exe" to convert a Delphi .map debug file to an (old) Windows .dbg symbol file. But with newer version of MS Debugging Tools, only .pdb files can be used...
2: because 1 does not work anymore (?) I made my own .dmp check tool:
http://code.google.com/p/asmprofiler/source/browse/trunk/MiniDumpReader/ViewMinidump.exe
It dumps all used dlls and stack traces of all threads. But again: I haven't tried this on Windows dump files, only on normal dump files.
(it can read .map, .jdbg files and embedded JCLDEBUG and TD32 debug info)
0
andre
11/15/2011 7:28:27 AM
> several months ago mine service written in bcb using my own socket transport (based on TSocketConnection) regularly crashed win 2003 server

The problem here is TSocketConnection, not Windows :)
0
Luigi
11/15/2011 9:20:37 AM
On Tue, 15 Nov 2011 01:20:37 -0800, Luigi Sandon <> wrote:

>The problem here is TSocketConnection, not Windows :)

1. I use my own TVSocketConnection which is seriously rewritten (bug-fixed) and enhanced transport with several unique built-in features no
other remoting/transport offer (at least that I'm aware)
2. no user space process should bring OS to its knees no matter how buggy and flawed it works with sockets

so no, the problem is Windows, its tcp stack drivers

-- 
Vladimir Ulchenko aka vavan
0
Vladimir
11/15/2011 9:43:38 AM
Reply:

Similar Artilces:

To use or not to use Delphi
Sadly, it seems to me that there is a sort of race between the two threads, for and against using Delphi in new projects, with more or less the same users posting in both threads. Arguments are fiercely debated in both camps. Borland had their own vision. As a community, now that Delphi has changed ownership I believe we should try to be more consistent, more clear, and more articulate in what we expect from Embercadero in terms of Delphi. We can contribute to keeping Delphi alive and moving in the right direction. "Laurent Cocea" schrieb: > Sadly, it seems to me that there ...

How to use a delphi XE3 obj file in delphi 2007?
Hi, I'm migrating an application from delphi 2007 to delphi XE3 and I would like to do it in several steps. To do this I need to use a part of my new code (XE3) in the current delphi 2007 application. So I want to use the .obj file from my XE3 file. I know I have to use the {$L 'Filename'} and I know that I have to declare the functions that I want to use in external in my D2007 project. I wanted to make an easy and simple example to see how it works with only 1 function 'hello world' compiled in obj with XE3 but I can't find the way to use it in D2007. In D200...

Using Delphi 7 and Delphi 2010
I had a project in Delphi 7. I worked on it in Delphi 2010. When I try to open the .dpr again in Delphi 7, the IDE toolbar widens across both monitors, and Delphi 7 locks up. It appears that Delphi 2010 modifies the .dpr in a way that makes Delphi 7 unable to open it again. All my forms & units appear to open fine in D7 after D2010, except for the warnings on the ExplicitHeight and ExplicitWidth properties being missing... I can easily recreate the .dpr, but is this expected behavior? Thanks. Tom Field wrote: > I had a project in Delphi 7. > > I worked o...

How design a COM using Delphi and Using in PB7?
I need some component, So, we want using DELPHI5 to develop a COM or Activex. What type of knowege or Skill I must know it. Can anyone tell us? from DRAOGN Can you explain what type of component you want to create? You may not need to a) build your own, or b) use Delphi. If the component should be used from within a PB application, you ought to use PB to develop it unless it is something that PB does not let you do. regards, Bill DRAGON wrote: > I need some component, So, we want using DELPHI5 to develop a COM or > Activex. > What type of knowege or Skill I ...

delphi Win32 using delphi .NET dll
Hi, I'm trying to use a delphi.NET dll in delphi.WIN32. I am currently using CodeGear Delphi 2007 with version2(base version) of .NET I can get the dll to import into the WIN32 application the only problem is when i include things such as: "using Classes,DateUtils, SysUtils" in the .NET dll the win32 application will instantly hang when any of the dll functions are called. Any help would be great thanks. Also I have tried this example and it also crashes for me? http://cc.embarcadero.com/Item/22688 -Braden I also found this.. "The problem is that, wehn you instal...

can i use delphi 2007 bpls in delphi 2009
can i use delphi 2007 bpls in delphi 2009 ? "Gaetan SIRY" skrev i meddelelsen news:8703@forums.codegear.com... > can i use delphi 2007 bpls in delphi 2009 ? No. -- Finn Tolderlund The compatiblity between D2006 and D2007 was unique. Normaly they can't be compatible because new version enhance/change the API. And D2009 defines String = Unicode where older version has String = Ansistring so D200x/Dx-BPL are 200% incompatible with D2009. ...

.net app using Delphi DLL
Is anyone using a Delphi DLL from .NET 4.0 successfully? I get sporadic failures in the DLL if called from a 4.0 app. Called from a 2.0/3.5 app, everything works fine. Anyone else seen this? DLL is compiled with D2007. Reviewed calling conventions and everything seems to be StdCall as appropriate. Thanks, Brad. --   C++: an octopus made by nailing extra legs onto a dog -- unknown "Brad White" <bwhiteDONTINCLUDE@inebraska.com> wrote in message news:310851@forums.embarcadero.com... > Is anyone using a Delphi DLL from .NET 4.0 successfu...

Using Using
I have just completed reading a chapter in my book on performance. The books says to speed up performance on your web site you should use the using statement when opening connections. My question is how do you catch errors if you are using this as apposed to a try catch block.thanksBryan  Why would you use it as an alternative to a try/catch statement. Couldn't you just do something like  public void UsingSomeMethod() { try { SomeMethod(); } catch(SomeException e) { /// do something useful }}public void SomeMethod() { using (Something) { ...

How to use AppModeler to generate Delphi forms using Cached Updates
<HTML> <TT>A beginner's question regarding AppModeler 6.1, Delphi 3, and Interbase 5.x...</TT> <P><TT>While I am impressed with the amount of thought and work that has gone into AppModeler, I have nonetheless been surprised to discover that the Delphi application generated by AppModeler is not suitable for real-world situations because of the "fly-away" problem afflicting newly-entered records.</TT> <P><TT>When I enter a record on an AppModeler-generated Delphi form, the record disappears ("flies away") immedia...

When to use ( and when to use ((?
I'm just not getting it. When do you use ( in a statement, when do you need to use ((, and is the space after either or both mandatory? For example, I coded this statement: if (( $_ eq $bad_guys_ip )) { more_stuff_here }; Why the two (( in an if? And why does it seem to not work when I miss the space after the ((? Thanx! Mark me as... /Corn-fused|Dense/ > I'm just not getting it. >=20 > When do you use ( in a statement, when do you need to use ((, and is > the space after either or both mandatory? >=20 > For example, I coded this sta...

System.IO Exception
Hi, I've created a page where a user can upload a zip file of images and display the list, the HTML list includes a thumbnail of the image eg: "<img src="thumb.aspx?p=blah">". To keep the thumbnail images seperate to the working directories for the unzipping/storage processes; A folder "temp" is used within the users directory. Whenever the thumb.aspx page is used, the image is copied from the "unzipped" directory to the "temp" directory, and the thumb is created using the "temp" directory as the source.The problem is on irregular occasions after debugging a system.IO.excepti...

use html file as delphi help
can I call to html file as help file instade of hlp file ? yuda levi wrote: > can I call to html file as help file instade of hlp file ? I do it by setting the form's HelpIndex to a non-zero value, then in the FormHelp event I ShellExecute the related .html file, set CallHelp := False and Result := True. -- Ray Marron > can I call to html file as help file instade of hlp file ? Try looking here: http://www.helpware.net/delphi/ I used their technique in one project and it seemed to work pretty well, but I didn't extensively test it. It's free, so try it ...

Using CHM files in Delphi 2009??
Hello Everyone, I need to be able to use CHM help file with my application. In the past I used the older format HLP files. I tried changing the file in the Project Properties - but it only seems to use HLP files - so I manually changed it - and cannot use the older calls like Application.HelpJump('Welcometopic'); It tells me that there is no Topic Based help System installed. So - I figure I am missing something very simple. Can others tell me how they are launching the CHM files from their apps? I would be happy launching just to the Table of Contents...

If you use Delphi...
If you use Delphi for .NET with ASA, please vote for this: http://qc.borland.com/wc/qcmain.aspx?d=31677 ...

Web resources about - How to use a .dmp file for a system which crashes using a delphi app - embarcadero.delphi.non-tech

Lightning Crashes - Wikipedia, the free encyclopedia
" Lightning Crashes " is a song by the rock band Live , from their 1994 album, Throwing Copper . The track wasn't released as a single in the ...

When New York Times website crashes, newspaper turns to Facebook Notes
When The New York Times’ website suffered some downtime Wednesday because of technical issues, the newspaper turned to Facebook Notes to post ...


Adorable Baby Crashes Daddy's Concert - YouTube
17 month old baby, Ethan ran out onstage when his dad, country singer Coffey, was performing at NYE event, started dancing, and stole the show. ...

Police warn drivers after tanker crashes at Ajman roundabout
A tanker overturned at the Al Zorah roundabout spilling oil on the busy road and causing traffic jams for about four hours.

Worst Driver of the Day: Old Man Crashes Into Everything In Piggly Wiggly Parking Lot
No, this isn’t footage from “GTA V.” A 92-year-old man named Russell Kerr pulled his minivan out of the parking lot last Friday at a Piggly Wiggly ...

Man crashes car doing burnouts allegedly twice over limit at Port Pirie - AdelaideNow Search Search
A MAN was arrested after allegedly doing burnouts while almost two times over the limit and crashing into a fence at Port Pirie.

Kangaroos cause two crashes near Bendigo
One driver swerved, the other collided with a kangaroo in separate accidents near Bendigo.

Car crashes into home in Oxley
A car has smashed into a home in Canberra's south on Thursday afternoon.

Opposition Leader Bill Shorten crashes car in Melbourne
Bill Shorten was involved in a car crash in Melbourne's north at the weekend.

Resources last updated: 11/26/2015 2:48:11 AM