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

Crash on graphics card switch when dialog is open with Metal API validation

    XMLWordPrintable

    Details

    • Subcomponent:
      2d

      Description

      I initially ran into this on NetBeans, and was able to then reproduce it with SwingSet2.

      To reproduce this:

      1. Run SwingSet2 as follows:

      $ export METAL_DEVICE_WRAPPER_TYPE=1
      $ export MTL_SHADER_VALIDATION=1
      $ java -Dsun.java2d.metal=True -jar SwingSet2.jar

      2. Switch to the JOptionPage demo tab

      3. Open any dialog, such as "Show input dialog"

      4. Then do something that causes a graphics card switch. It will crash when switching from the integrated graphics card to the discrete graphics card or vice versa (it is only necessary to switch in one direction).

      BUG: it will crash as soon as the graphics card switch happens.

      2021-02-23 09:35:48.956 java[93635:412999] Metal API Validation Enabled
      2021-02-23 09:35:49.253 system_profiler[93637:413103] Metal API Validation Enabled
      Metal pipeline enabled on screen 2077748985
      Metal pipeline enabled on screen 69734662
      -[MTLDebugRenderCommandEncoder setFragmentSamplerState:atIndex:]:1842: failed assertion `sampler is associated with a different device'
      Abort trap: 6

      See the attached crash report.

        Attachments

        1. crash-report-nb-bad-addr.txt
          169 kB
        2. crash-report-switch.txt
          104 kB
        3. device_switch.patch
          7 kB
        4. fix.patch
          6 kB
        5. hs_err_pid22552.log
          106 kB
        6. SwingSet2-blank.png
          SwingSet2-blank.png
          391 kB

          Issue Links

            Activity

              People

              Assignee:
              aghaisas Ajit Ghaisas
              Reporter:
              kcr Kevin Rushforth
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: