Skip to content

Release 0.2.2#17

Merged
AussieScorcher merged 2 commits into
mainfrom
0.2.2
Jul 23, 2026
Merged

Release 0.2.2#17
AussieScorcher merged 2 commits into
mainfrom
0.2.2

Conversation

@AussieScorcher

Copy link
Copy Markdown
Member

Summary

  • add MSFS 2024 modular SimObject livery creation through the extended SimConnect API
  • correlate native send IDs with client request IDs so object-creation failures complete the correct pending operation immediately
  • expose send ID and parameter index details in error events
  • add controlled integration diagnostics and focused unit coverage for creation success, failure, timeout, and cleanup
  • bump the shared project/package version to 0.2.2 and add the 2026-07-23 changelog entry

Why

SimConnect reports asynchronous request failures using native packet IDs, while AI object creation was tracking client request IDs. Correlating those identifiers provides prompt, accurate failures and reliable cleanup. The release also adds the MSFS 2024 extended object-creation path needed for modular liveries.

Impact

Consumers can create MSFS 2024 modular SimObjects with liveries, receive richer server-error context, and get explicit timeout failures instead of delayed or mis-correlated object-creation errors. Existing MSFS 2020 object creation continues to use the original API.

Validation

  • dotnet test SimConnect.NET.sln --configuration Release --no-restore (5 passed)
  • git diff --cached --check

Comment thread src/SimConnect.NET/SimConnectNative.cs Dismissed
Comment thread src/SimConnect.NET/AI/SimObjectManager.cs Dismissed
Comment thread src/SimConnect.NET/AI/SimObjectManager.cs Dismissed
Comment thread src/SimConnect.NET/AI/SimObjectManager.cs Dismissed
@AussieScorcher
AussieScorcher marked this pull request as ready for review July 23, 2026 04:30
@greptile-apps

greptile-apps Bot commented Jul 23, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds livery-aware SimObject creation and improves asynchronous creation error handling. The main changes are:

  • Adds the MSFS 2024 extended creation API and livery method.
  • Correlates native send IDs with client request IDs.
  • Adds send ID and parameter index details to error events.
  • Adds creation lifecycle tests and diagnostic coverage.
  • Updates the package version and changelog for 0.2.2.

Confidence Score: 4/5

The object-creation flow needs fixes for packet lookup failure and delayed simulator identification before merging.

  • A failed packet-ID lookup can leave a successfully created simulator object untracked.
  • A delayed OPEN message can make valid creation calls fail after five seconds.
  • The remaining correlation and cleanup paths are consistent with the new tests.

src/SimConnect.NET/AI/SimObjectManager.cs; src/SimConnect.NET/SimConnectClient.cs

Important Files Changed

Filename Overview
src/SimConnect.NET/AI/SimObjectManager.cs Adds livery creation, send-ID correlation, asynchronous continuations, and cleanup; packet-ID lookup failure can orphan an already-created object.
src/SimConnect.NET/SimConnectClient.cs Adds simulator-identification waiting and correlated error dispatch; the fixed identification deadline can reject valid creation calls.
src/SimConnect.NET/SimConnectNative.cs Adds the extended MSFS 2024 object-creation native declaration.
src/SimConnect.NET/Events/SimConnectErrorEventArgs.cs Extends error events with optional native send ID and parameter index values.
tests/SimConnect.NET.UnitTests/SimObjectManagerTests.cs Adds tests for creation failure correlation and mapping cleanup after success and timeout.
Prompt To Fix All With AI
Fix the following 2 code review issues. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 2
src/SimConnect.NET/AI/SimObjectManager.cs:491
**Packet Lookup Orphans Created Object**

When object creation succeeds but `SimConnect_GetLastSentPacketID` fails, this return reports the whole operation as failed and removes its pending request. The simulator can still create the object and send its assigned ID, but the manager then ignores that response, leaving an untracked object that the caller cannot remove.

### Issue 2 of 2
src/SimConnect.NET/SimConnectClient.cs:664
**Identification Deadline Rejects Valid Creation**

`ConnectAsync` marks the client connected before the `OPEN` message completes this task. If that message is delayed for more than five seconds during simulator startup, every object-creation call now fails before reaching either native creation API, even though the connection can remain valid and finish identifying later.

Reviews (1): Last reviewed commit: "Release 0.2.2" | Re-trigger Greptile

Comment thread src/SimConnect.NET/AI/SimObjectManager.cs Outdated
Comment thread src/SimConnect.NET/SimConnectClient.cs Outdated
@AussieScorcher
AussieScorcher merged commit 9eec21b into main Jul 23, 2026
6 checks passed
@AussieScorcher
AussieScorcher deleted the 0.2.2 branch July 23, 2026 05:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant