Bug 371790 - Increase array limit >10000
Summary: Increase array limit >10000
Status: RESOLVED FIXED
Alias: None
Product: okteta
Classification: Applications
Component: Structures Tool (other bugs)
Version First Reported In: unspecified
Platform: Gentoo Packages Linux
: NOR wishlist
Target Milestone: ---
Assignee: Alex Richardson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-28 17:04 UTC by Staffan Palmroos
Modified: 2019-06-08 16:46 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 0.26.2
Sentry Crash Report:


Attachments
Increase the element limit of arrays to 65535 (615 bytes, patch)
2016-10-28 17:04 UTC, Staffan Palmroos
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Staffan Palmroos 2016-10-28 17:04:02 UTC
Created attachment 101855 [details]
Increase the element limit of arrays to 65535

Hi

Is there a particular reason why there is a 10000 elements limit on arrays in the structures tool? It's a great tool and I've recently used it for investigating 3d object files from a game. When looking at arrays of vertices I often reach the limit of 10000 elements so I downloaded the Okteta source and increased this limit to 65535 and the program seems to work just fine.

So, if there's no particular reason for this limit I suggest that it be increased, it's just one line in kasten/controllers/view/structures/datatypes/array/arraydatainformation.h:

static const uint MAX_LEN = 10000;

I've attached a patch if you want it.
Comment 1 Alex Richardson 2016-10-29 01:22:47 UTC
Yes the 10000 is a rather arbitrary limit. I just chose it because I had a few structures that would attempt to allocate e.g. 4 million items with an invalid layout. 64K sounds like a more reasonable limit. I currently don't have access to my development system but I'll apply it I get back. Thank you!
Comment 2 Friedrich W. H. Kossebau 2019-06-08 15:09:08 UTC
Hi Alex, ping? :) Any chance you will have access to a development system soon again, to do this change?

No insight myself to decide if this still is a sane change, but will happily apply if you command me to do.
Comment 3 Alex Richardson 2019-06-08 15:45:00 UTC
Sorry, completely forgot about this bug report. I'll apply the change now.
Comment 4 Alex Richardson 2019-06-08 15:45:02 UTC
Git commit ceaff5549038e60d1e180a1200d15fe76880772c by Alex Richardson.
Committed on 08/06/2019 at 15:42.
Pushed by arichardson into branch 'master'.

Use 64K as the maximum number of array entries

This is still an arbitary limit to avoid excessive memory consumption.
10000 is not enough for some use cases. Hopefully 64K works better.

Patch by Staffan Palmroos!

M  +2    -1    kasten/controllers/view/structures/datatypes/array/arraydatainformation.hpp

https://commits.kde.org/okteta/ceaff5549038e60d1e180a1200d15fe76880772c
Comment 5 Friedrich W. H. Kossebau 2019-06-08 16:44:24 UTC
Thanks, Alex! Will cherry-pick to 0.26, ..2 release scheduled for next week in any case.
Comment 6 Friedrich W. H. Kossebau 2019-06-08 16:46:24 UTC
Git commit 9cc3404e1a04a55dc062900a051c34eb29217e56 by Friedrich W. H. Kossebau, on behalf of Alex Richardson.
Committed on 08/06/2019 at 16:44.
Pushed by kossebau into branch '0.26'.

Use 64K as the maximum number of array entries

This is still an arbitary limit to avoid excessive memory consumption.
10000 is not enough for some use cases. Hopefully 64K works better.

Patch by Staffan Palmroos!
(cherry picked from commit ceaff5549038e60d1e180a1200d15fe76880772c)

M  +2    -1    kasten/controllers/view/structures/datatypes/array/arraydatainformation.hpp

https://commits.kde.org/okteta/9cc3404e1a04a55dc062900a051c34eb29217e56