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

Reproducible Test for JDK-8179014 (JFileChooser crashes on win 10 + jre8u131)

    Details

    • Subcomponent:
    • CPU:
      x86_64
    • OS:
      windows_10

      Description

      FULL PRODUCT VERSION :
      java version "1.8.0_131"
      Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
      Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

      FULL OS VERSION :
      Win10 1703

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      GodMode Directory for Windows (see attached Source!)

      A DESCRIPTION OF THE PROBLEM :
      If a "GodMode" Directory exists in userHome the JFileChooser will crash on this directory (or even other directorys!)

      reproduceable Test.java attached!

      THE PROBLEM WAS REPRODUCIBLE WITH -Xint FLAG: No

      THE PROBLEM WAS REPRODUCIBLE WITH -server FLAG: No

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Run the attached Test - it will crash the jvm on win10 1703!

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      Should not crash jvm
      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import javax.swing.*;

      import java.io.File;
      import java.io.IOException;

      import java.nio.file.Path;
      import java.nio.file.Paths;
      import java.nio.file.Files;

      import javax.swing.JFileChooser;
      import javax.swing.filechooser.FileSystemView;

      // Test works only win10 1703 and newer?
      // http://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8179014
      public class Test extends JFrame {
        public static void main(String args[]) {
          try{
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
          } catch(Exception e){
            e.printStackTrace();
            return;
          }

          final FileSystemView fsv = FileSystemView.getFileSystemView();

          // works fine
          System.out.println("Home:" + FileSystemView.getFileSystemView().getHomeDirectory());

          Path godDir = Paths.get(FileSystemView.getFileSystemView().getHomeDirectory().toString(), "GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}");
          if (Files.exists(godDir))
          {
            System.out.println("deleting : " + godDir);
            try
            {
               Files.delete(godDir);
            }
            catch (IOException e)
            {
               throw new AssertionError("could not delete: " + e.getMessage(), e);
            }
          }

          // if a dir "GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}" is present on windows crash - else OK!
          JFileChooser jfc = new JFileChooser(FileSystemView.getFileSystemView().getHomeDirectory(), fsv );
          System.out.println("Works fine!");

          try
          {
             Files.createDirectory(godDir);
          }
          catch (IOException e)
          {
              throw new AssertionError("should not happen: " + e.getMessage(), e);
          }

          System.out.println("call with GodDir");
          jfc = new JFileChooser(FileSystemView.getFileSystemView().getHomeDirectory(), fsv );
          throw new AssertionError("should not reach this point!");
        }
      }
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Delete GodMode Dir in userHome!

      1. hs_err_pid964.log
        22 kB
        Pardeep Sharma
      2. Test.java
        2 kB
        Pardeep Sharma

        Issue Links

          Activity

          Hide
          pardesha Pardeep Sharma added a comment -
          If GodMode is enabled in Windows 10 (v1703), JFileChooser program will crash.
          Note: GodMode is a dedicated folder that lets you see all control panels in one place

          Checked this for JDK 8u121, 8u131, 8u152, and 9 ea and could confirm the report.

          Steps to reproduce:
          - Ensure that Windows 10 system is running version 1703
          1. Create a new folder on the desktop.
          2. Rename the folder exactly as given below:
          GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}
          3. Run the attached test case (Test.java) with specific JDK version.
          8u121 b13: FAIL
          8u131 b11: FAIL
          8u152 ea b02: FAIL
          9 ea b166: FAIL

          Output with JDK 8u131:
          =====================
          C:\test>"c:\Program Files\Java\jdk1.8.0_131\bin\java.exe" Test
          Home:C:\Users\tester\Desktop
          deleting : C:\Users\tester\Desktop\GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}
          Works fine!
          call with GodDir
          #
          # A fatal error has been detected by the Java Runtime Environment:
          #
          # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000074816adf, pid=964, tid=0x00000000000013b0
          #
          # JRE version: Java(TM) SE Runtime Environment (8.0_131-b11) (build 1.8.0_131-b11)
          # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.131-b11 mixed mode windows-amd64 compressed oops)
          # Problematic frame:
          # C [msvcr100.dll+0x36adf]
          #
          # Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
          #
          # An error report file with more information is saved as:
          # C:\test\hs_err_pid964.log
          #
          # If you would like to submit a bug report, please visit:
          # http://bugreport.java.com/bugreport/crash.jsp
          # The crash happened outside the Java Virtual Machine in native code.
          # See problematic frame for where to report the bug.
          #
          ========================

          Also see attaced hs error log from jdk 8u131 run.

          Received Assetion error when run in earlier Windows 10 version 1511.
          >java Test
          Home:C:\Users\tester\Desktop
          deleting : C:\Users\tester\Desktop\GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}
          Works fine!
          call with GodDir
          Exception in thread "main" java.lang.AssertionError: should not reach this point!
                  at Test.main(Test.java:58)
          Show
          pardesha Pardeep Sharma added a comment - If GodMode is enabled in Windows 10 (v1703), JFileChooser program will crash. Note: GodMode is a dedicated folder that lets you see all control panels in one place Checked this for JDK 8u121, 8u131, 8u152, and 9 ea and could confirm the report. Steps to reproduce: - Ensure that Windows 10 system is running version 1703 1. Create a new folder on the desktop. 2. Rename the folder exactly as given below: GodMode.{ED7BA470-8E54-465E-825C-99712043E01C} 3. Run the attached test case (Test.java) with specific JDK version. 8u121 b13: FAIL 8u131 b11: FAIL 8u152 ea b02: FAIL 9 ea b166: FAIL Output with JDK 8u131: ===================== C:\test>"c:\Program Files\Java\jdk1.8.0_131\bin\java.exe" Test Home:C:\Users\tester\Desktop deleting : C:\Users\tester\Desktop\GodMode.{ED7BA470-8E54-465E-825C-99712043E01C} Works fine! call with GodDir # # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000074816adf, pid=964, tid=0x00000000000013b0 # # JRE version: Java(TM) SE Runtime Environment (8.0_131-b11) (build 1.8.0_131-b11) # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.131-b11 mixed mode windows-amd64 compressed oops) # Problematic frame: # C [msvcr100.dll+0x36adf] # # Failed to write core dump. Minidumps are not enabled by default on client versions of Windows # # An error report file with more information is saved as: # C:\test\hs_err_pid964.log # # If you would like to submit a bug report, please visit: # http://bugreport.java.com/bugreport/crash.jsp # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. # ======================== Also see attaced hs error log from jdk 8u131 run. Received Assetion error when run in earlier Windows 10 version 1511. >java Test Home:C:\Users\tester\Desktop deleting : C:\Users\tester\Desktop\GodMode.{ED7BA470-8E54-465E-825C-99712043E01C} Works fine! call with GodDir Exception in thread "main" java.lang.AssertionError: should not reach this point!         at Test.main(Test.java:58)
          Hide
          pardesha Pardeep Sharma added a comment -
          Closing this as duplicate of JDK-8179014. For further update, see JDK-8179057.
          Show
          pardesha Pardeep Sharma added a comment - Closing this as duplicate of JDK-8179014 . For further update, see JDK-8179057 .

            People

            • Assignee:
              pardesha Pardeep Sharma
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: