XE5 DEBUG QUESTION - Access violation in module USER32.dll

This is a C++ XE5 DEBUG QUESTION

I have an application.  My customer is getting the following error.  

Access violation at address XXXX in module USER32.dll 
Read of address XXXX.

I cant reproduce the problem on my end within the debugger.  Assuming this isn't a stack overflow ... Is there some way to reverse engineer the line of code by looking at a map file or something?

When I google USER32.dll I get back suggestions that it might be a call to MessageBox.  

I'm an old timer. A long time ago in a land far away I used a DOS extender with BC 5.01.  When youd geta GOF you could write the code and data seg to a log file then compare that to a map file.  That's how we did 15 years ago. If it wasnt a stack overflow then this would get you to an area in the code within a function.  I don't have much experience with XE5.  I just recently switched from BC 5.01 released in 1997 to XE5 a year ago.  Any clues about extrapolating from this GPF info would be appreciated.  


Also, where is the documentation about this ?

Dan - St Louis Missouri
0
Dan
12/12/2014 10:50:48 PM
embarcadero.cppbuilder.ide 2180 articles. 1 followers. Follow

4 Replies
1324 Views

Similar Articles

[PageSpeed] 21
Get it on Google Play
Get it on Apple App Store

Dan wrote:

> Access violation at address XXXX in module USER32.dll Read of address
> XXXX.

It would help to see the actual XXXX values.  For instance, if the second 
XXXX is at/near 0 then you know that a NULL pointer is being accessed.

> Assuming this isn't a stack overflow ...

If it were, you would be getting a Stack Overflow error, not an Access Violation 
error.

> Is there some way to reverse engineer the line of code by looking
> at a map file or something?

The first XXXX in the message is the address of the code that crashed.  Subtract 
the process's base address from that value, and then you can look up the 
resulting value in your project's .MAP file (if you have enabled the project 
to generate it during compiling) to find out what code it belongs to, then 
go look at what that code is doing.  Or, if you are running the app in the 
debugger, you can "go to address" and look at the CPU disassembly to see 
what code is running at the faulting address.

> When I google USER32.dll I get back suggestions that it might be a
> call to MessageBox.

USER32 has a lot of functions in it.  The error could be anything.

--
Remy Lebeau (TeamB)
0
Remy
12/12/2014 11:01:10 PM
> {quote:title=Dan Ambrose wrote:}{quote}
> This is a C++ XE5 DEBUG QUESTION
> 
> I have an application.  My customer is getting the following error.  
> 
> Access violation at address XXXX in module USER32.dll 
> Read of address XXXX.
> 
> I cant reproduce the problem on my end within the debugger.  Assuming this isn't a stack overflow ... Is there some way to reverse engineer the line of code by looking at a map file or something?
> 
> When I google USER32.dll I get back suggestions that it might be a call to MessageBox.  
> 
> I'm an old timer. A long time ago in a land far away I used a DOS extender with BC 5.01.  When youd geta GOF you could write the code and data seg to a log file then compare that to a map file.  That's how we did 15 years ago. If it wasnt a stack overflow then this would get you to an area in the code within a function.  I don't have much experience with XE5.  I just recently switched from BC 5.01 released in 1997 to XE5 a year ago.  Any clues about extrapolating from this GPF info would be appreciated.
  
> 
> Also, where is the documentation about this ?
> 
> Dan - St Louis Missouri


 Access violation at address 76BB 990B  in module USER32.dll   Read of address 7265 7355
0
Dan
12/13/2014 1:01:01 AM
> {quote:title=Dan Ambrose wrote:}{quote}
> This is a C++ XE5 DEBUG QUESTION
> 
> I have an application.  My customer is getting the following error.  
> 
> Access violation at address XXXX in module USER32.dll 
> Read of address XXXX.
> 
> I cant reproduce the problem on my end within the debugger.  Assuming this isn't a stack overflow ... Is there some way to reverse engineer the line of code by looking at a map file or something?
> 
> When I google USER32.dll I get back suggestions that it might be a call to MessageBox.  
> 
> I'm an old timer. A long time ago in a land far away I used a DOS extender with BC 5.01.  When youd geta GOF you could write the code and data seg to a log file then compare that to a map file.  That's how we did 15 years ago. If it wasnt a stack overflow then this would get you to an area in the code within a function.  I don't have much experience with XE5.  I just recently switched from BC 5.01 released in 1997 to XE5 a year ago.  Any clues about extrapolating from this GPF info would be appreciated.
  
> 
> Also, where is the documentation about this ?
> 
> Dan - St Louis Missouri


Thanks for the reply.  Ok the exact message / address is ...

 Access violation at address 76BB 990B  in module USER32.dll   Read of address 7265 7355


I cant reproduce the problem on my end.  It only happens with this customer of mine.  How can I narrow this down ?  Read the following and tell me if this is right.  I have the program loaded into XE5.  I paused it.  I opened up   VIEW | Debug Windows | Modules    I sort by base address.  I look for 76BB 990B  It comes back USER32.dll  There is another windows to the right. Not sure what its called.  It has two columns.  Entry point and address.  I sort it by address.  I look for the closest address witho
ut going over 76BB 990B It says 
DdeQueryStringA: $76BB8D90 
DlgDirListA            $76BBB27D 

Is it correct to assume that my GPF is somewhere within DdeQueryStringA ?

Here is some more information about the program.  It is a control program. There is nobody "using it" or typing any information.  It has a Form with a TMemo  and a derived stream. A class called TTYWindow to display information in a scrolling window.  It just runs on a server and controls a bunch of stuff via a Sockets interface.  I have two other control programs that use 99% of the same code modules but that control something different.  They have run fine a long time.  So I know all of the shared code 
modules are all good.  ( years of 24/7 usage )  

This particular program worked fine until recently.  The most major change was container class usage.  I was using USE_OLD_RW_STL   Now Im not.  I made changes to my StdList wrapper code and removed the USE_OLD_RW_STL.  I also made a wrapper function around MessBox that takes variable arguments and sprintf type strings.   

I could roll back these changes and see if my customer has any more problems.  But it would be interesting to learn how to debug from the error message with the address from the customer.  This is a good exercise.  Any tips or clues would be appreciated.   Is there any documentation of debugging somewhere?   I'm used to Borland documentation.  Which was always very good. There was always a users guide. A developers guide.  And a guide for debugging.  For XE5 All I can find is a C++ Builder help window.  I
t loads up Microsoft document explorer.  Its very slow.  And I'm using a super fast state of the art 6 core processor, 16 gigs of ram and a solid state drive.  What is this Microsoft document explorer?  Is this reading files local or across the internet?   Is there any DOCs available in PDF or HTML format other then Microsoft document explorer which seems slow?   Is there any documentation that can be printed out ?  I'm talking 3 ring binders that hold 100 pages.  Can you buy any actual books ?

Edited by: Dan Ambrose on Dec 13, 2014 9:39 AM
0
Dan
12/13/2014 4:28:59 PM
<Dan Ambrose> wrote in message news:705373@forums.embarcadero.com...
>> {quote:title=Dan Ambrose wrote:}{quote}
>> This is a C++ XE5 DEBUG QUESTION
>>
>> I have an application.  My customer is getting the following error.
>>
>> Access violation at address XXXX in module USER32.dll
>> Read of address XXXX.
>>
>> I cant reproduce the problem on my end within the debugger.  Assuming 
>> this isn't a stack overflow ... Is there some way to reverse engineer the 
>> line of code by looking at a map file or something?
>>

You might be interested in this information, which is probably only a 
starting point:
http://blog.gurock.com/postings/working-with-delphis-new-exception-stacktrace/730/

I'm guessing you might be able to add his unit as is (*.pas) to your 
project, and maybe get access to the stacktrace at your customer's site, but 
I haven't used that code myself.

(I went looking for the page I originally ref'ed trying to use jcldebug 
myself from c++, but it doesn't seem to be readily available anymore.)
0
david
12/15/2014 1:01:01 AM
Reply:

Similar Artilces:

To module or not to module that is the question
Howdy List,=20 Bit of a quandry here. I have a script that does everything it's supposed to. It's basically like this: ---------------------- Configuration variables here: Program flow here with a single print statement after=20 it figures out what it's doing based on the configuration and user = input. ------------------ Now I need to use this same script lots of times so I already have = differen configurations saved as different modules then in the script = all I have to do is: ------------ In One.cgi: use Special::One; # this brings in all the configuar...

question about debugging outside dll with .NET
hi, allI build a COM object with VC++ 6.0, now I am developing a ASP.NET web application which use the COM object and got crash.I was wonder if is there any way I can debug  the COM object ( source code available) with visual .net IDE.Any suggestion is appreciated! Yes, you can debug it.You'll need to have the source code and debug symbols available, and you will need to set the IDE to debug unmanaged code as well as managed code.RegardsDave I'm having trouble on this subject, but it's a DLL that my predecessors write in .NET, so it's managed.  Still, n...

Debugging DLL compiled with Delphi 7 in Delphi XE5
Dear Sirs/Madams, We are considering changing from Delphi 7 to Delphi XE5. Our project consists of a dll and an .exe file. I have begun converting the .exe file to Delphi XE5 and have successfully accessed the DLL compiled with Delphi 7. When I debug the DLL (using the "run parameters" and changing "host application" to the .exe file) in Delphi 7 I can set breakpoints etc. and they are triggered. However, when I attempt to debug the project in XE5, I get the following message: Module Load: xxx.dll. No Debug Info. Base Address: $015A0000. Process xxx.exe (2928) ...

Blocking Values of PBD & DLL in PB IDE while Debugging
Dear All It will be better if PB IDE Stops displaying the values of PBD Script Variables while Debugging the PBD Objects. Regards Vasu Why? -- All views expressed in this message are my own and not necessarily those of my employer "Vasu" <kr_vasudev@hotmail.com> wrote in message news:Ou3MjaERCHA.259@forums.sybase.com... > Dear All > > It will be better if PB IDE Stops displaying the values of PBD Script > Variables while Debugging the PBD Objects. > > Regards > Vasu > > I have ancestor Objects with few Business ...

Acces violation c0000005 in 64 bit debug XE5 sp2
Hello, With a simple test application, only one form; I get this error only in debug mode. I have also disabled incremental linking. What can I do more ? Thanks, Jan ...

CB2010
I am trying to debug an app with CB2010. When the app is starting up, I've noticed in the Event Log that three modules will be loaded that start with "UNKNOWN_MODULE_". After these modules load, the app debugging slows to a crawl (I can almost see the individual pixels repainting...). So my question is: How can I figure out what modules these are? TIA The event log is shown below (app name is ABCD.exe): ________________________________________________________________________________________ Thread Start: Thread ID: 2384. Process ABCD.exe (2388) Process Start: C:\P...

To Data Module or not Data Module, that is the question
Can anyone offer best practice advice please. Porting my access application to Delphi I have used a data module. It now has one Tdataconnection and lots and lots of TDAOQueries and TDAOTables on it. Its now getting hard to see the wood for the trees. My question is twofold. 1) is is best to use a data module or just use the TDOQueries I need on each form? 2) is it best to use loads of TDAQueries, each with hard coded SQL or use just one or two with the sql string dynamically loaded just before I execute it. With Qn 2 it is starting to look bettert to dynamically load the sql from a f...

XE5 IDE isn't closing EXE file after terminating debug session [Edit]
I'm running XE5 inside of Parallels 8 on a MacBook Pro, with Windows XP SP3 as the host OS. When I hit F9 to run a debug session, it will frequently leave the EXE file locked, as if it's open. So if I do another build I get an error saying it cannot write to the EXE file. If I go into Explorer and try to delete it manually, I get an error saying it's in use by another program. If I close Delphi, it gets released. Looking at the tasks in a detailed task viewer, I don't see a separate task instance for the EXE, only a thread inside of the IDE. Could this be an ...

test/debugging modules that are duplicates of existing modules.
I'm pretty sure I'm not doing this right. I have two modules of the same name, current version and future version, in two different directories. $HOME/test/Module1.pm $HOME/test/Module2.pm $HOME/lib/Module1.pm $HOME/lib/Module2.pm and another module: $HOME/lib/Module3.pm Under perl -d I can't seem to ignore the current versions $HOME/lib/Module1.pm $HOME/lib/Module2.pm and see only the future version. I can get part of the way there, but right now the modules in my test directory have a call for "use lib '/home/tallison/lib'" that seems ...

Module questions (perhaps a module creation mini-tutorial)
Hello list, I am trying to make my own modules for some tasks, and I am trying to grasp the basics before I go any further. Here is a dumb test module that I wrote just to see how things are done - it takes an array of 3 values and adds them together, returning the values on request. ### 3-element-array-calc test module (CalcTest.pm) package CalcTest; use warnings; use strict; my @collect; 1; sub new { my $class = shift; my $self = {}; @collect = (0,0,0); bless $self, $class; return $self; } sub add { print (shift @_);...

Debugging Module window showing .bpl debugging enabled
This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --JivePart=_33685.zeB8CwDOH5aMJzMl Content-Type: text/plain; charset="Utf-8" The Module Windows will show a blue bullet when debugging is enabled. It seems to me that the path to the symbol file should appear in the Symbol File column but it is blank. Larry Griffiths --JivePart=_33685.zeB8CwDOH5aMJzMl-- ...

Do I have to register my dll before use in a VWD web app? (Unable to load DLL 'scanSW.DLL': The specified module could not be found. (Exception from HRESULT: 0x8007007E) error)
I think I'm having a trivial problem.  I'm sure it will be trivial once I know the answer. I'm using Visual Web Developer 2005 to write a web application which will hopefully communicate with an external usb device.  The manufacturer of the usb device provided a dll with an Excel workbook and VBA code which performs all the tasks that I need in the web application.  This is not unfamiliar territory for me.  A few months ago I had the same dilemma with a separate external usb device from a different manufacturer who also provided a dll with an Excel workbook a...

windows ME questions, questions, questions.......
Hi, my next PC will be running Windows ME. The PC will be supplied via my work, so there's no choice here for me (ME?) (I think I would have preferred 98 SE). The harddisk (40GB matrox) will have ME installed, and both the Windows ME set-up files and an image of the initial Harddisk 'on a hidden partition'. Word has it that this partition is not seen by Format nor FDisk. Is this really possible? No Windows CD will be supplied. Seems a new way of MS to encourage working with licensed software only. Anyone familiar with this way of distributing an OS? Will I be able to ...

Debugging question
Can I see the value of a datastore method -- mydatastore.Modified() -- while in Debug mode? I know I can copy it to a variable, but can I see it directly? Rick No (bummer)..... good enhancement request though! However, you can see the DW Object properties in the SQA "Robot" testing tool! regards ... Chris Great White North Technical Evangelist "Rick Charnes" <rick--nospam.charnes@thehartford.com> wrote in message news:MPG.1a3ffc9a42dbaf59897fb@forums.powersoft.com... > Can I see the value of a datastore method -- mydatastore.Modified() ...

debuging question
Is there any document or site describ step by step to do remote debugging for PB. I have follow the online books steps.But it still not work. This is the step I have done. 1.On solaris ,write command >jagsrv Jaguar& to start Jaguar server. 2.On an desktop pc,run pb application which contain server side componment. 3.In response windown type in login:jagadmin ,no password as well as remote machine's name ,after this choose the componment and turn on debuggin.In the powerscrip setup an break point. 4Run anohter powerbuilder session for client application. As I read fro...

Web resources about - XE5 DEBUG QUESTION - Access violation in module USER32.dll - embarcadero.cppbuilder.ide

CP violation - Wikipedia, the free encyclopedia
In particle physics , CP violation is a violation of the postulated CP-symmetry : the combination of C-symmetry ( charge conjugation symmetry) ...

James-O'Keefe-Parole-Violations - Flickr - Photo Sharing!
James O'Keefe, liar and scam artist, has been spotted in NYC in violation of his parole in Lousiana.

Civil Rights Violation on Video Pledge and Invocation - YouTube
Civil Rights Violation on Video Pledge and Invocation - YouTube

UAE Police issue more than 25,000 traffic violations involving lorries in Q1 of 2014 - The National
Police said several people have been killed in accidents involving lorries so far this year.

Russia closes 12 McDonald's restaurants over hygiene violations
Russia has temporarily closed 12 branches of McDonald's on health grounds and is carrying out more than 100 inspections, the US fast food chain ...

CFMEU implicated in threats against Melbourne contractor and site entry violations
Victoria's powerful construction union allegedly told a company it is on a &quot;hit list&quot; and would suffer industrial strife as payback ...

Report alleges labour violations at Apple supplier in China
Report claims dangerous conditions, labour violations at another Apple plant.

Hints of Eurovision vote violation against Russia
The head of Azerbaijan's state broadcaster has questioned the vote tally in the Eurovision Song Contest where it embarrassingly gave "nul points" ...

Nick Kyrgios issued code violation at Japan Open - The Courier-Mail Search Search
NICK Kyrgios has hit out at the Australian media following his loss to Frenchman Benoit Paire at the Japan Open on the weekend.

Nick Kyrgios issued code violation at Japan Open
NICK Kyrgios has hit out at the Australian media following his loss to Frenchman Benoit Paire at the Japan Open on the weekend.

Resources last updated: 11/25/2015 7:06:25 PM