Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not show 'open' dialog #75

Closed
ShingZhanho opened this issue Feb 16, 2022 · 7 comments
Closed

Could not show 'open' dialog #75

ShingZhanho opened this issue Feb 16, 2022 · 7 comments
Labels
bug Something isn't working

Comments

@ShingZhanho
Copy link

Environment info

  • BlockMap version: 2.4.0
  • Java version: 17.0.2
  • Operating system: Windows 10 Pro Build 19044

Description

When the program runs for the first time, it works fine. But after exiting and launching the program for the second time, it shows the error "Could not show 'open' dialog", which prevents me from loading any other worlds into the program.

Steps to reproduce

  1. Load a world into the program (which is from the server client in my case.)
  2. Close the program.
  3. Open it again, and it shows the error.

Expected result:

Show 'open' dialog and let me load a world.

Screenshots

image

Debug log

Feb 16, 2022 8:57:17 AM com.sun.javafx.application.PlatformImpl startup
WARNING: Unsupported JavaFX configuration: classes were loaded from 'unnamed module @4e004cf8'
WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
22-02-16 08:57:20 INFO  RegionFolderCache [73] - Removed 0 worlds from cache
22-02-16 08:57:23 ERROR GuiController [375] - Could not show 'open' dialog, please file a bug report
java.lang.NullPointerException: Cannot invoke "java.util.Optional.map(java.util.function.Function)" because "item.iconURL" is null
        at de.piegames.blockmap.gui.standalone.OpenDialog$MinecraftListCell.updateItem(OpenDialog.java:247) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at de.piegames.blockmap.gui.standalone.OpenDialog$MinecraftListCell.updateItem(OpenDialog.java:207) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at javafx.scene.control.ListCell.updateItem(ListCell.java:481) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at javafx.scene.control.ListCell.indexChanged(ListCell.java:337) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at javafx.scene.control.IndexedCell.updateIndex(IndexedCell.java:120) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at javafx.scene.control.skin.VirtualFlow.setCellIndex(VirtualFlow.java:1807) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at javafx.scene.control.skin.VirtualFlow.getCell(VirtualFlow.java:1791) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at javafx.scene.control.skin.VirtualFlow.getOrCreateCellSize(VirtualFlow.java:2966) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at javafx.scene.control.skin.VirtualFlow.getOrCreateCellSize(VirtualFlow.java:2949) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at javafx.scene.control.skin.VirtualFlow.recalculateAndImproveEstimatedSize(VirtualFlow.java:3021) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at javafx.scene.control.skin.VirtualFlow.recalculateEstimatedSize(VirtualFlow.java:3013) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at javafx.scene.control.skin.VirtualFlow.layoutChildren(VirtualFlow.java:1052) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at javafx.scene.control.skin.VirtualFlow$5.invalidated(VirtualFlow.java:885) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at javafx.beans.property.IntegerPropertyBase.markInvalid(IntegerPropertyBase.java:113) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at javafx.beans.property.IntegerPropertyBase.set(IntegerPropertyBase.java:148) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at javafx.scene.control.skin.VirtualFlow.setCellCount(VirtualFlow.java:899) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at javafx.scene.control.skin.ListViewSkin.updateItemCount(ListViewSkin.java:357) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at javafx.scene.control.skin.ListViewSkin.<init>(ListViewSkin.java:241) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at javafx.scene.control.ListView.createDefaultSkin(ListView.java:989) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at javafx.scene.control.Control.doProcessCSS(Control.java:897) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at javafx.scene.control.Control$1.doProcessCSS(Control.java:89) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at com.sun.javafx.scene.control.ControlHelper.processCSSImpl(ControlHelper.java:67) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:146) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at javafx.scene.Parent.doProcessCSS(Parent.java:1400) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at javafx.scene.Parent$1.doProcessCSS(Parent.java:125) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at com.sun.javafx.scene.ParentHelper.processCSSImpl(ParentHelper.java:98) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:146) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at javafx.scene.Parent.doProcessCSS(Parent.java:1400) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at javafx.scene.Parent$1.doProcessCSS(Parent.java:125) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at com.sun.javafx.scene.ParentHelper.processCSSImpl(ParentHelper.java:98) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:146) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at javafx.scene.Node.processCSS(Node.java:9456) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at javafx.scene.Scene.doCSSPass(Scene.java:572) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at javafx.scene.Scene.preferredSize(Scene.java:1774) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at javafx.scene.Scene$2.preferredSize(Scene.java:396) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at com.sun.javafx.scene.SceneHelper.preferredSize(SceneHelper.java:66) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at javafx.stage.Window$12.invalidated(Window.java:1114) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:110) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:145) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at javafx.stage.Window.setShowing(Window.java:1190) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at javafx.stage.Window.show(Window.java:1205) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at javafx.stage.Stage.show(Stage.java:273) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at javafx.stage.Stage.showAndWait(Stage.java:463) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at javafx.scene.control.HeavyweightDialog.showAndWait(HeavyweightDialog.java:162) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at javafx.scene.control.Dialog.showAndWait(Dialog.java:346) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at de.piegames.blockmap.gui.standalone.GuiController.showLoadDialog(GuiController.java:373) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at de.piegames.blockmap.gui.standalone.GuiMain.lambda$start$3(GuiMain.java:94) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at java.util.Optional.ifPresentOrElse(Optional.java:198) ~[?:?]
        at de.piegames.blockmap.gui.standalone.GuiMain.start(GuiMain.java:89) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:847) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:484) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:457) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at java.security.AccessController.doPrivileged(AccessController.java:399) ~[?:?]
        at com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:456) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at com.sun.glass.ui.win.WinApplication._runLoop(Native Method) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:184) ~[BlockMap-gui-2.4.0-windows.jar:?]
        at java.lang.Thread.run(Thread.java:833) [?:?]
@saibotk saibotk added the bug Something isn't working label Feb 16, 2022
@piegamesde
Copy link
Owner

piegamesde commented Feb 16, 2022

I ran into this too not long ago. I hope that I can have a look at this soon because it's a total show breaker.

@piegamesde
Copy link
Owner

The issue happens when you load a (corrupt) world where no preview image could be generated. Deleting your history in .cache/blockmap/recent.json should temporarily resolve the issue. Alternatively, you can edit besaid JSON file so that every entry contains an iconURL field.

piegamesde added a commit that referenced this issue Feb 16, 2022
Closes #75
There's absolutely no reason that value should be null, it should be `Optional.empty()`
instead. Also, I don't know why the other optionals seem to work but this one doesn't.
@ShingZhanho
Copy link
Author

On my Windows machine, it doesn't even have the .cache/blockmap directory under C:\Users\<User>. But 79d4714 worked just fine on my Ubuntu machine. Thanks for the fix.

@piegamesde
Copy link
Owner

Oh sorry, I hadn't checked that you're on Windows. So basically the file is blockmap/recent.json relative to wherever your OS usually puts application cache data.

@velzenor
Copy link

velzenor commented Feb 20, 2022

For anyone in the same boat, the json file was in C:\Users\<User>\AppData\Local\piegames\blockmap\cache on my Windows 10 machine. Deleting that worked for me.

@piegamesde
Copy link
Owner

I released version 2.4.1, containing the fix. (Windows build will be uploaded during the next days)

@ShingZhanho
Copy link
Author

I've managed to build the Windows binary on my machine

BlockMap-gui-2.4.1-windows.zip

Do rename the file extension to .jar by the way, since that is not supported in issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants