glogg icon indicating copy to clipboard operation
glogg copied to clipboard

maxSize argument exceeds QByteArray size limit

Open adanribeiro opened this issue 4 years ago • 8 comments

Using glogg_1.1.4-1.1build1_amd64 on Ubuntu 20.04.2 LTS QIODevice::read (QFile, "/home/ar/scripts/bkp.sql"): maxSize argument exceeds QByteArray size limit

This message return when I try to search for a string like Planonto "bkp.sql" (4GB).

There is any settings or known issues that I can consult about it?

adanribeiro avatar Mar 21 '21 15:03 adanribeiro

Could it be that the bkp.sql file has only single line?

variar avatar Mar 22 '21 06:03 variar

Sorry. For single line you mean "just one large and straight line"? No idea. Unfortunely I can't manage how the file is created. It's sent to me through a client's third party software. When I run glogg it tries for a while in the line 240. It seems a long string, but the fact there is a line 240 maybe can tell us something.

adanribeiro avatar Mar 22 '21 20:03 adanribeiro

@GeadSolutions could you run wc -L bkp.sql This command should print the length of the longest line in the file bkp.sql.

glogg uses QByteArray/QString/QRegularExpression classes from Qt library. These classes can't handle huge lines. Changing this would require major refactoring as glogg currently need to keep the whole line in memory to do search pattern matching.

variar avatar Apr 06 '21 17:04 variar

in: wc -L bkp.sql out: 1043925 bkp.sql

adanribeiro avatar Apr 06 '21 19:04 adanribeiro

It is definitely not a huge length. I've no more ideas at the moment. You could try klogg, I've rewritten a lot of glogg's code, so this particular issue might be fixed.

variar avatar Apr 06 '21 21:04 variar

Well. I tried to run klogg with taht file but all system freezed and crashed. If you have another guess let me know, but I think perharps my system doesn't be prepared to make it properly.

adanribeiro avatar Apr 06 '21 22:04 adanribeiro

Sorry for that. Looks like out of memory issue.

Could you restart klogg (without any files)? It might have created a crash dump, and on next start it should ask permission to upload it for analysis.

variar avatar Apr 07 '21 04:04 variar

When I restarted it doesn't show me any report, so I created one for myself and sent to you. I've created this issue with the incoming content for anyone who want to consult too.

Crash Report on Github

adanribeiro avatar Apr 07 '21 13:04 adanribeiro