Bug 44443 - EDITING: Crash on inserting a large number of sheets
Summary: EDITING: Crash on inserting a large number of sheets
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.5.0 Beta2
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-04 02:03 UTC by pierre-yves samyn
Modified: 2012-01-07 17:44 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pierre-yves samyn 2012-01-04 02:03:10 UTC
Hello 

Problem description: 

The new option to set the default number of sheets limit it to 32000.

Try to insert more than about 24,000 crash the software.

Steps to reproduce (2 ways)

A) With the default set to 32000
Try to create a new workbook => crash

B) With the option set to a lower value (eg 3, initial value)

1. Create a new workbook
2. Insert menu> Sheet> Number of sheets: enter a number > about 24000 causes the crash.

Note: the crash is not immediate, the software begins to create the sheets.

Platform :
LOdev 3.5.0beta2+ Build ID: e1430a6-7ef74e0-6f9c6e1 (2/1/12)
XP and Windows 7 (also reproduced with Windows7 on fr-discuss)

PC Windows 7 with 4 Go RAM

Regards
Comment 1 Markus Mohrhard 2012-01-04 02:34:04 UTC
I think you run out of memory.

The ammount of sheets is limited by memory.
Comment 2 pierre-yves samyn 2012-01-04 06:04:23 UTC
(In reply to comment #1)
> I think you run out of memory.
> 

Maybe ... ?

But in this case:
- A crash should not occur
- The maximum number of default should be widely smaller (see mentioned in my previous message, the crash occurs on a new PC with 4 Go of RAM)

> The ammount of sheets is limited by memory.

IMHO Set no limit on the number and rely only on the available memory seems to me not reliable, especially for programming applications using this number...

Regards
Comment 3 Markus Mohrhard 2012-01-04 09:28:50 UTC
> 
> But in this case:
> - A crash should not occur

We can't do anything against the crash at the moment. You were always able to crash LibO/OOo if you exceeded the maximum of memory available. It is now just easier to do so on a 32 bit system or on systems with less RAM

> - The maximum number of default should be widely smaller (see mentioned in my
> previous message, the crash occurs on a new PC with 4 Go of RAM)

You are only able to use 2GB or 3GB of these 4 GB but I will limit the number of sheets to 10000 for our 32bit builds.

> 
> > The ammount of sheets is limited by memory.
> 
> IMHO Set no limit on the number and rely only on the available memory seems to
> me not reliable, especially for programming applications using this number...

That is not possible. And personally I doubt that there is any use case where more than one or two thousand sheets are really usefull. For everything else you should not use calc.
Comment 4 pierre-yves samyn 2012-01-04 09:43:23 UTC
(In reply to comment #3)
> You are only able to use 2GB or 3GB of these 4 GB but I will limit the number
> of sheets to 10000 for our 32bit builds.

Ok

> personally I doubt that there is any use case where
> more than one or two thousand sheets are really usefull. For everything else
> you should not use calc.

+1 of course :)

So why 32000 ?

Thank's anyway 
Regards
Comment 5 Markus Mohrhard 2012-01-05 12:05:21 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > personally I doubt that there is any use case where
> > more than one or two thousand sheets are really usefull. For everything else
> > you should not use calc.
> 
> +1 of course :)
> 
> So why 32000 ?
> 

Originally we did not want to set any sheet limit but there are some uno interfaces involved which use signed 16bit values and are therefore limited to 32768. Since we use some of the last numbers for special internal purpose it was my decision to limit it to 32000. That just sounded better than 32733 or something like that.