[PR #458] [MERGED] store: offline *Async slots start and complete their XAsyncBlock with E_FAIL (RT-STORE-ASYNC-COMPLETE) #509

Closed
opened 2026-11-26 20:18:07 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/458
Author: @Kokonotcu
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @QemmHD

Base: main ← Head: pr/store-async-complete


📝 Commits (1)

  • 1c69700 store: offline *Async slots start and complete their XAsyncBlock with E_FAIL (M11)

📊 Changes

2 files changed (+55 additions, -16 deletions)

View changed files

📝 runtime/shims/xgameruntime_store.cpp (+35 -14)
📝 runtime/test/xgameruntime_store_test.cpp (+20 -2)

📄 Description

Claim: RT-STORE-ASYNC-COMPLETE (#14).

What was wrong: the offline XStoreImpl table answers every *Async slot with offline_failure<Slot>. That returns E_FAIL straight away and never starts or completes the caller's XAsyncBlock. A caller that already queued its block and then waits on it (XAsyncGetStatus(block, true), or the completion callback on its task queue) never wakes up: the store call is a silent hang instead of an offline failure.

What changed: each *Async slot except 82 (XStoreShowGiftingUIAsync, whose block position I have not confirmed; it stays as before) now uses offline_failure_async<Slot, AsyncArg>. It finds the block by its position in that function's GDK signature and runs it through XAsyncRun with a work callback that returns E_FAIL. The block starts, completes on its queue, and XAsyncGetStatus reports E_FAIL. A null block returns E_POINTER.

The matching *Result / *ResultSize slots keep returning E_FAIL, so a caller reading the result after completion gets the same offline answer as before.

Block position per slot (GDK XStore.h): 33(3), 35(5), 37(4), 40(4), 43(5), 49(5), 51(2), 53(6), 58(4), 60(4), 62(4), 71(3), 73(4), 75(3). Slot 53 takes its block as the 6th argument, which is passed on the stack, and the test covers that case.

Tests (xgameruntime_store_test, new checks):

  • slots 49 (block 5th), 51 (block 2nd) and 53 (block 6th, on the stack) each get a real XAsyncBlock, which finishes with XAsyncGetStatus(..., true) == E_FAIL;
  • slot 50 (a Result) still returns E_FAIL.

Tested on Windows 10, i7-11800H, RTX 3080 Laptop (no GPU needed), on main 8f481cf16: xgameruntime_store passes (27 checks).

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/458 **Author:** [@Kokonotcu](https://github.com/Kokonotcu) **Created:** 11/24/2026 **Status:** ✅ Merged **Merged:** 11/24/2026 **Merged by:** [@QemmHD](https://github.com/QemmHD) **Base:** `main` ← **Head:** `pr/store-async-complete` --- ### 📝 Commits (1) - [`1c69700`](https://github.com/ubiquitarianism/leonida/commit/1c697008516524aa0ee4a7c9e2ae970c7a6b244b) store: offline *Async slots start and complete their XAsyncBlock with E_FAIL (M11) ### 📊 Changes **2 files changed** (+55 additions, -16 deletions) <details> <summary>View changed files</summary> 📝 `runtime/shims/xgameruntime_store.cpp` (+35 -14) 📝 `runtime/test/xgameruntime_store_test.cpp` (+20 -2) </details> ### 📄 Description Claim: RT-STORE-ASYNC-COMPLETE (#14). **What was wrong:** the offline `XStoreImpl` table answers every `*Async` slot with `offline_failure<Slot>`. That returns `E_FAIL` straight away and never starts or completes the caller's `XAsyncBlock`. A caller that already queued its block and then waits on it (`XAsyncGetStatus(block, true)`, or the completion callback on its task queue) never wakes up: the store call is a silent hang instead of an offline failure. **What changed:** each `*Async` slot except 82 (`XStoreShowGiftingUIAsync`, whose block position I have not confirmed; it stays as before) now uses `offline_failure_async<Slot, AsyncArg>`. It finds the block by its position in that function's GDK signature and runs it through `XAsyncRun` with a work callback that returns `E_FAIL`. The block starts, completes on its queue, and `XAsyncGetStatus` reports `E_FAIL`. A null block returns `E_POINTER`. The matching `*Result` / `*ResultSize` slots keep returning `E_FAIL`, so a caller reading the result after completion gets the same offline answer as before. Block position per slot (GDK `XStore.h`): 33(3), 35(5), 37(4), 40(4), 43(5), 49(5), 51(2), 53(6), 58(4), 60(4), 62(4), 71(3), 73(4), 75(3). Slot 53 takes its block as the 6th argument, which is passed on the stack, and the test covers that case. **Tests (`xgameruntime_store_test`, new checks):** - slots 49 (block 5th), 51 (block 2nd) and 53 (block 6th, on the stack) each get a real `XAsyncBlock`, which finishes with `XAsyncGetStatus(..., true) == E_FAIL`; - slot 50 (a `Result`) still returns `E_FAIL`. Tested on Windows 10, i7-11800H, RTX 3080 Laptop (no GPU needed), on `main` `8f481cf16`: `xgameruntime_store` passes (27 checks). 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:18:07 +01:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#509
No description provided.