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

Print callstack in error case in runAWTLoopWithApp

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b23
    • CPU:
      generic
    • OS:
      os_x

      Backports

        Description

        Currently in case of occurences of an NSException in runAWTLoopWithApp we catch the exception just print a simple error message like this :

        2020-10-30 15:28:33.027 java[634:8435] Apple AWT Startup Exception: Cannot lock focus on image <NSImage 0x7fd350d7f9f0 Size={0, 0} RepProvider=(null)>, because it is size zero.
        2020-10-30 15:28:33.306 java[634:8435] Apple AWT Restarting Native Event Thread

        But we omit the callstack and loose valuable information. For example :


        2020-10-30 15:28:33.027 java[634:8435] Apple AWT Startup Exception: Cannot lock focus on image <NSImage 0x7fd350d7f9f0 Size={0, 0} RepProvider=(null)>, because it is size zero.
        2020-10-30 15:28:33.305 java[634:8435] Apple AWT Startup Exception callstack: (
        0 CoreFoundation 0x00007fff206096cf __exceptionPreprocess + 242
        1 libobjc.A.dylib 0x00007fff203403c9 objc_exception_throw + 48
        2 CoreFoundation 0x00007fff20609533 +[NSException raise:format:] + 189
        3 AppKit 0x00007fff22f05250 -[NSImage _lockFocusOnRepresentation:rect:context:hints:flipped:] + 257
        ...
        16 libawt_lwawt.dylib 0x00000001282b610f +[AWTStarter starter:headless:] + 834
        17 JavaNativeFoundation 0x00007fff6e7b770f +[JNFRunLoop _performCopiedBlock:] + 15
        18 Foundation 0x00007fff21337c09 __NSThreadPerformPerform + 204
        19 CoreFoundation 0x00007fff2058fa0c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
        20 CoreFoundation 0x00007fff2058f974 __CFRunLoopDoSource0 + 180
        21 CoreFoundation 0x00007fff2058f6ef __CFRunLoopDoSources0 + 248
        22 CoreFoundation 0x00007fff2058e121 __CFRunLoopRun + 890
        23 CoreFoundation 0x00007fff2058d6ce CFRunLoopRunSpecific + 563
        24 libjli.dylib 0x00000001088e63d9 CreateExecutionEnvironment + 400
        25 libjli.dylib 0x00000001088e253b JLI_Launch + 1379
        26 java 0x00000001088d5da5 main + 373
        27 libdyld.dylib 0x00007fff204b2591 start + 1
        )
        2020-10-30 15:28:33.306 java[634:8435] Apple AWT Restarting Native Event Thread

        So it would be better to include the stack info for enhanced error analysis.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                mbaesken Matthias Baesken
                Reporter:
                mbaesken Matthias Baesken
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: