Opened 6 years ago
Closed 5 years ago
#2839 closed defect (not a bug)
update_buffer_data: cannot allocate huge array
Reported by: | Owned by: | Tom Goddard | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Graphics | Version: | |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Notify when closed: | Platform: | all | |
Project: | ChimeraX |
Description
The following bug report has been submitted: Platform: Windows-10-10.0.17763 ChimeraX Version: 0.92 (2020-01-31) Description (Describe the actions that caused this problem to occur here) Log: UCSF ChimeraX version: 0.92 (2020-01-31) © 2016-2020 Regents of the University of California. All rights reserved. How to cite UCSF ChimeraX > open "X:/iPSC HAIRBALLS/DM/DM-01sru16lp28s2u16.mrc" Opened DM-01sru16lp28s2u16.mrc, grid size 960,900,490, pixel 1, shown at step 1, values uint16 > volume #1 region 0,0,0,959,899,489 step 4 > volume #1 region 0,0,0,959,899,489 step 1 colorMode opaque8 showOutlineBox > true imageMode "box faces" > volume #1 > surface dust #1 size 70 > color height #1 center 0,0,0 axis z palette rainbow > volume #1 level 3.4e+04 > volume #1 change image level 2.962e+04,0 level 3.762e+04,0.8 level > 4.721e+04,1 An error occurred in drawing the scene. Redrawing graphics is now stopped to avoid a continuous stream of error messages. To restart graphics use the command "graphics restart" after changing the settings that caused the error. Traceback (most recent call last): File "C:\Program Files\ChimeraX-daily-01-31-2020\bin\lib\site- packages\chimerax\core\updateloop.py", line 73, in draw_new_frame view.draw(check_for_changes = False) File "C:\Program Files\ChimeraX-daily-01-31-2020\bin\lib\site- packages\chimerax\core\graphics\view.py", line 166, in draw self._draw_scene(camera, drawings) File "C:\Program Files\ChimeraX-daily-01-31-2020\bin\lib\site- packages\chimerax\core\graphics\view.py", line 233, in _draw_scene draw_opaque(r, opaque_drawings) File "C:\Program Files\ChimeraX-daily-01-31-2020\bin\lib\site- packages\chimerax\core\graphics\drawing.py", line 1420, in draw_opaque _draw_multiple(drawings, renderer, Drawing.OPAQUE_DRAW_PASS) File "C:\Program Files\ChimeraX-daily-01-31-2020\bin\lib\site- packages\chimerax\core\graphics\drawing.py", line 1431, in _draw_multiple d.draw(renderer, draw_pass) File "C:\Program Files\ChimeraX-daily-01-31-2020\bin\lib\site- packages\chimerax\core\graphics\drawing.py", line 716, in draw self.draw_self(renderer, draw_pass) File "C:\Program Files\ChimeraX-daily-01-31-2020\bin\lib\site- packages\chimerax\core\graphics\drawing.py", line 723, in draw_self self._draw_geometry(renderer, opaque_only = any_transp) File "C:\Program Files\ChimeraX-daily-01-31-2020\bin\lib\site- packages\chimerax\core\graphics\drawing.py", line 750, in _draw_geometry ds.activate_bindings(renderer) File "C:\Program Files\ChimeraX-daily-01-31-2020\bin\lib\site- packages\chimerax\core\graphics\drawing.py", line 1767, in activate_bindings self.update_buffers() File "C:\Program Files\ChimeraX-daily-01-31-2020\bin\lib\site- packages\chimerax\core\graphics\drawing.py", line 1755, in update_buffers b.update_buffer_data(data) File "C:\Program Files\ChimeraX-daily-01-31-2020\bin\lib\site- packages\chimerax\core\graphics\opengl.py", line 2550, in update_buffer_data d = data.astype(self.value_type) MemoryError: Unable to allocate array with shape (311375680, 3) and data type uint32 OpenGL version: 3.3.0 NVIDIA 432.00 OpenGL renderer: GeForce GTX 1080/PCIe/SSE2 OpenGL vendor: NVIDIA Corporation
Change History (3)
comment:1 by , 6 years ago
Component: | Unassigned → Graphics |
---|---|
Owner: | set to |
Platform: | → all |
Project: | → ChimeraX |
Status: | new → assigned |
Summary: | ChimeraX bug report submission → update_buffer_data: cannot allocate huge array |
comment:2 by , 6 years ago
Reporter: | changed from | to
---|
This ChimeraX error was from an out of memory error trying to show a surface with 300 million triangles. That requires allocating 900 million uint32 vertex indices or 3.6 Gbytes. I'm a bit surprised that memory allocation failed. Still it probably would fail with another memory allocation that was coming next when it tries to shift those triangles and the vertices to the graphics card which has 8 Gbytes. It is at the limit of where things break down because of too little memory.
I don't have any suggestion to fix this. The surface just has too many triangles to handle.
I successfully showed 316 million triangles on my iMac (crashed the first time but restarting it worked). It failed with 600 million triangles with an opengl out of memory error. Tickets #2842 and #2843.
I could try to catch these out of memory errors and give a sensible error dialog, like "Surface has too many triangles. Out of memory. You can continue if you make the surface smaller." I've never seen this error before reported so it is very rare.
comment:3 by , 5 years ago
Resolution: | → not a bug |
---|---|
Status: | assigned → closed |
Nothing we can do about insufficient memory. I think the error message is clear enough "MemoryError: Unable to allocate array with shape (311375680, 3) and data type
uint32". I have never seen this error before I think because typically CPU main memory can allocate these arrays (usually I work with 32 Gbyte machines with large data). But then what happens is the graphics driver often crashes. The graphics driver is supposed to just give an out of memory error and ChimeraX keeps running but often the driver just crashes instead. I have seen that on Mac and on Windows.
My mail client believes this ticket was actually submitted by Michael Schmid. I can picture that.