none app faulting in kernel32.dll 0x00012a5b, how can I debug this? RRS feed

  • Question

  • I have a Windows application built in VS2005.  The application is occasionally (maybe once or twice a week) dying with the following fault:

    Event Type:        Error
    Event Source:    .NET Runtime 2.0 Error Reporting
    Event Category:                None
    Event ID:              1000
    Date:                     7/4/2008
    Time:                     3:58:38 PM
    User:                     N/A
    Computer:          XPDEV01
    Faulting application myapp.exe, version, stamp 486d06ec,
    faulting module kernel32.dll, version 5.1.2600.2945, stamp 44ab9a84,
    debug? 0, fault address 0x00012a5b.

    The program reads data from a serial port, processes the information and writes it to a SQL database (either SQL 2000 or SQLExpress 2005).  The reading and processing is done within a timer sub, which runs on a 1 second interval.  There is no threading in the code.   

    I have try/catch blocks around all the code that is reading the port and code that writes to the databases, but the fault does not get trapped.

    I cannot reproduce the problem and the program requires a data feed which makes it impossible to provide the source code to you.  I have the program running on several systems.  It seems to happen more often on the Windows XP system using SQLExpress, but I have also seen it also happen on the Windows 2003 svr with SQL 2000.  It doesn't always happen on all the systems at the same time, so I'm not sure whether it has anything to do with the data in the feed.

    My main question is how I can get information to help me find out where the problem occurs in my program.  Is there a way that I can set the program to dump out a file with the stack information?  If so, then how do I work with the dumpfile?   Is there a way to trap the fault in my code?

    I really appreciate any pointers to debugging help, or suggestions of what might be causing the problem.

    Thank you,

    Chris Heisler

    Tuesday, July 8, 2008 5:06 PM

All replies

  •  If anyone has a method of debugging this fault error, I need their insight.

    I added the MyApplication_UnhandledException subroutine in the ApplicationEvents.vb module in my program so that I could log some information and bring up a message box.  The error occurred again last Friday afternoon and it wasn't caught by that handler.

    If necessary, I can set up this application to come up into a debugger of some type when the fault occurs on my test system, but I need the steps to do this.


    Tuesday, July 15, 2008 5:38 PM
  • Just wondering if you've gotten to the bottom of this. We have exactly the same error with an application written in VB6 with a .NET 2 interop component. Again happening pretty randomly but it has a lot of users so it's happening a lot.

    I've been digging and the error seems to be related to access rights, permissions and trust, but as this is Kernel32.exe it seems a very odd trust issue.

    Can I ask, have you been experiencing any AD related issues regarding profiles etc.. the only other clue we have on our system?
    Between a rock and a hard place
    Friday, July 25, 2008 10:39 AM
  • Hello,

    No, I haven't resolved this.  I have a Microsoft consultant working with me to get a dump of the program when it dies (by attaching it to a debugger). 

    I don't believe that it has anything to do with permissions or profiles because we the program runs on the server and writes to the database as the SA user.  We don't have AD on these systems.

    My program is, but it has one older COM object (Winsock) which is instantiated but not used.

    We are suspicious that we might have a conflict with a timer method in the main form and an asynchronous method that runs when the TCPIP reads complete, but we have to get a dump to see what is happening. 

    Here is a pointer to some debugging information we are trying to use:

    I will post more information if I find out what is causing this problem.

    Good luck,

    Friday, July 25, 2008 3:55 PM
  • Hi,

    we've gotten a little more info to. Ours is a very large VB6 application which uses interop to talk to an SOA style application to one side (using the chip a bit off at a time approach to migrate to .NET). It would appear that recently (this didn't happen a little over a month ago) an unhandled exception in the VB6 is now picked up initially by the .NET runtime. In a live set-up you now get .NET dialog with a message and a debug button. Click on debug and you get the actual error in the underlying VB6 application.

    The amazing thing is you also get this dreaded error in the event log. We have the added problem that the user community interact with the system via Terminal Servers and they aren't getting the error reported to them, it makes its was back to the master terminal....

    We can create this error in our own test system but so far tracking it in live is proving very difficult. Our VB6 application logging may help but we are having permission issues with that too :(

    I'll let you know if anything else crops up - hope our experience helps a little - it may be an unhandled exception in your VB component :)

    Between a rock and a hard place
    Friday, July 25, 2008 4:06 PM