Cannot open "Browse" commands so can't add books

I have SAB 10.2, on Windows 11 with all the latest updates. I cannot open any “browse” commands that would point to Windows Explorer which means I cannot add any books or add any content to a new app. I have updated all the code libraries and the SDK libraries (all are green), done all windows updates and restarted. I’ve uninstalled SAB, restarted and re-installed it. But still the same problem. I have an older version of RAB on the same computer (10.0.1) and it works fine, as did my previous version of SAB. Thanks for any suggestions. The error log is in the comment below.

Error Log Start: Thu Feb 02 19:52:59 UTC 2023
Exception in thread “AWT-EventQueue-0” java.lang.IllegalArgumentException: Comparison method violates its general contract!
at java.base/java.util.ComparableTimSort.mergeHi(Unknown Source)
at java.base/java.util.ComparableTimSort.mergeAt(Unknown Source)
at java.base/java.util.ComparableTimSort.mergeForceCollapse(Unknown Source)
at java.base/java.util.ComparableTimSort.sort(Unknown Source)
at java.base/java.util.Arrays.sort(Unknown Source)
at java.desktop/sun.awt.shell.Win32ShellFolderManager2.get(Unknown Source)
at java.desktop/sun.awt.shell.ShellFolder.get(Unknown Source)
at java.desktop/javax.swing.plaf.metal.MetalFileChooserUI$DirectoryComboBoxModel.addItem(Unknown Source)
at java.desktop/javax.swing.plaf.metal.MetalFileChooserUI.doDirectoryChanged(Unknown Source)
at java.desktop/javax.swing.plaf.metal.MetalFileChooserUI$5.propertyChange(Unknown Source)
at java.desktop/java.beans.PropertyChangeSupport.fire(Unknown Source)
at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
at java.desktop/java.awt.Component.firePropertyChange(Unknown Source)
at java.desktop/javax.swing.JFileChooser.setCurrentDirectory(Unknown Source)
at java.desktop/javax.swing.JFileChooser.(Unknown Source)
at java.desktop/javax.swing.JFileChooser.(Unknown Source)
at org.sil.app.builder.common.reader.table.BookTablePane.addBooks(BookTablePane.java:719)
at org.sil.app.builder.common.reader.panel.BookCollectionPanel.lambda$buildBooksPanel$2(BookCollectionPanel.java:386)
at java.desktop/javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at java.desktop/javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.desktop/java.awt.Component.processMouseEvent(Unknown Source)
at java.desktop/javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.desktop/java.awt.Component.processEvent(Unknown Source)
at java.desktop/java.awt.Container.processEvent(Unknown Source)
at java.desktop/java.awt.Component.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.Window.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)

I started up my Windows 11 VM and was able to click on the Add Books in a Book Collection.

What version of Windows 11 are you running? This is what my System > About displays:

Edition: Windows 11 Pro
Version: 21H2
Installed on 12/2/2021
OS build: 22000.1516
Experience: Windows Feature Experience Pack 1000.22000.1516.0

Does this happen for all projects? Can you try to create a new project and see if it still happens?

Thanks,
Chris

I’m running 22H2, here are the about details below.
Yes, it’s for all existing projects, and still happens when I try and create a new project - When I go to run the wizard I can give the app a name, then the package name, but then can’t add any books to it.

image

As a work around. Don’t add books in the wizard. Add them after the wizard is finished. You have the Add Books… button, or you can drag and drop from Explorer into SAB.

OK, I didn’t know about the drag and drop option so that seems to work ok for adding books and audio files. But even for example in the wizard, the ‘browse’ to choose the keystore doesn’t work. No ‘path finding’ options work. I was at least able to manually paste the correct path in the box though. I wonder if there is any chance it’s similar to the problem described at this link?

Do you have antivirus on? Can you turn that off (turn off internet for safety) and see if that makes a difference.

I just have Microsoft Defender / Windows Security that comes with Windows 11. I turned it off, and tried again, but no difference.

Do you have more than one version of Java installed on your machine? Maybe SAB is automatically using a version which is broken in some way.

SAB only uses the JRE installed with SAB. Found at: C:\Program Files (x86)\SIL\Scripture App Builder\runtime

If you have not tried it, then uninstall and reinstall SAB.

Thanks, yes, I’ve checked the different java versions and I’ve tried multiple uninstalls and reinstalls of SAB, even of different versions. To briefly summarise where things are at, it turns out SAB actually works fine on a different user account on the same computer, but frustratingly I cannot get it to work correctly on my main account. I had a screen-share call with ChrisH on Friday but we haven’t yet been able to find a solution. One possibility is that’s a strange issue with the locale or One drive files, as it seems to be an error related to sort order anywhere SAB calls up the Windows Explorer dialogue, but we haven’t managed to pin it down any further.

Update: I’ve finally got it working again. I had to change some settings in One Drive first before unlinking from it. Otherwise my Windows Explorer would constantly default to One Drive and the java runtime within SAB seemed to have problems with that. Thanks for the suggestions.