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

SplashScreen should not set the XErrorHandler

XMLWordPrintable

    • b17
    • generic
    • generic
    • Not verified

      The SplashInitPlatform() function at the src/solaris/native/sun/awt/splashscreen/splashscreen_sys.c file ivokes the XSetErrorHandler() xlib fucntion setting the HandleError() function (located at the same file) as the ErrorHandler. This error handler function simply returns zero. However, Xlib Reference Manual states that the default error handler prints a error message and exits.

      The problem is the fact that the SplashCleanupPlatform() function does not reset the error handler invoking the XSetErrorHandler(NULL). This means that all the consequent Xlib interactions in the AWT code implicitly use this silent error handler. On the other hand, this handler may not be simply reset, because closing of teh splash screen happens after the AWT initialized its own connection to the X server, and probably set some ErrorHandler already. Resetting it to NULL could lead to errors.

      Moreover, it seems completely unnecessary to silently mask all the errors doing nothing.

            anthony Anthony Petrov (Inactive)
            anthony Anthony Petrov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: