Opened 6 years ago

Closed 6 years ago

#2781 closed defect (fixed)

Crash running "volume flip" command

Reported by: sitins07@… 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 Eric Pettersen, 6 years ago

Component: UnassignedVolume Data
Owner: set to Tom Goddard
Platform: Windows 10
Project: ChimeraX
Status: newassigned
Summary: ChimeraX bug report submissionCrash running "volume flip" command

comment:2 by Tom Goddard, 6 years ago

Resolution: fixed
Status: assignedclosed

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.

Note: See TracTickets for help on using tickets.