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

Mac: FileChooser.show() crashes in NSSavePanel when running in sandboxed environment

    Details

      Description

      I wrote a sample FX app, built a Mac Bundler using latest javapackage
      and sandboxed it using Apple codesign.

      When my app tries to show its FileChooser, it crashes with the stack below.
      FX2 FileChooser used to work in sandboxed environment : so its looks
      like a FX8 regression.


      May 22 15:44:23 dhcp-grenoble-10-166-105-209.fr.oracle.com
      <http://dhcp-grenoble-10-166-105-209.fr.oracle.com/> SandBoxer[10716]:
      An uncaught exception was raised
      May 22 15:44:23 dhcp-grenoble-10-166-105-209.fr.oracle.com
      <http://dhcp-grenoble-10-166-105-209.fr.oracle.com/> SandBoxer[10716]:
      GlassOpenPanel is not a supported subclass for sandboxing
      May 22 15:44:23 dhcp-grenoble-10-166-105-209.fr.oracle.com
      <http://dhcp-grenoble-10-166-105-209.fr.oracle.com/> SandBoxer[10716]: (
      0 CoreFoundation 0x00007fff90e4325c
      __exceptionPreprocess + 172
      1 libobjc.A.dylib 0x00007fff8cfd5e75
      objc_exception_throw + 43
      2 CoreFoundation 0x00007fff90e4310c
      +[NSException raise:format:] + 204
      3 AppKit 0x00007fff8f4562f1
      +[NSSavePanel newRemotePanel] + 157
      4 AppKit 0x00007fff8f456445
      +[NSSavePanel _crunchyRawUnbonedPanel] + 120
      5 libglass.dylib 0x00000001267a21cf
      Java_com_sun_glass_ui_mac_MacCommonDialogs__1showFileOpenChooser + 319
      6 ??? 0x00000001095f766e 0x0 +
      4452218478
      )


      Here is the entitlements I passed to codesign:

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
      <plist version="1.0">
      <dict>
          <key>com.apple.security.app-sandbox</key>
          <true/>
          <key>com.apple.security.files.user-selected.read-write</key>
          <true/>
      </dict>
      </plist>

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                anthony Anthony Petrov (Inactive)
                Reporter:
                eleponn Eric Le Ponner
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported: