Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: Sample file has not been set.

All your suggestions, requests and ideas for future development
Post Reply
j1simon
Posts: 24
Joined: 10 Nov 2015, 10:52

Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: Sample file has not been set.

Post by j1simon »

Arch Linux
openjdk version "1.8.0_121"
OpenJDK Runtime Environment (build 1.8.0_121-b13)
OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode)
filebot 4.7.9 installed from AUR package

When I press in "Open Format Editor" in "Preset Editor":

Code: Select all

$ filebot                 
May 22, 2017 9:28:05 PM java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: Sample file has not been set. Click "Change Sample" to select a sample file.
	at net.filebot.format.MediaBindingBean.getMediaFile(MediaBindingBean.java:966)
	at net.filebot.ui.rename.FormatDialog.<init>(FormatDialog.java:281)
	at net.filebot.ui.rename.PresetEditor.lambda$new$6(PresetEditor.java:317)
	at net.filebot.util.ui.SwingUI$LambdaAction.actionPerformed(SwingUI.java:379)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
	at java.awt.Component.processMouseEvent(Component.java:6533)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
	at java.awt.Component.processEvent(Component.java:6298)
	at java.awt.Container.processEvent(Container.java:2236)
	at java.awt.Component.dispatchEventImpl(Component.java:4889)
	at java.awt.Container.dispatchEventImpl(Container.java:2294)
	at java.awt.Component.dispatchEvent(Component.java:4711)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
	at java.awt.Container.dispatchEventImpl(Container.java:2280)
	at java.awt.Window.dispatchEventImpl(Window.java:2746)
	at java.awt.Component.dispatchEvent(Component.java:4711)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
	at java.awt.EventQueue$4.run(EventQueue.java:731)
	at java.awt.EventQueue$4.run(EventQueue.java:729)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
	at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184)
	at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229)
	at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:227)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:227)
	at java.awt.Dialog.show(Dialog.java:1084)
	at java.awt.Component.show(Component.java:1671)
	at java.awt.Component.setVisible(Component.java:1623)
	at java.awt.Window.setVisible(Window.java:1014)
	at java.awt.Dialog.setVisible(Dialog.java:1005)
	at net.filebot.ui.rename.RenamePanel.showPresetEditor(RenamePanel.java:621)
	at net.filebot.ui.rename.RenamePanel.lambda$null$12(RenamePanel.java:401)
	at java.util.Optional.ifPresent(Optional.java:159)
	at net.filebot.ui.rename.RenamePanel.lambda$null$13(RenamePanel.java:400)
	at net.filebot.util.ui.SwingUI$LambdaAction.actionPerformed(SwingUI.java:379)
	at net.filebot.ui.rename.RenamePanel.lambda$createPresetsPopup$14(RenamePanel.java:435)
	at net.filebot.util.ui.SwingUI$LambdaAction.actionPerformed(SwingUI.java:379)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
	at java.awt.Component.processMouseEvent(Component.java:6533)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
	at java.awt.Component.processEvent(Component.java:6298)
	at java.awt.Container.processEvent(Container.java:2236)
	at java.awt.Component.dispatchEventImpl(Component.java:4889)
	at java.awt.Container.dispatchEventImpl(Container.java:2294)
	at java.awt.Component.dispatchEvent(Component.java:4711)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
	at java.awt.Container.dispatchEventImpl(Container.java:2280)
	at java.awt.Window.dispatchEventImpl(Window.java:2746)
	at java.awt.Component.dispatchEvent(Component.java:4711)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
	at java.awt.EventQueue$4.run(EventQueue.java:731)
	at java.awt.EventQueue$4.run(EventQueue.java:729)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: Sample file has not been set.

Post by rednoah »

You can work around this problem by selecting a valid sample file first.

:idea: Open FileBot Image ➔ Edit Format Image ➔ Change Sample Image ➔ Open MediaInfo Image
:idea: Please read the FAQ and How to Request Help.
j1simon
Posts: 24
Joined: 10 Nov 2015, 10:52

Re: Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: Sample file has not been set.

Post by j1simon »

The "Open Mediainfo" button is deactivated:
Image

Do I have to select a media file from my hard disk?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: Sample file has not been set.

Post by rednoah »

Please click the Open button Image to select a file. You will have to select a file on your local hard disk. You can select a remote file, but it may not work the next time around when your network share isn't mounted.
:idea: Please read the FAQ and How to Request Help.
j1simon
Posts: 24
Joined: 10 Nov 2015, 10:52

Re: Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: Sample file has not been set.

Post by j1simon »

And when I delete that file? Have I to select another file? With previous versions this wasn't necessary.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: Sample file has not been set.

Post by rednoah »

I suppose so. That's why it's called a workaround. The underlying bug has been fixed 2 months ago but there hasn't been a release since. You can try the latest revision.
:idea: Please read the FAQ and How to Request Help.
j1simon
Posts: 24
Joined: 10 Nov 2015, 10:52

Re: Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: Sample file has not been set.

Post by j1simon »

I didn't know that was a workaround. :?
I'm trying the latest version that you has released: 4.7.9
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: Sample file has not been set.

Post by rednoah »

You can try the latest revision from here:
viewtopic.php?t=1609

But I think the workaround is quite easy, and having a valid sample file set is probably good for testing new formats anyway, which is probably why very few people run into this particular issue.


PS:

The GTK Look-and-Feel seems to look pretty good on your machine. What theme are you using? Mind taking a few screenshots of various FileBot screens?
:idea: Please read the FAQ and How to Request Help.
Post Reply