I am assuming that running the application under Valgrind at the client site to catch the crash is not an option.

Suggestions in order of least amount of pain. Since I see .dll in your output I will also assume Windows platform.

1.) Run CppCheck and other static source analysis tools to make certain you don't have an uninitialized member variable. If you are open to purchasing a commercial one, Gimpel's PC-lint used to be one of the best on the market back when I still did development on the evil OS.

2.) Run your application under Valgrind like the user has been and check for memory leaks.

"Rare crash" failing on an allocation usually means "slow leak" and a long-run application. Eventually you exceed the memory allowed the user account or in the entire machine. Bounds Checker used to be really great for this and it didn't bury the application like Valgrind does.

https://en.wikipedia.org/wiki/BoundsChecker

3.) I don't think they have added it to QSysInfo (or any other) class yet, a platform independent way of getting current free memory in some unit. I've had to add this to many embedded systems. If your application already has logging then this is the cats meow.

a.) add a configurable timer.

b.) add lastFreeSize and initial to zero

c.) write a slot that is the target of the timer. Every N minutes grab the amount of free RAM. If it is different by y% write an entry to the log. Don't be tempted to write it each and every time as you can chew up quite a bit of disk if the application starts and runs forever.

When your application already has some kind of logging you can get some idea if the problem is either your code or something else on the computer. It's possible they tried to open a 5 million row spreadsheet or something like that. Pesky Windows users, always opening a hundred funny cat videos.

The timer slot thing is kind of nice because you can set some minimum threshold and pop up a warning message to the user that their computer is low on memory and ask them to close half of those funny cat videos.

On 3/23/21 6:00 AM, interest-requ...@qt-project.org wrote:
We use Qt 5.12.10. It seems it's a rare crash. Any thoughts what can be
the cause of it and can it be fixed somehow?

--
Roland Hughes, President
Logikal Solutions
(630)-205-1593

http://www.theminimumyouneedtoknow.com
http://www.infiniteexposure.net
http://www.johnsmith-book.com
http://www.logikalblog.com
http://www.interestingauthors.com/blog

_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to