Dev Log #5 Engine
Engine Stability Audit: 39 Bugfixes Across Every Subsystem
Hey everyone,
This week we completed a full audit of all 325 files in the engine codebase. We validated 114 potential issues, eliminated 10 false positives, and confirmed and fixed 39 real bugs across every major subsystem. Here is the breakdown.
Deep Engine Audit 28 Fixes
Critical (7 fixes):
Job System Fiber Lifecycle The fiber pool had a corruption bug where resuming a suspended fiber would leak the fiber slot, eventually deadlocking the entire job system. Fixed with proper fiber index tracking and a suspended flag.
AEAD Nonce Collision Our encryption nonces were based on the raw 16-bit packet sequence number, which repeats after ~65K packets (about 18 minutes of gameplay). Replaced with a key-derived 48-bit session prefix that is unique per session. This was a real security issue.
ECS forEach Iteration Safety Structural changes during entity iteration could invalidate archetype vectors. Added a depth counter that allows nested reads but catches illegal modifications.
SDF Text Performance Custom-font draw calls were copying the entire glyph hashmap per call. Replaced with a zero-copy pointer swap O(1) instead of O(N).
SpriteBatch Rendering Two bugs: setBlendMode caused double-drawn sprites, and palette uniforms bypassed the CommandList pipeline. Both fixed.
High (11 fixes):
ScrollView rendering, TextureCache O(N squared) eviction replaced with O(N log N), ChunkRenderer VBO churn eliminated, pipeline stalls from glGetIntegerv on every scissor op cached, particle system thread safety, frame rate limiting actually enforced, VirtualAlloc null checks, spatial hash overflow, node editor ID collisions, undo system handle remapping, and a test fix.
Medium (10 fixes):
Client payload bounds checking, zero-copy retransmits, stale ACK patching on retransmit, forEach inlining, serialization gaps, negative coordinate floor, logger race condition, circuit breaker single-probe, layout dirty flags, and telemetry bounded growth.
Marketplace Integrity Audit 11 Fixes
Critical (6 fixes):
Expired market items never returned -- Items that expired on the marketplace just vanished. Now they are properly returned to online sellers immediately and queued for offline sellers.
Bought items lost socket gems Purchasing a socketed item from the marketplace permanently destroyed its gems. Socket reconstruction was missing from the buy path.
Gold loss on full inventory If your inventory filled between the space check and the actual item delivery, you lost your gold but never got the item. Now it refunds atomically.
Item loss on cancel Canceling a listing with a full inventory deleted the listing but could not return the item. Now checks space first.
Bag items could not be listed -- Server could not find items inside bags for marketplace listing. Added bag content search.
Shop overflow exploit -- buy price times quantity could overflow int64 with malicious inputs. Added overflow guard.
32 files changed across both audits. The engine is significantly more stable after this week.
Admin