-
Notifications
You must be signed in to change notification settings - Fork 7
Description
I'm honestly not quite sure what was happening.
It was working fine, and I was customizing the HUD. I changed around the Vitality settings, and enabled the ECG component.
No issues. Later, I'd restart my Gmod. And when I started my singleplayer game, my game would freeze upon loading in.
After a few times of trying, I'd always freeze at the same spot. No freeze when I disable this addon. Also, no freeze when I disable all other addons, and only leave this one enabled.
So at first, I thought maybe there was an incompatibility. So I enable logging, to check the logs.
The last lines of log I see is this:
[D/GL4: Customizable Holographic HUD] table overflow
1. insert - [C]:-1
2. Add - lua/holohud2/components/ecg.lua:85
3. Think - lua/holohud2/components/ecg.lua:266
4. Think - lua/holohud2/elements/health/hudhealth.lua:322
5. PreDraw - lua/holohud2/elements/health.lua:733
6. fn - lua/holohud2/init.lua:192
7. unknown - lua/ulib/shared/hook.lua:109
[D/GL4: Customizable Holographic HUD] table overflow
1. insert - [C]:-1
2. Add - lua/holohud2/components/ecg.lua:85
3. Think - lua/holohud2/components/ecg.lua:266
4. Think - lua/holohud2/elements/health/hudhealth.lua:322
5. PreDraw - lua/holohud2/elements/health.lua:733
6. fn - lua/holohud2/init.lua:192
7. unknown - lua/ulib/shared/hook.lua:109
Seems the freeze happens when the Heartbeats table fills up, and is infinitely added.
I was able to fix it locally for myself, by simply adding a max beats.
To ensure it can't just keep adding it infinitely. If you're interested, here's the code changes I did. Feel free to copy.
As I said at the start, I've got no idea why it overflows when I have addons enabled vs when I don't. I don't have any other HUD addons installed. I uninstalled the previous H0L-D4. And, I was able to play just fine, with the default settings. It wasn't until I changed it, and enabled the ECG reader, and restarted my game, until it happened. Which kind of makes sense, considering the fix?
Also, overall, just wanted to say, amazing work on this project! I love previous version, and been using it as my main go-to HUD for everything. Even ended up making my own modules for it. (Just some shitty custom DarkRP modules.)
And this V2 version really ramps it up to 110%! I'm loving it so much!
- Thanks!
