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

Unable to close GLMakie window #2909

Closed
mchitre opened this issue May 1, 2023 · 8 comments
Closed

Unable to close GLMakie window #2909

mchitre opened this issue May 1, 2023 · 8 comments

Comments

@mchitre
Copy link
Contributor

mchitre commented May 1, 2023

To reproduce:

julia> using GLMakie
julia> GLMakie.update_theme!(resolution=(1500,1000), fontsize=28)
julia> x = [randn() for _  1:1_000_000];
julia> lines(x)
# now close the window - closes OK
julia> lines(x)
# try closing window again - window hangs!

If the call to GLMakie.update_theme!() is removed, the closing more often works. However, if I zoom/pan a bit and try it, closing fails again and the window hangs (beachballs).

System information

(jl_Ydxn0t) pkg> st
Status `/private/var/folders/hx/kbmkkbqd0rxbwlgymb6hfkmh0000gn/T/jl_Ydxn0t/Project.toml`
  [e9467ef8] GLMakie v0.8.4

julia> versioninfo()
Julia Version 1.9.0-rc2
Commit 72aec423c2a (2023-04-01 10:41 UTC)
Platform Info:
  OS: macOS (arm64-apple-darwin21.3.0)
  CPU: 10 × Apple M1 Pro
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, apple-m1)
  Threads: 1 on 8 virtual cores
Environment:
  JULIA_IMAGE_THREADS = 1
@mchitre mchitre changed the title Unable to close GLMakie window after re-opening a window Unable to close GLMakie window May 1, 2023
@ffreyer
Copy link
Collaborator

ffreyer commented May 1, 2023

I can't reproduce this on linux or windows. Does your cpu or gpu usage saturate when this happens?

@mchitre
Copy link
Contributor Author

mchitre commented May 1, 2023

No, neither CPU nor GPU usage is high. The Julia REPL remains responsive too. And if I quit the Julia REPL, the window closes normally.

@jkrumbiegel
Copy link
Member

All the "window hangs at close" bugs before were only on Mac, so this seems a variant of those we squashed already. Interesting that it seems connected to the theme edit, we do have display variables in there these days so that could be a lead.

@sadish-d
Copy link

sadish-d commented Jul 9, 2023

I am also running into the same issue where the window is not closing consistently. I have not been able to replicate the problem definitively. I use deactivate_interaction! and mouseevents, but am not sure if either of those have anything to do with it. I'll post again if I manage to narrow down the problem more. I'm on a mac with Julia version 1.9.0.

EDIT:
possibly related: #2629 (comment)

@ffreyer
Copy link
Collaborator

ffreyer commented Jul 10, 2023

Does this also happen if you close the first window with GLMakie.closeall() or call that before opening the second window? That should fully close the window rather than just hiding it.

@sadish-d
Copy link

I have been using the x button on the window to close it. And I'd like user to be able to do that. I've added this:

wait(display(figure)) # wait to execute the following code until the window is closed
GLMakie.closeall()

It seems to be working fine with this change in a few tests but it's been difficult to consistently replicate the issue. I can report back if the issue persists.

@kbarros
Copy link
Contributor

kbarros commented Apr 4, 2024

The latest version of Makie does not expect a resolution argument. Here is an updated test:

using GLMakie
GLMakie.update_theme!(size=(800,600), fontsize=16)
x = [randn() for _  1:1_000_000];
lines(x)

# now close the window

lines(x)

# no problem closing the window again

This issue might is now resolved? Tested on Mac.

@asinghvi17
Copy link
Member

asinghvi17 commented Apr 4, 2024

I can't replicate this on Mac (M1 as well) either. Closing for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants