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

Reveal hangs after trying to open context menu #27

Open
Jens-H opened this issue Feb 10, 2021 · 6 comments
Open

Reveal hangs after trying to open context menu #27

Jens-H opened this issue Feb 10, 2021 · 6 comments
Labels
bug Something isn't working

Comments

@Jens-H
Copy link

Jens-H commented Feb 10, 2021

When I try to open the context menu, reveal sometimes hangs and throws exceptions in an endless loop. I could reproduce it only on my second screen and with the reveal window maximized (on Ubuntu with java 15). Also trying to open the context menu with a rather large output seems to be necessary.

The last entries in the stacktrace are:

java.lang.IllegalArgumentException: Both width and height must be >= 0
	at javafx.geometry.Rectangle2D.<init>(Rectangle2D.java:110)
	at vlaaad.reveal.popup$more_screen_space_below_QMARK_.invokeStatic(popup.clj:48)
	at vlaaad.reveal.popup$more_screen_space_below_QMARK_.invoke(popup.clj:34)
	at vlaaad.reveal.action_popup$view_impl.invokeStatic(action_popup.clj:162)
	at vlaaad.reveal.action_popup$view_impl.invoke(action_popup.clj:150)

So I added some prints to popup.clj see what is going on:

#object[javafx.stage.Screen 0xb116527 javafx.stage.Screen@a5a9bb0b bounds:Rectangle2D [minX = 2560.0, minY=0.0, maxX=4480.0, maxY=1080.0, width=1920.0, height=1080.0] visualBounds:Rectangle2D [minX = 2560.0, minY=27.0, maxX=4480.0, maxY=1080.0, width=1920.0, height=1053.0] dpi:91.0 outputScale:(1.0,1.0)]
#object[javafx.geometry.BoundingBox 0x4263f5f8 BoundingBox [minX:2590.01953125, minY:0.0, minZ:0.0, width:7.5048828125, height:16.99999999999998, depth:0.0, maxX:2597.5244140625, maxY:16.99999999999998, maxZ:0.0]]

Indeed it looks like the BoundingBox is not on my second screen and consequentially the logic from popup/more-screen-space-below? fails. I can however see no reason why the box is on the other screen and hope someone can help to figure out what is going on.

Happy to provide further information.

@vlaaad vlaaad added the bug Something isn't working label Feb 10, 2021
@vlaaad
Copy link
Owner

vlaaad commented Feb 10, 2021

Thanks, I'll have a look!

@skylize
Copy link

skylize commented Sep 9, 2022

Any progress on this?

I have the same problem 100% of the time with only a single screen.

Repro for me is just

  • Run the "Try it out" snippet from the docs.
  • Right click on Clojure version number in the Reveal window.

It blows up the console with an endless stream of IllegalArgumentExceptions.

Full stack trace of first Exception java.lang.IllegalArgumentException: Both width and height must be >= 0 at javafx.geometry.Rectangle2D.(Rectangle2D.java:110) at vlaaad.reveal.popup$more_screen_space_below_QMARK_.invokeStatic(popup.clj:50) at vlaaad.reveal.popup$more_screen_space_below_QMARK_.invoke(popup.clj:38) at vlaaad.reveal.action_popup$view_impl.invokeStatic(action_popup.clj:235) at vlaaad.reveal.action_popup$view_impl.invoke(action_popup.clj:222) at cljfx.lifecycle$call_dynamic_fn.invokeStatic(lifecycle.clj:67) at cljfx.lifecycle$call_dynamic_fn.invoke(lifecycle.clj:66) at cljfx.lifecycle$wrap_dynamic_fn$fn__1014.invoke(lifecycle.clj:73) at cljfx.lifecycle$eval928$fn__950$G__915__959.invoke(lifecycle.clj:17) at cljfx.lifecycle$create_dynamic_component.invokeStatic(lifecycle.clj:32) at cljfx.lifecycle$create_dynamic_component.invoke(lifecycle.clj:29) at cljfx.lifecycle$reify__1000.create(lifecycle.clj:39) at cljfx.lifecycle$wrap_get_env$reify__1326.create(lifecycle.clj:591) at cljfx.lifecycle$create_dynamic_component.invokeStatic(lifecycle.clj:32) at cljfx.lifecycle$create_dynamic_component.invoke(lifecycle.clj:29) at cljfx.lifecycle$reify__1000.create(lifecycle.clj:39) at cljfx.lifecycle$wrap_dynamic_fn$fn__1014.invoke(lifecycle.clj:76) at cljfx.lifecycle$eval928$fn__950$G__915__959.invoke(lifecycle.clj:17) at cljfx.lifecycle$create_dynamic_component.invokeStatic(lifecycle.clj:32) at cljfx.lifecycle$create_dynamic_component.invoke(lifecycle.clj:29) at cljfx.lifecycle$reify__1000.create(lifecycle.clj:39) at vlaaad.reveal.fx$reify__5259.create(fx.clj:37) at cljfx.lifecycle$create_dynamic_component.invokeStatic(lifecycle.clj:32) at cljfx.lifecycle$create_dynamic_component.invoke(lifecycle.clj:29) at cljfx.lifecycle$reify__1000.create(lifecycle.clj:39) at cljfx.lifecycle$wrap_dynamic_fn$fn__1014.invoke(lifecycle.clj:76) at cljfx.lifecycle$eval928$fn__950$G__915__959.invoke(lifecycle.clj:17) at cljfx.lifecycle$create_dynamic_component.invokeStatic(lifecycle.clj:32) at cljfx.lifecycle$create_dynamic_component.invoke(lifecycle.clj:29) at cljfx.lifecycle$reify__1000.create(lifecycle.clj:39) at cljfx.lifecycle$wrap_let_refs$reify__1278$fn__1289.invoke(lifecycle.clj:551) at clojure.core.protocols$iter_reduce.invokeStatic(protocols.clj:49) at clojure.core.protocols$fn__8230.invokeStatic(protocols.clj:75) at clojure.core.protocols$fn__8230.invoke(protocols.clj:75) at clojure.core.protocols$fn__8178$G__8173__8191.invoke(protocols.clj:13) at clojure.core$reduce.invokeStatic(core.clj:6886) at clojure.core$reduce.invoke(core.clj:6868) at cljfx.lifecycle$wrap_let_refs$reify__1278.advance(lifecycle.clj:536) at cljfx.lifecycle$reify__1000$fn__1001.invoke(lifecycle.clj:45) at clojure.core$update.invokeStatic(core.clj:6231) at clojure.core$update.invoke(core.clj:6223) at cljfx.lifecycle$reify__1000.advance(lifecycle.clj:45) at cljfx.lifecycle$wrap_dynamic_fn$fn__1018$fn__1021.invoke(lifecycle.clj:87) at clojure.core$update.invokeStatic(core.clj:6231) at clojure.core$update.invoke(core.clj:6223) at cljfx.lifecycle$wrap_dynamic_fn$fn__1018.invoke(lifecycle.clj:87) at cljfx.lifecycle$eval928$fn__929$G__917__940.invoke(lifecycle.clj:17) at cljfx.lifecycle$reify__1000$fn__1001.invoke(lifecycle.clj:45) at clojure.core$update.invokeStatic(core.clj:6231) at clojure.core$update.invoke(core.clj:6223) at cljfx.lifecycle$reify__1000.advance(lifecycle.clj:45) at vlaaad.reveal.fx$reify__5259$fn__5264.invoke(fx.clj:46) at clojure.core$update.invokeStatic(core.clj:6231) at clojure.core$update.invoke(core.clj:6223) at vlaaad.reveal.fx$reify__5259.advance(fx.clj:46) at cljfx.lifecycle$reify__1000$fn__1001.invoke(lifecycle.clj:45) at clojure.core$update.invokeStatic(core.clj:6231) at clojure.core$update.invoke(core.clj:6223) at cljfx.lifecycle$reify__1000.advance(lifecycle.clj:45) at cljfx.lifecycle$wrap_dynamic_fn$fn__1018$fn__1019.invoke(lifecycle.clj:82) at clojure.core$update.invokeStatic(core.clj:6231) at clojure.core$update.invoke(core.clj:6223) at cljfx.lifecycle$wrap_dynamic_fn$fn__1018.invoke(lifecycle.clj:80) at cljfx.lifecycle$eval928$fn__929$G__917__940.invoke(lifecycle.clj:17) at cljfx.lifecycle$reify__1000$fn__1001.invoke(lifecycle.clj:45) at clojure.core$update.invokeStatic(core.clj:6231) at clojure.core$update.invoke(core.clj:6223) at cljfx.lifecycle$reify__1000.advance(lifecycle.clj:45) at cljfx.lifecycle$wrap_extra_props$fn__1152.invoke(lifecycle.clj:369) at cljfx.lifecycle$eval928$fn__929$G__917__940.invoke(lifecycle.clj:17) at cljfx.lifecycle$wrap_many$fn__1101$fn__1105.invoke(lifecycle.clj:299) at clojure.core.protocols$iter_reduce.invokeStatic(protocols.clj:49) at clojure.core.protocols$fn__8230.invokeStatic(protocols.clj:75) at clojure.core.protocols$fn__8230.invoke(protocols.clj:75) at clojure.core.protocols$fn__8178$G__8173__8191.invoke(protocols.clj:13) at clojure.core$reduce.invokeStatic(core.clj:6886) at clojure.core$reduce.invoke(core.clj:6868) at cljfx.lifecycle$wrap_many$fn__1101.invoke(lifecycle.clj:293) at cljfx.lifecycle$eval928$fn__929$G__917__940.invoke(lifecycle.clj:17) at cljfx.composite$advance_composite_component$fn__1393$fn__1396.invoke(composite.clj:64) at clojure.core.protocols$iter_reduce.invokeStatic(protocols.clj:49) at clojure.core.protocols$fn__8230.invokeStatic(protocols.clj:75) at clojure.core.protocols$fn__8230.invoke(protocols.clj:75) at clojure.core.protocols$fn__8178$G__8173__8191.invoke(protocols.clj:13) at clojure.core$reduce.invokeStatic(core.clj:6886) at clojure.core$reduce.invoke(core.clj:6868) at cljfx.composite$advance_composite_component$fn__1393.invoke(composite.clj:55) at clojure.core$update.invokeStatic(core.clj:6231) at clojure.core$update.invoke(core.clj:6223) at cljfx.composite$advance_composite_component.invokeStatic(composite.clj:48) at cljfx.composite$advance_composite_component.invoke(composite.clj:43) at cljfx.lifecycle$eval928$fn__929$G__917__940.invoke(lifecycle.clj:17) at cljfx.lifecycle$reify__1000$fn__1001.invoke(lifecycle.clj:45) at clojure.core$update.invokeStatic(core.clj:6231) at clojure.core$update.invoke(core.clj:6223) at cljfx.lifecycle$reify__1000.advance(lifecycle.clj:45) at cljfx.lifecycle$wrap_let_refs$reify__1278$fn__1292.invoke(lifecycle.clj:557) at clojure.core$update.invokeStatic(core.clj:6231) at clojure.core$update.invoke(core.clj:6223) at cljfx.lifecycle$wrap_let_refs$reify__1278.advance(lifecycle.clj:557) at cljfx.lifecycle$reify__1000$fn__1001.invoke(lifecycle.clj:45) at clojure.core$update.invokeStatic(core.clj:6231) at clojure.core$update.invoke(core.clj:6223) at cljfx.lifecycle$reify__1000.advance(lifecycle.clj:45) at cljfx.lifecycle$wrap_let_refs$reify__1278$fn__1292.invoke(lifecycle.clj:557) at clojure.core$update.invokeStatic(core.clj:6231) at clojure.core$update.invoke(core.clj:6223) at cljfx.lifecycle$wrap_let_refs$reify__1278.advance(lifecycle.clj:557) at cljfx.lifecycle$reify__1000$fn__1001.invoke(lifecycle.clj:45) at clojure.core$update.invokeStatic(core.clj:6231) at clojure.core$update.invoke(core.clj:6223) at cljfx.lifecycle$reify__1000.advance(lifecycle.clj:45) at cljfx.lifecycle$wrap_dynamic_fn$fn__1018$fn__1021.invoke(lifecycle.clj:87) at clojure.core$update.invokeStatic(core.clj:6231) at clojure.core$update.invoke(core.clj:6223) at cljfx.lifecycle$wrap_dynamic_fn$fn__1018.invoke(lifecycle.clj:87) at cljfx.lifecycle$eval928$fn__929$G__917__940.invoke(lifecycle.clj:17) at cljfx.lifecycle$reify__1000$fn__1001.invoke(lifecycle.clj:45) at clojure.core$update.invokeStatic(core.clj:6231) at clojure.core$update.invoke(core.clj:6223) at cljfx.lifecycle$reify__1000.advance(lifecycle.clj:45) at cljfx.composite$advance_composite_component$fn__1393$fn__1396.invoke(composite.clj:64) at clojure.core.protocols$iter_reduce.invokeStatic(protocols.clj:49) at clojure.core.protocols$fn__8230.invokeStatic(protocols.clj:75) at clojure.core.protocols$fn__8230.invoke(protocols.clj:75) at clojure.core.protocols$fn__8178$G__8173__8191.invoke(protocols.clj:13) at clojure.core$reduce.invokeStatic(core.clj:6886) at clojure.core$reduce.invoke(core.clj:6868) at cljfx.composite$advance_composite_component$fn__1393.invoke(composite.clj:55) at clojure.core$update.invokeStatic(core.clj:6231) at clojure.core$update.invoke(core.clj:6223) at cljfx.composite$advance_composite_component.invokeStatic(composite.clj:48) at cljfx.composite$advance_composite_component.invoke(composite.clj:43) at cljfx.lifecycle$eval928$fn__929$G__917__940.invoke(lifecycle.clj:17) at cljfx.lifecycle$reify__1000$fn__1001.invoke(lifecycle.clj:45) at clojure.core$update.invokeStatic(core.clj:6231) at clojure.core$update.invoke(core.clj:6223) at cljfx.lifecycle$reify__1000.advance(lifecycle.clj:45) at cljfx.composite$advance_composite_component$fn__1393$fn__1396.invoke(composite.clj:64) at clojure.lang.ArraySeq.reduce(ArraySeq.java:119) at clojure.core$reduce.invokeStatic(core.clj:6885) at clojure.core$reduce.invoke(core.clj:6868) at cljfx.composite$advance_composite_component$fn__1393.invoke(composite.clj:55) at clojure.core$update.invokeStatic(core.clj:6231) at clojure.core$update.invoke(core.clj:6223) at cljfx.composite$advance_composite_component.invokeStatic(composite.clj:48) at cljfx.composite$advance_composite_component.invoke(composite.clj:43) at cljfx.lifecycle$eval928$fn__929$G__917__940.invoke(lifecycle.clj:17) at cljfx.lifecycle$wrap_on_delete$fn__1213.invoke(lifecycle.clj:437) at cljfx.lifecycle$eval928$fn__929$G__917__940.invoke(lifecycle.clj:17) at cljfx.lifecycle$reify__1000$fn__1001.invoke(lifecycle.clj:45) at clojure.core$update.invokeStatic(core.clj:6231) at clojure.core$update.invoke(core.clj:6223) at cljfx.lifecycle$reify__1000.advance(lifecycle.clj:45) at cljfx.lifecycle$wrap_let_refs$reify__1278$fn__1289.invoke(lifecycle.clj:544) at clojure.core.protocols$iter_reduce.invokeStatic(protocols.clj:49) at clojure.core.protocols$fn__8230.invokeStatic(protocols.clj:75) at clojure.core.protocols$fn__8230.invoke(protocols.clj:75) at clojure.core.protocols$fn__8178$G__8173__8191.invoke(protocols.clj:13) at clojure.core$reduce.invokeStatic(core.clj:6886) at clojure.core$reduce.invoke(core.clj:6868) at cljfx.lifecycle$wrap_let_refs$reify__1278.advance(lifecycle.clj:536) at cljfx.lifecycle$reify__1000$fn__1001.invoke(lifecycle.clj:45) at clojure.core$update.invokeStatic(core.clj:6231) at clojure.core$update.invoke(core.clj:6223) at cljfx.lifecycle$reify__1000.advance(lifecycle.clj:45) at cljfx.lifecycle$fn__1006.invokeStatic(lifecycle.clj:61) at cljfx.lifecycle$fn__1006.invoke(lifecycle.clj:59) at cljfx.lifecycle$eval928$fn__929$G__917__940.invoke(lifecycle.clj:17) at cljfx.lifecycle$wrap_map_desc$fn__1220.invoke(lifecycle.clj:448) at cljfx.lifecycle$eval928$fn__929$G__917__940.invoke(lifecycle.clj:17) at cljfx.renderer$render_component.invokeStatic(renderer.clj:63) at cljfx.renderer$render_component.invoke(renderer.clj:47) at cljfx.renderer$create$fn__5894.invoke(renderer.clj:77) at cljfx.renderer$perform_render$fn__5845.invoke(renderer.clj:23) at cljfx.renderer$perform_render.invokeStatic(renderer.clj:22) at cljfx.renderer$perform_render.invoke(renderer.clj:14) at cljfx.renderer$request_render$fn__5871$fn__5875.invoke(renderer.clj:44) at cljfx.renderer$request_render$fn__5871.invoke(renderer.clj:44) at clojure.lang.AFn.run(AFn.java:22) at com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:457) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:456) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96) at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method) at com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(GtkApplication.java:290) at java.base/java.lang.Thread.run(Thread.java:833)

Arch Linux
AMD Ryzen 5
Sway (Wayland window manager)
openjdk 18.0.2 2022-07-19
OpenJDK Runtime Environment (build 18.0.2+0)
OpenJDK 64-Bit Server VM (build 18.0.2+0, mixed mode)
Clojure CLI version 1.11.1.1155

@vlaaad
Copy link
Owner

vlaaad commented Sep 9, 2022

I totally forgot to look into this. I'll have a look soonish!

@vlaaad
Copy link
Owner

vlaaad commented Sep 9, 2022

I made a new release of reveal, please try it and see if it helps

@skylize
Copy link

skylize commented Sep 14, 2022

Thanks @vlaaad. Looks like we're moving in the right direction. No longer drops into an infinite crash loop 👍, but still fails to open a context menu with

(java:915592): Gdk-WARNING **: 14:06:10.077: Native Windows wider or taller than 32767 pixels are not supported

(java:915592): Gdk-WARNING **: 14:06:10.289: Native Windows wider or taller than 32767 pixels are not supported

In Sway, the children of tiled windows also spawn as tiled. Maybe that's relevant? To check it out, I swapped to a floating window before doing right-click/space+enter... and well, just weirdness:

The floating window appears center-screen, apprx 700x40 px, then animates (over about 2 sec) down to apprx 70x40 px. It won't respond to any mouse/keyboard input at all. Manually resizing triggers another animation back down to a little 70x40 box. When moved, the window immediately snaps back to the center of the screen. I'm guessing this is a separate issue? But I don't know, maybe it's all tied together.

@skylize
Copy link

skylize commented Sep 14, 2022

That floating window weirdness ^ occurred both before and after update.

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

3 participants