Opened 2 years ago

Closed 2 years ago

#9158 closed defect (fixed)

2dlabels arrow with bad args causes huge memory usage

Reported by: Zach Pearson Owned by: pett
Priority: low Milestone:
Component: Depiction Version:
Keywords: Cc:
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

I didn't know the limits on the 2dlabels arrow command are [0,1] for the start and end positions; I just assumed they were pixels. So when I ran 2dlabels arrow start 0,0 end 100,100 ChimeraX died. I tried it again and got a macOS system popup telling me to kill programs to save memory, and ChimeraX was listed at ~75GB of memory usage. The command otherwise works, but should probably error out if the user gives nonsense arguments.

Change History (3)

comment:1 by pett, 2 years ago

Owner: set to pett
Status: newaccepted

Well, the memory usage deserves investigation, but arguments outside the range [0,1] are allowed and are useful for animations where objects should enter/exit the screen. But that shouldn't use 75GB of memory!

comment:2 by pett, 2 years ago

Component: UnassignedDepiction

comment:3 by pett, 2 years ago

Resolution: fixed
Status: acceptedclosed

Arrows (and labels) are depicted with textures, so creating an arrow several times larger than the main graphics window is going to use a *lot* of memory. The code now disallows creating arrows longer than the graphics window diagonal.

Note: See TracTickets for help on using tickets.