Opened 6 years ago
Last modified 6 years ago
#2579 assigned defect
Shell broken if created while Volume Viewer context menu is posted
| Reported by: | Tristan Croll | Owned by: | Tom Goddard |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | UI | Version: | |
| Keywords: | Cc: | Eric Pettersen | |
| Blocked By: | Blocking: | ||
| Notify when closed: | Platform: | all | |
| Project: | ChimeraX |
Description
The following bug report has been submitted:
Platform: Linux-3.10.0-957.12.2.el7.x86_64-x86_64-with-centos-7.6.1810-Core
ChimeraX Version: 0.91 (2019-11-13)
Description
Right-clicking on a histogram in the Volume Viewer then left-clicking in the Python Shell causes this error to occur with every subsequent left or middle click in the shell.
Log:
UCSF ChimeraX version: 0.91 (2019-11-13)
© 2016-2019 Regents of the University of California. All rights reserved.
How to cite UCSF ChimeraX
> toolshed show Shell
/opt/UCSF/ChimeraX-daily/lib/python3.7/site-
packages/IPython/core/history.py:226: UserWarning: IPython History requires
SQLite, your history will not be saved
warn("IPython History requires SQLite, your history will not be saved")
> open
/run/media/tic20/storage/structure_dump/rohou/cd20/volume_97_1_sharp_8_3p18_m90_0_20_fom_z.mrc
Opened volume_97_1_sharp_8_3p18_m90_0_20_fom_z.mrc, grid size 310,310,310,
pixel 1, shown at level 0.0861, step 2, values float32
Traceback (most recent call last):
File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site-
packages/qtconsole/console_widget.py", line 428, in eventFilter
event.button() == QtCore.Qt.MidButton and \
AttributeError: 'QContextMenuEvent' object has no attribute 'button'
AttributeError: 'QContextMenuEvent' object has no attribute 'button'
File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site-
packages/qtconsole/console_widget.py", line 428, in eventFilter
event.button() == QtCore.Qt.MidButton and \
See log for complete Python traceback.
Traceback (most recent call last):
File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site-
packages/qtconsole/console_widget.py", line 428, in eventFilter
event.button() == QtCore.Qt.MidButton and \
AttributeError: 'QContextMenuEvent' object has no attribute 'button'
AttributeError: 'QContextMenuEvent' object has no attribute 'button'
File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site-
packages/qtconsole/console_widget.py", line 428, in eventFilter
event.button() == QtCore.Qt.MidButton and \
See log for complete Python traceback.
Traceback (most recent call last):
File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site-
packages/qtconsole/console_widget.py", line 428, in eventFilter
event.button() == QtCore.Qt.MidButton and \
AttributeError: 'QContextMenuEvent' object has no attribute 'button'
AttributeError: 'QContextMenuEvent' object has no attribute 'button'
File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site-
packages/qtconsole/console_widget.py", line 428, in eventFilter
event.button() == QtCore.Qt.MidButton and \
See log for complete Python traceback.
Traceback (most recent call last):
File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site-
packages/qtconsole/console_widget.py", line 428, in eventFilter
event.button() == QtCore.Qt.MidButton and \
AttributeError: 'QContextMenuEvent' object has no attribute 'button'
AttributeError: 'QContextMenuEvent' object has no attribute 'button'
File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site-
packages/qtconsole/console_widget.py", line 428, in eventFilter
event.button() == QtCore.Qt.MidButton and \
See log for complete Python traceback.
Traceback (most recent call last):
File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site-
packages/qtconsole/console_widget.py", line 428, in eventFilter
event.button() == QtCore.Qt.MidButton and \
AttributeError: 'QContextMenuEvent' object has no attribute 'button'
AttributeError: 'QContextMenuEvent' object has no attribute 'button'
File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site-
packages/qtconsole/console_widget.py", line 428, in eventFilter
event.button() == QtCore.Qt.MidButton and \
See log for complete Python traceback.
Traceback (most recent call last):
File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site-
packages/qtconsole/console_widget.py", line 428, in eventFilter
event.button() == QtCore.Qt.MidButton and \
AttributeError: 'QContextMenuEvent' object has no attribute 'button'
AttributeError: 'QContextMenuEvent' object has no attribute 'button'
File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site-
packages/qtconsole/console_widget.py", line 428, in eventFilter
event.button() == QtCore.Qt.MidButton and \
See log for complete Python traceback.
OpenGL version: 3.3.0 NVIDIA 415.27
OpenGL renderer: TITAN Xp/PCIe/SSE2
OpenGL vendor: NVIDIA Corporation
Change History (5)
comment:1 by , 6 years ago
| Cc: | added |
|---|---|
| Component: | Unassigned → UI |
| Owner: | set to |
| Platform: | → all |
| Project: | → ChimeraX |
| Status: | new → assigned |
| Summary: | ChimeraX bug report submission → Volume Viewer possibly not handling context-menu event properly? |
comment:2 by , 6 years ago
comment:3 by , 6 years ago
| Summary: | Volume Viewer possibly not handling context-menu event properly? → Shell broken if created while Volume Viewer context menu is posted |
|---|
follow-up: 4 comment:4 by , 6 years ago
Didn’t require the act of *opening* the shell for me. With the shell already open, just right-clicking on the histogram then clicking in the shell window was enough. Agree it’s pretty obscure - but could become annoying if clicking on other widgets triggers the same problem.
comment:5 by , 6 years ago
Ok. My testing was on Mac and it did require opening the shell while the volume context menu was posted. It is interesting that it does not require that on Linux since it rules out my theory about the cause of the bug. It does seem to be related to the volume context menu being associated with a QGraphicsView. At least on the Mac, no other context menus exhibited the error.
Note:
See TracTickets
for help on using tickets.
This appears to be a Qt bug.
In my testing this only happens if you right click in the volume histogram, showing the context menu. Then leaving that context menu posted you show the shell using the Tools / General / Shell menu. When doing this the volume context menu does not go away. If you click in the shell the context menu. And if you left click in the shell again it gives this error.
Here's what I believe happens. When you posted the volume context menu it should not be possible to post any other menu or click anywhere else without that volume menu disappearing. That is a Qt bug. Instead it allows you to post another menu (the Tools menu) and create the shell. But it was in a subevent loop processing the previous volume context menu. That causes the shell to be created in this subevent loop. Somehow that screws up Qt so that it sends QContextMenuEvent to the shell on a left click and the event type is given as MouseButtonRelease -- it is not a mouse button event and the shell code produces an error because the event type is messed up. For unclear reasons this only happens if the original context menu is posted on a QGraphicsView.
I didn't see any way to work around this.
This is a super obscure bug. It was described online for other programs but they could not figure out the steps to reproduce it.
I wonder if this causes other types of errors when the volume context menu is posted and then other tools are started without the menu being unposted.
I think this is too obscure to spend the time to create a standalone test program and file a Qt bug -- already wasted a few hours on this. Work around is don't bring up the shell while the volume histogram menu is left posted. If more reports of this appear we will have to work more on it.