https://bugs.documentfoundation.org/show_bug.cgi?id=164791

--- Comment #18 from Mike Kaganski <[email protected]> ---
Created attachment 205783
  --> https://bugs.documentfoundation.org/attachment.cgi?id=205783&action=edit
Minimized FODT

The document contains a form with 4096 drop-down controls, all attached to the
same single cell on the initially shown sheet. Their size it 5 mm high, 0.01 mm
wide (so practically invisible, though technically they are visible).

Enabling macros seems to do something with controls, and then the crash may not
happen on Windows.

Drawing these controls uses double buffering (calling
Window::RequestDoubleBuffering); eventually, 3 GDI handles are allocated per 1
control (and 1 User object). This exhausts GDI handles before all the objects
could be handled.

Just commenting out the code in Window::RequestDoubleBuffering allows to open
the file (in this case, 1 GDI handle is used per 1 User object). The sheet is
~unusable; but switching to another sheet frees the used handles (that takes
time), and then other sheets are responsive.

I have no idea how to optimize a pathological case of this number of objects.
But likely it works in Excel, because the controls have width strictly zero
(see xl/drawings/vmlDrawing3.vml), so they are not drawn at all. The 0.01mm
width is likely our limitation (maybe of import? if so, it would be possible to
fix).

This is a minimized FODT, with only a single sheet without data, and the form
with all the drop-downs, without macros and other stuff.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to