Skip to content

Car detection: invalid-character after startup / vehicle changes (0.9.9) #4

Open

Description

@Refilewski

Observed behavior (2026-10-18)

Discord users report inconsistent car names after switching cars (normal freeroam, Extra Options car switching, and entering events). One tester could switch several times before the car disappeared; another lost it on the first swap and recovered temporarily after restarting the game.

A supplied standalone 0.9.9 log provides stronger evidence: CarProbe=invalid-character occurs even before subsequent vehicle changes, and CarId=none throughout the available session.

Sanitized observations

  • 64 snapshot diagnostic records in the supplied (truncated) log; 55 CarProbe=invalid-character, 3 CarProbe=empty, 0 CarProbe=ok.
  • Discord=Connected, supported FH2 image mapped (0x140000000).
  • Hooks installed, live speed continues to update; FreeRoam and Event activity detected.
  • Thus this is not primarily a Discord IPC connection failure and not exclusively proven to be caused by a car swap.

Source investigation

  • Managed: src/AzimuthRPC.Core/Game/GameSnapshotReader.cs reads 64 bytes from AudioEngine+0x278 and requires 5–63 ASCII characters ([A-Za-z0-9_], underscore included). The result is absent whenever the parser rejects this field.
  • Native FH2ML DLL uses the same +0x278 car ID field, so merely switching EXE→DLL is not a verified fix.
  • Extra Options uses GET_LOCAL_PLAYER (0x21e0c0) and GET_PLAYER_CAR (0x2da060) to resolve and validate the current player car object (see features/autodrive_game.c, game_addresses.h). This can provide a separate source for vehicle identity research; it does not establish a safe name/ID pointer chain for the standalone process yet.

Proposed next steps

  1. Capture two or more controlled sessions with and without Extra Options, on identical Azimuth/FH2 versions; annotate initial car, freeroam swaps, garage swaps, racing load and return.
  2. Add privacy-preserving probe metadata indicating where validation fails (invalid-character index, printable/binary class, NUL position) and/or whether the sampled 64-byte region changes on swaps, without dumping raw heap contents.
  3. Investigate stable current-car object metadata and name/ID access through validated player/car references. Do not assume AudioEngine+0x278 always holds the current car.
  4. Implement candidate fixes behind build/structure guards, with synthetic tests covering car swaps, missing IDs, loading and reattach; require live validation before production use.
  5. Avoid retaining a stale car after the source becomes invalid.

Privacy: The submitted log contains a local Windows profile path; no raw log, profile name, raw memory or Discord identifiers are posted here.

Activity

  1. Refilewski commented on Oct 18, 2026

    @Refilewski
    OwnerAuthor

    Additional live tester evidence — 2026-10-18 (21:46–22:12 local)

    Three shared log screenshots and the testers' Discord observations give a useful lifecycle comparison. Sanitized excerpts, with no raw memory or user paths:

    • PID 15176, 21:46–21:47: CarProbe=ok for BMW_M5E39_03 and then HON_CivicR_04; the displayed car changes correctly. Around 21:47:07, still in FreeRoam with EventContext=2 and HooksInstalled=True, it switches to CarProbe=invalid-character; CarId=none. The speed is still populated and briefly reaches 60 km/h after the failure.
    • PID 20708, 21:51: during RaceLoading then FreeRoam, CarProbe=invalid-character continues while telemetry activity can become true and Discord still reports speeds of 5, 40, 65, 95 km/h. This rules out Discord IPC itself as the car-ID failure point.
    • PID 2444, 21:55–21:56: immediately after attach, CarProbe=empty; after race loading, CarProbe=invalid-character persists through return to free roam. Hooks remain installed and EventContext=2.
    • Human observations: one tester succeeded with MR2, BMW M5 and Civic, then lost car detection. The failure recurs after trying 240Z and a Stradale challenge; testers say revisiting an earlier working car does not immediately recover the ID. Another tester reports Koenigsegg initially works, then changing vehicles breaks detection.

    Interpretation / test target

    The two concrete successful IDs are 12 (BMW_M5E39_03) and 13 (HON_CivicR_04) characters. This is compatible with the suspected 15-character MSVC small-string threshold: longer identifiers may put a pointer, not an ASCII string, at AudioEngine+0x278. However, the actual IDs at failure were not captured, so this remains a hypothesis rather than proven correlation. The transient/persistent invalid field and race-loading lifecycle are important additional test dimensions.

    PR #5 already adds a guarded heap-string reader for standalone + FH2ML, and its head cf92fcaf7021a95034a94940544d0e0019e81bc8 passed CI (workflow run 39142951675); this does not mean the live bug is fixed. The run contains the AzimuthRPC-0.9.9-win-x64 artifact for controlled tester use. Please test the CI artifact from PR #5, not the unchanged v0.9.9 release asset. Capture CarProbe statuses (ok, ok-heap, heap-*, invalid-character) and the real selected vehicle before and after at least five swaps and a race return. Do not merge until verified.

    No production offset changes are inferred from these logs.

  2. Refilewski commented on Oct 18, 2026

    @Refilewski
    OwnerAuthor

    New tester regression candidate: modded BMW M5 E39 (2026-10-18 22:27–22:28 local)

    User reports that a modified BMW M5 E39, which was previously identified successfully, is now missing from Rich Presence. Screenshot shows a continuous single session (PID=6736), including FreeRoam -> Event -> RaceLoading -> Event -> RaceLoading:

    • CarProbe=invalid-character; CarId=none in free roam at 22:27:29, then during racing/event at 22:27:31 / 22:27:40 and loading at 22:27:31 / 22:27:40 / 22:28:18.
    • HooksInstalled=True, EventContext=2 in free roam and 1 during events; TelemetryActive=True while racing. Discord stays connected and speed reaches 250 km/h.
    • Previous independent log sample gave CarProbe=ok; CarId=BMW_M5E39_03 before detection failed in that session, but we cannot confirm the modified vehicle's exact runtime ID from the new screenshot.
    • The screenshot does not show which EXE build is running. If it is the official v0.9.9 build, it predates the heap fallback; if it is PR Fix candidate: guarded heap-backed car ID decoding after car swaps #5 test build, this may be an unfixed compatibility case.

    Important for v1.0.0: do not treat one successful test as universal validation. Release candidate is currently being prepared on PR #5, but hold the production merge until the reporter confirms whether the affected session used v0.9.9-carprobe-test.1 (downloaded pre-release EXE) or the old v0.9.9 official EXE, plus mod name and whether stock M5 reproduces. If the test EXE reproduces, add a guarded diagnostic that reports metadata/invalid-character index and field consistency without exposing raw memory, then investigate the current-car object independently. Keep PR #6 experimental and off by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions