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

[PyROOT, Graphics] Cannot pause pyROOT script with input() and see canvases #13744

Open
1 task done
dpiparo opened this issue Sep 28, 2023 · 5 comments · Fixed by #13745 · May be fixed by #17587
Open
1 task done

[PyROOT, Graphics] Cannot pause pyROOT script with input() and see canvases #13744

dpiparo opened this issue Sep 28, 2023 · 5 comments · Fixed by #13745 · May be fixed by #17587

Comments

@dpiparo
Copy link
Member

dpiparo commented Sep 28, 2023

Check duplicate issues.

  • Checked for duplicates

Description

This script used to work, also on MacOS

import ROOT

h = ROOT.TH1F("foo", "bar", 64, -4, 4)
h.FillRandom("gaus")
c=ROOT.TCanvas()
h.Draw()
c.Update()

input()

and allowed to see and interact with the canvas to then end execution upon pressing a key. This results now in a deadlock in master.

Reproducer

import ROOT

h = ROOT.TH1F("foo", "bar", 64, -4, 4)
h.FillRandom("gaus")
c=ROOT.TCanvas()
h.Draw()
c.Update()

input()

ROOT version

master

Installation method

built from sources

Operating system

MacOS

Additional context

No response

@dpiparo dpiparo added the bug label Sep 28, 2023
@dpiparo dpiparo added this to the 6.30/00 milestone Sep 28, 2023
@linev
Copy link
Member

linev commented Sep 28, 2023

I can reproduce problem with input() also on my Linux,
And I see that MacOS handled differently.
I will provide PR soon to see if small changes could help

@dpiparo
Copy link
Member Author

dpiparo commented Sep 29, 2023

Reopened b/c of this #13754

@linev
Copy link
Member

linev commented Sep 29, 2023

Seems to be it is not possible to run extra thread in python on Mac in script mode.
At the same time input hook is also not working in script mode.
Thus canvas - even shown - remains fully frozen.
It is exactly a situation as was in previous ROOT releases.

In web case this leads just to empty web browser.
Probably I can improve this

@Axel-Naumann
Copy link
Member

Do I understand correctly that this is an old (i.e. <v6.28) issue? Can we then fix it in a patch release of 6.30 rather than blocking 6.30/00 for it?

@dpiparo
Copy link
Member Author

dpiparo commented Oct 13, 2023

Yes, we can, and in my opinion, should.

@Axel-Naumann Axel-Naumann removed this from the 6.30/00 milestone Oct 27, 2023
@linev linev linked a pull request Jan 31, 2025 that will close this issue
@ferdymercury ferdymercury linked a pull request Jan 31, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants