Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4369908

C-side crash handler needed to obtain diagnostic information

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.3.1
    • 1.3.0
    • hotspot
    • 1.3.1
    • x86
    • windows_nt



      Name: mt13159 Date: 09/11/2000


      If a Java exception occurs, a stack trace is printed to the console. If a C-side exception occurs during execution of a Java program (for example in the VM, native class library code, or native application code) the stack trace currently cannot be obtained without a C debugger. This can result in extremely costly development efforts in the event of a crash on a customer machine. Either a developer must be sent on-site, or a large amount of time must be spent to precisely replicate the conditions under which the crash occured in a development environment. A better solution is to include a crash handler in Java, which is capable of dumping the C-side call stack to a file which can be sent back to development.
      This can be done using the SetUnhandledExceptionFilter() API on Windows. This sets a function which gets called whenever a C-side exception occurs. You can then use the IMAGEHLP.DLL functions to walk up the stack. When you build your optimized libraries, you create separate debug symbol files. These symbol files can be used to look up the addresses given in the customer stack trace, yielding the lines where the crash occured.
      There are some excellent articles with the full details on how to do this at:
      http://www.microsoft.com/msj/0497/hood/hood0497.htm
      http://www.microsoft.com/msj/0597/hood0597.htm
      (Review ID: 109394)
      ======================================================================

            busersunw Btplusnull User (Inactive)
            mthakore Mayank Thakore (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: