* disable crash workaround until we actually fix it

This commit is contained in:
Reinhard Pointner 2015-05-05 13:48:16 +00:00
parent 73dddd93a2
commit 7c5b6bf891
2 changed files with 20 additions and 21 deletions

View File

@ -209,7 +209,7 @@
<target name="appbundle" description="Build an OSX application bundle"> <target name="appbundle" description="Build an OSX application bundle">
<taskdef name="bundleapp" classname="com.oracle.appbundler.AppBundlerTask" classpath="${dir.lib}/build/appbundler.jar" /> <taskdef name="bundleapp" classname="com.oracle.appbundler.AppBundlerTask" classpath="${dir.lib}/build/appbundler.jar" />
<bundleapp minimumsystemversion="10.8" outputdirectory="${dir.dist}" name="${title}" displayname="${title}" shortversion="${version}" identifier="net.sourceforge.FileBot" mainclassname="net.filebot.Main" icon="${dir.installer}/appbundle/filebot.icns" copyright="2015 Reinhard Pointner" applicationcategory="public.app-category.productivity"> <bundleapp minimumsystemversion="10.8" outputdirectory="${dir.dist}" name="${title}" displayname="${title}" shortversion="${version}" identifier="net.sourceforge.FileBot" mainclassname="net.filebot.Main" icon="${dir.installer}/appbundle/filebot.icns" copyright="2015 Reinhard Pointner" applicationcategory="public.app-category.productivity" supportsautomaticgraphicsswitching="true">
<classpath file="${path.fatjar}" /> <classpath file="${path.fatjar}" />
<librarypath dir="${dir.lib}/native/mac-x86_64" /> <librarypath dir="${dir.lib}/native/mac-x86_64" />
<arch name="x86_64" /> <arch name="x86_64" />
@ -259,7 +259,7 @@
<property name="jre.version" value="jdk1.8.0_45.jdk" /> <property name="jre.version" value="jdk1.8.0_45.jdk" />
<property name="jre.path" value="/Library/Java/JavaVirtualMachines/${jre.version}/Contents/Home" /> <property name="jre.path" value="/Library/Java/JavaVirtualMachines/${jre.version}/Contents/Home" />
<bundleapp minimumsystemversion="10.8" executablename="FileBotAppLauncher" version="${svn.revision}" outputdirectory="${dir.dist}" name="${title}" displayname="${title}" shortversion="${version}" identifier="net.filebot.FileBot" mainclassname="net.filebot.Main" icon="${dir.installer}/appbundle/filebot.icns" copyright="2015 Reinhard Pointner" applicationcategory="public.app-category.productivity" supportsautomaticgraphicsswitching="false"> <bundleapp minimumsystemversion="10.8" executablename="FileBotAppLauncher" version="${svn.revision}" outputdirectory="${dir.dist}" name="${title}" displayname="${title}" shortversion="${version}" identifier="net.filebot.FileBot" mainclassname="net.filebot.Main" icon="${dir.installer}/appbundle/filebot.icns" copyright="2015 Reinhard Pointner" applicationcategory="public.app-category.productivity" supportsautomaticgraphicsswitching="true">
<classpath file="${path.fatjar}" /> <classpath file="${path.fatjar}" />
<librarypath dir="${dir.lib}/native/mac-x86_64" /> <librarypath dir="${dir.lib}/native/mac-x86_64" />
<arch name="x86_64" /> <arch name="x86_64" />

View File

@ -17,7 +17,6 @@ import java.util.concurrent.Callable;
import java.util.concurrent.FutureTask; import java.util.concurrent.FutureTask;
import java.util.logging.Level; import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
import java.util.prefs.Preferences;
import javax.swing.JFileChooser; import javax.swing.JFileChooser;
@ -201,30 +200,30 @@ public class UserFiles {
COCOA { COCOA {
private final String KEY_NSOPENPANEL_BROKEN = "NSOPENPANEL_BROKEN"; // private final String KEY_NSOPENPANEL_BROKEN = "NSOPENPANEL_BROKEN";
@Override @Override
public List<File> showLoadDialogSelectFiles(boolean folderMode, boolean multiSelection, File defaultFile, ExtensionFileFilter filter, String title, ActionEvent evt) { public List<File> showLoadDialogSelectFiles(boolean folderMode, boolean multiSelection, File defaultFile, ExtensionFileFilter filter, String title, ActionEvent evt) {
// directly use NSOpenPanel for via Objective-C bridge for FILES_AND_DIRECTORIES mode // directly use NSOpenPanel for via Objective-C bridge for FILES_AND_DIRECTORIES mode
if (folderMode && filter != null) { if (folderMode && filter != null) {
// NSOpenPanel causes deadlocks on some machines // NSOpenPanel causes deadlocks on some machines
Preferences persistence = Preferences.userNodeForPackage(UserFiles.class); // Preferences persistence = Preferences.userNodeForPackage(UserFiles.class);
if (!persistence.getBoolean(KEY_NSOPENPANEL_BROKEN, false)) { // if (!persistence.getBoolean(KEY_NSOPENPANEL_BROKEN, false)) {
try { try {
// assume that NSOpenPanel may freeze the application until it is killed, and make sure to not use NSOpenPanel on subsequent runs // assume that NSOpenPanel may freeze the application until it is killed, and make sure to not use NSOpenPanel on subsequent runs
persistence.putBoolean(KEY_NSOPENPANEL_BROKEN, true); // persistence.putBoolean(KEY_NSOPENPANEL_BROKEN, true);
persistence.flush(); // persistence.flush();
// call native NSOpenPanel openPanel via Objective-C bridge // call native NSOpenPanel openPanel via Objective-C bridge
return MacAppUtilities.NSOpenPanel_openPanel_runModal(title, true, true, true, filter.acceptAny() ? null : filter.extensions()); return MacAppUtilities.NSOpenPanel_openPanel_runModal(title, true, true, true, filter.acceptAny() ? null : filter.extensions());
} catch (Throwable e) { } catch (Throwable e) {
Logger.getLogger(UserFiles.class.getName()).log(Level.WARNING, e.toString()); Logger.getLogger(UserFiles.class.getName()).log(Level.WARNING, e.toString());
} finally { } finally {
persistence.putBoolean(KEY_NSOPENPANEL_BROKEN, false); // NSOpenPanel did not freeze application // persistence.putBoolean(KEY_NSOPENPANEL_BROKEN, false); // NSOpenPanel did not freeze application
}
} else {
Logger.getLogger(UserFiles.class.getName()).log(Level.WARNING, "NSOpenPanel broken. Using AWT implementation instead.");
} }
// } else {
// Logger.getLogger(UserFiles.class.getName()).log(Level.WARNING, "NSOpenPanel broken. Using AWT implementation instead.");
// }
} }
// default to AWT implementation // default to AWT implementation