Closed akien-mga closed 11 months ago
From rocket chat:
lawnjelly 3:57 PM For the MessageQueue filling up, like dark_sylinc says, there are 2 obvious options:
- Fix the bug (done).
- Don't repeat error messages.
I've tried the second, but that might mean that duplicate error messages on different frames get ignored, unless we de-duplicate on e.g. a per-frame basis. So while it would solve some problems it might create others, where we are missing multiple errors. But I'll maybe create a draft PR to discuss it.
On making the MessageQueue tolerant to filling up, I don't think that's easy, because once something is filling it, it can't process messages and the editor locks up. If you take away the limit, you just run out of memory and crash the OS.
But I'll have a think maybe there's some good alternative. I'm half asleep today so unlikely to come up with ideal solutions. 😁
Akien We have ERR_PRINT_ONCE which can be used for stuff that risks being spammy, it could be generalized... but indeed the problem is that sometimes you do want one message per occurrence of a bug.
lawnjelly Maybe we could build some AI so it de-duplicated on the same frame prior to sending. I have a feeling the toaster does some de-duplication but by then it's too late as it's gone through the MessageQueue. It would no doubt need a bit of balancing.
Godot version
4.2.beta5 and 2b987d1c54b77a394d302a89118274538726bcf1
System information
Mageia 9 - Vulkan (Forward+) - dedicated AMD Radeon RX Vega M GL Graphics (RADV VEGAM) () - Intel(R) Core(TM) i7-8705G CPU @ 3.10GHz (8 Threads)
Issue description
When the editor spams an error message for one reason or another (as seen with the MRP from #84712 in 4.2.beta5 / 2b987d1c54b77a394d302a89118274538726bcf1), eventually the MessageQueue seems to run out of memory and starts spamming this error instead:
This gets spammed repeatedly until eventually it segfaults:
Steps to reproduce
OST.ogg
fileMinimal reproduction project
ogg_error_spam.zip