Opened 6 years ago
Closed 6 years ago
#2781 closed defect (fixed)
Crash running "volume flip" command
Reported by: | Owned by: | Tom Goddard | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Volume Data | Version: | |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Notify when closed: | Platform: | Windows 10 | |
Project: | ChimeraX |
Description
The following bug report has been submitted: Platform: Windows-10-10.0.17763 ChimeraX Version: 0.92 (2020-01-10) Description Crash when I use commad: volume flip #1 axis xyz (axis doesn't matter, reproducible with all maps and axis I tried) Log: UCSF ChimeraX version: 0.92 (2020-01-10) © 2016-2019 Regents of the University of California. All rights reserved. How to cite UCSF ChimeraX OpenGL version: 3.3.0 NVIDIA 431.94 OpenGL renderer: Quadro P4000/PCIe/SSE2 OpenGL vendor: NVIDIA Corporation
Change History (2)
comment:1 by , 6 years ago
Component: | Unassigned → Volume Data |
---|---|
Owner: | set to |
Platform: | → Windows 10 |
Project: | → ChimeraX |
Status: | new → assigned |
Summary: | ChimeraX bug report submission → Crash running "volume flip" command |
comment:2 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
Fixed.
The trouble was that flipping caused negative array strides which caused a crash on Windows. It works on Mac and Linux but shockingly not on Windows because on Mac and Linux in C++ (unsigned int) * (long) = long, but on Windows (unsigned int) * (long) = (unsigned long). That made (unsigned int)1 * (long)-1 = 4294967295 on Windows, while it equals -1 on Mac and Linux. This is following the C++ and C specification and is because long is only 32-bits on Windows while it is 64-bits on Mac and Linux. I changed the contour code to use long long 64-bit strides on Windows and also put in explicit casts in the code.