Skip to content

R5 — iOS build 13: War Pig crash and fog correction

Latest

Choose a tag to compare

@DevZer0D4Y DevZer0D4Y released this 16 Oct 17:14
· 1 commit to main since this release

R5 — COD4iOS 1.0.4 build 13

Fixes the pointer corruption identified in the supplied build 12 War Pig crash log. This is an unsigned pre-release IPA;

Campaign crash

All three build 12 crashes resolve to Path_UpdateBrushBadPlaceCount, reading entity angles at pointer + 0xec. The bad pointer contains float radius bits 0x43aad91d in its upper half. Path_MakeBrushBadPlace wrote the radius through arc.origin[1] at byte 4 of a union containing an 8-byte entity pointer. It now initializes the union and writes brush.radius at its correct native offset. The AI danger zone remains active, with its pointer and radius preserved.

A regression runs the production initializer and actual union layouts under AddressSanitizer/UndefinedBehaviorSanitizer. The old write reproduces the exact supplied fault address 0x43aad91d0604b8f4; the corrected initializer passes. This addresses the reported signature without disabling mission AI or swallowing crashes. Other historical crash signatures in the accumulated log are not claimed fixed by this change.

Black surfaces / fog

Build 12 only preserved zero masks for MUL/MAD instructions writing directly to a colour output. Fog can first be calculated in temporary registers and then copied or selected into the output. The correction now covers Metal pixel-shader MUL/MAD in those temporary registers too.

The expanded GPU test reproduces the gap: build 12 fails 96 channels across 160 cases; build 13 has 0 incorrect channels. It covers direct/temporary destinations, MUL/MAD, both operand orders, signed zero, finite controls and NaN/Inf. All 299 saved representative shaders translate and compile successfully. GLES/GLSL source fingerprints remain unchanged; no Android APK was produced.

The affected War Pig scene has not been run on the tester's device here. The black-surface cause and full campaign continuation still require on-device confirmation. These GPU tests do not establish device frame-rate performance.

Package

SP and MP arm64 iPhoneOS engines rebuilt; embedded binaries match build outputs. Bundle, watermark and diagnostics all report build 13. ZIP integrity, exported symbols and temporary ad-hoc signature checks pass; signatures are removed for signing with your usual tool. No retail game files or saves are included.

Install as an update to the same com.devz.cod4ios installation. Keep your existing players folder. If War Pig still fails, provide the new build 13 diagnostics/native-crash.txt and campaign-events.txt; if the surfaces remain black, also provide kisakcod.log.

Code and IPA are committed under this release tag. The corresponding source archive contains the actual local build sources, including earlier uncommitted work; the new code commit is scoped to the changes above.