root icon indicating copy to clipboard operation
root copied to clipboard

SetShowProjection highlights wrong bins on 2d histogram with logarithmic axis

Open dudarboh opened this issue 2 years ago • 6 comments

Describe the bug

See -> concise video showcase of the bug

Wrong bin is being highlighted, when using SetShowProjection() with 2D histogram being with logarithmic axis. Even when the mouse hovers over the far left bin, the bin with the value 1 is being highlighted.

Expected behavior

Only the bin should be highlighted where mouse coursor hovers, as it happens when using linear scale.

To Reproduce

void test() {
   auto h = new TH2F("h", "title;x;y", 100, 0.001, 5, 100, 0., 5);
   for(int i=0; i < 100000; i++){
      double x = gRandom->Uniform(0., 5.);
      double y = gRandom->Uniform(0., 5.);
      h->Fill(x, y);
   }

   auto c = new TCanvas();
   h->Draw("colz");
   h->SetStats(0);
   c->SetLogx();
   // right-click on the histogram and SetShowProjectionY afterwards
}

$ root test.cpp EDIT: In the newer versions of ROOT with the web-based TBrowser to reproduce, run: $ root --web=off test.cpp

Setup

  1. ROOT version: 6.26/06
  2. OS: Centos 7 (NOTE: Mac users are unaffected, as there seem to be no highlighting at all)

Additional context

  1. Initially submited on forum: https://root-forum.cern.ch/t/setshowprojection-highlights-the-wrong-position-with-logarithmic-axis/53965/3

dudarboh avatar Mar 16 '23 18:03 dudarboh

I do not have the red highlight bars … (on Mac …)

couet avatar Mar 17 '23 12:03 couet

I think this should be re-implemented with the same technique used in TPad::ExecuteEventAxis

couet avatar Jun 16 '23 14:06 couet

I do not understand from the conversation, apologies: is this now fixed?

dpiparo avatar Feb 05 '24 05:02 dpiparo

Hi @dpiparo

Everything seems to be working fine in the new web-based TBrowser.

However, the issue still exists in the old TBrowser if you run my attached reproducible above as: root --web=off test.cpp

I have just tested it on Centos7 with ROOT Version: 6.31/01 Built for linuxx8664gcc on Feb 05 2024, 00:01:55 From heads/master@v6-31-01-912-gfda4630

It is still an issue, as I cannot run the web-based Tbrowser on my working group server, in the ssh session, where I don't have admin rights for everything. It gives me a warning and opens the Firefox with an empty new tab.

root [0] 
Processing bug_SetShowProjection.cpp...

ROOT comes with a web-based canvas, which is now being started. 
Revert to the legacy canvas by setting "Canvas.Name: TRootCanvas" in rootrc file or
by starting "root --web=off".
Find more info on https://root.cern/for_developers/root7/#twebcanvas
Info in <THttpEngine::Create>: Starting HTTP server on port 127.0.0.1:9779

ROOT web-based widget started in the session where DISPLAY set to localhost:11.0
Means web browser will be displayed on remote X11 server which is usually very inefficient
One can start ROOT session in server mode like "root -b --web=server:8877" and forward http port to display node
Or one can use rootssh script to configure pore forwarding and display web widgets automatically
Find more info on https://root.cern/for_developers/root7/#rbrowser
This message can be disabled by setting "WebGui.CheckRemoteDisplay: no" in .rootrc file
START /usr/bin/exo-open --launch WebBrowser "http://localhost:9779/win1/?key=445963"
[Parent 199285, Main Thread] WARNING: No marshaller for signature of signal 'PropertiesChanged': 'glib warning', file /builddir/build/BUILD/firefox-115.6.0/toolkit/xre/nsSigHandlers.cpp:167

** (firefox:199285): WARNING **: 12:06:00.377: No marshaller for signature of signal 'PropertiesChanged'
[Parent 199285, IPC Launch] WARNING: fork() failed: No space left on device: file /builddir/build/BUILD/firefox-115.6.0/ipc/chromium/src/base/process_util_linux.cc:280
[Parent 199285, IPC I/O Parent] WARNING: Failed to launch tab subprocess: file /builddir/build/BUILD/firefox-115.6.0/ipc/glue/GeckoChildProcessHost.cpp:802
[Parent 199285, IPC Launch] WARNING: fork() failed: No space left on device: file /builddir/build/BUILD/firefox-115.6.0/ipc/chromium/src/base/process_util_linux.cc:280
[Parent 199285, IPC I/O Parent] WARNING: Failed to launch tab subprocess: file /builddir/build/BUILD/firefox-115.6.0/ipc/glue/GeckoChildProcessHost.cpp:802
[Parent 199285, IPC Launch] WARNING: fork() failed: No space left on device: file /builddir/build/BUILD/firefox-115.6.0/ipc/chromium/src/base/process_util_linux.cc:280
[Parent 199285, IPC I/O Parent] WARNING: Failed to launch tab subprocess: file /builddir/build/BUILD/firefox-115.6.0/ipc/glue/GeckoChildProcessHost.cpp:802
[Parent 199285, IPC Launch] WARNING: fork() failed: No space left on device: file /builddir/build/BUILD/firefox-115.6.0/ipc/chromium/src/base/process_util_linux.cc:280
[Parent 199285, IPC I/O Parent] WARNING: Failed to launch tab subprocess: file /builddir/build/BUILD/firefox-115.6.0/ipc/glue/GeckoChildProcessHost.cpp:802
[Parent 199285, IPC Launch] WARNING: fork() failed: No space left on device: file /builddir/build/BUILD/firefox-115.6.0/ipc/chromium/src/base/process_util_linux.cc:280
[Parent 199285, IPC I/O Parent] WARNING: Failed to launch tab subprocess: file /builddir/build/BUILD/firefox-115.6.0/ipc/glue/GeckoChildProcessHost.cpp:802
[Parent 199285, IPC Launch] WARNING: fork() failed: No space left on device: file /builddir/build/BUILD/firefox-115.6.0/ipc/chromium/src/base/process_util_linux.cc:280
[Parent 199285, IPC I/O Parent] WARNING: Failed to launch tab subprocess: file /builddir/build/BUILD/firefox-115.6.0/ipc/glue/GeckoChildProcessHost.cpp:802
[Parent 199285, IPC Launch] WARNING: fork() failed: No space left on device: file /builddir/build/BUILD/firefox-115.6.0/ipc/chromium/src/base/process_util_linux.cc:280
[Parent 199285, IPC I/O Parent] WARNING: Failed to launch tab subprocess: file /builddir/build/BUILD/firefox-115.6.0/ipc/glue/GeckoChildProcessHost.cpp:802
[Parent 199285, IPC Launch] WARNING: fork() failed: No space left on device: file /builddir/build/BUILD/firefox-115.6.0/ipc/chromium/src/base/process_util_linux.cc:280
[Parent 199285, IPC I/O Parent] WARNING: Failed to launch tab subprocess: file /builddir/build/BUILD/firefox-115.6.0/ipc/glue/GeckoChildProcessHost.cpp:802
[Parent 199285, IPC Launch] WARNING: fork() failed: No space left on device: file /builddir/build/BUILD/firefox-115.6.0/ipc/chromium/src/base/process_util_linux.cc:280
[Parent 199285, IPC I/O Parent] WARNING: Failed to launch tab subprocess: file /builddir/build/BUILD/firefox-115.6.0/ipc/glue/GeckoChildProcessHost.cpp:802
[Parent 199285, IPC Launch] WARNING: fork() failed: No space left on device: file /builddir/build/BUILD/firefox-115.6.0/ipc/chromium/src/base/process_util_linux.cc:280
[Parent 199285, IPC I/O Parent] WARNING: Failed to launch tab subprocess: file /builddir/build/BUILD/firefox-115.6.0/ipc/glue/GeckoChildProcessHost.cpp:802
[Parent 199285, IPC Launch] WARNING: fork() failed: No space left on device: file /builddir/build/BUILD/firefox-115.6.0/ipc/chromium/src/base/process_util_linux.cc:280
[Parent 199285, IPC Launch] WARNING: fork() failed: No space left on device: file /builddir/build/BUILD/firefox-115.6.0/ipc/chromium/src/base/process_util_linux.cc:280
[Parent 199285, IPC Launch] WARNING: fork() failed: No space left on device: file /builddir/build/BUILD/firefox-115.6.0/ipc/chromium/src/base/process_util_linux.cc:280
[Parent 199285, IPC I/O Parent] WARNING: Failed to launch tab subprocess: file /builddir/build/BUILD/firefox-115.6.0/ipc/glue/GeckoChildProcessHost.cpp:802
[Parent 199285, IPC I/O Parent] WARNING: Failed to launch tab subprocess: file /builddir/build/BUILD/firefox-115.6.0/ipc/glue/GeckoChildProcessHost.cpp:802
[Parent 199285, IPC I/O Parent] WARNING: Failed to launch tab subprocess: file /builddir/build/BUILD/firefox-115.6.0/ipc/glue/GeckoChildProcessHost.cpp:802
[Parent 199285, IPC Launch] WARNING: fork() failed: No space left on device: file /builddir/build/BUILD/firefox-115.6.0/ipc/chromium/src/base/process_util_linux.cc:280
[Parent 199285, IPC I/O Parent] WARNING: Failed to launch tab subprocess: file /builddir/build/BUILD/firefox-115.6.0/ipc/glue/GeckoChildProcessHost.cpp:802
[Parent 199285, IPC Launch] WARNING: fork() failed: No space left on device: file /builddir/build/BUILD/firefox-115.6.0/ipc/chromium/src/base/process_util_linux.cc:280
[Parent 199285, IPC I/O Parent] WARNING: Failed to launch tab subprocess: file /builddir/build/BUILD/firefox-115.6.0/ipc/glue/GeckoChildProcessHost.cpp:802
[Parent 199285, IPC Launch] WARNING: fork() failed: No space left on device: file /builddir/build/BUILD/firefox-115.6.0/ipc/chromium/src/base/process_util_linux.cc:280
[Parent 199285, IPC I/O Parent] WARNING: Failed to launch tab subprocess: file /builddir/build/BUILD/firefox-115.6.0/ipc/glue/GeckoChildProcessHost.cpp:802
[Parent 199285, IPC Launch] WARNING: fork() failed: No space left on device: file /builddir/build/BUILD/firefox-115.6.0/ipc/chromium/src/base/process_util_linux.cc:280
[Parent 199285, IPC I/O Parent] WARNING: Failed to launch tab subprocess: file /builddir/build/BUILD/firefox-115.6.0/ipc/glue/GeckoChildProcessHost.cpp:802
[Parent 199285, IPC Launch] WARNING: fork() failed: No space left on device: file /builddir/build/BUILD/firefox-115.6.0/ipc/chromium/src/base/process_util_linux.cc:280
[Parent 199285, IPC I/O Parent] WARNING: Failed to launch tab subprocess: file /builddir/build/BUILD/firefox-115.6.0/ipc/glue/GeckoChildProcessHost.cpp:802

I hope you run the reproducible and get the same issue.

Cheers.

dudarboh avatar Feb 05 '24 11:02 dudarboh

Thanks for the logfile. It seems your storage space is full: did you try to free some space to see if there is another issue which is related to ROOT we can help with?

dpiparo avatar Feb 07 '24 12:02 dpiparo

Indeed, that was a problem with my server, not ROOT. Now it is fixed, and I can run a new TBrowser, and everything works fine.

So the initially submitted issue is only valid for the legacy browser.

dudarboh avatar Feb 14 '24 13:02 dudarboh