<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Claude screenshot crashes Hise]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/1">@Christoph-Hart</a> Seems to happen a lot more since the last commits</p>
<p dir="auto">CLAUDE:</p>
<p dir="auto">HISE 4.9.3 (102de5c4) — recurrent SIGABRT via the REST API screenshot endpoints</p>
<p dir="auto">Symptom. HISE dies with <code>Abort trap: 6</code>.<br />
8 of the 33 crash reports on this machine (2026‑08‑19 → 2026‑08‑23) have byte‑identical stacks:</p>
<pre><code>std::terminate() → juce::MessageQueue::runLoopSourceCallback(void*)
  → __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ → …
</code></pre>
<p dir="auto">i.e. something escapes a MessageManager::callAsync callback. The stack is already unwound, so the report names no culprit — which is why this has been hard to pin down.</p>
<p dir="auto">Correlation. Every occurrence I could attribute happened during <code>GET /api/testing/screenshot</code>. Two crashes today were directly on that call; two earlier sessions logged <code>500 — /api/testing/screenshot?moduleId=Interface&amp;outputPath=…</code> shortly before dying. It hits both the cropped (<code>&amp;id=</code>) and the plain <code>moduleId</code>‑only form.</p>
<p dir="auto">Root cause (<code>hi_backend/backend/ai_tools/RestHelpers.cpp:2539</code>).</p>
<pre><code>SafeAsyncCall::callAsyncIfNotOnMessageThread&lt;...&gt;(*sp, [&amp;](...)   // fire-and-forget
{
    hise::ScriptContentComponent component(&amp;spp);
    capturedImage = component.createComponentSnapshot(cropBounds, true, scale);
    captureSuccess = capturedImage.isValid();
    captureComplete.signal();
});

if (!captureComplete.wait(1000))
    return req-&gt;fail(500, "screenshot capture timed out");   // ← stack frame dies here
</code></pre>
<p dir="auto"><code>callAsyncIfNotOnMessageThread</code> is <code>MessageManager::callAsync</code> (<code>MiscToolClasses.h:87</code>) — it does not wait. The lambda captures <code>capturedImage</code>, <code>captureSuccess</code> and <code>captureComplete</code> by reference off the REST thread's stack. When the message thread takes longer than 1000 ms, the handler returns, that frame is destroyed, and the lambda then writes into freed stack memory and signals a destroyed <code>WaitableEvent</code>. Hence: 500 first, abort shortly after.</p>
<p dir="auto">1000 ms is easy to blow — the lambda constructs a fresh <code>ScriptContentComponent</code> and paints every script component, including all custom paint routines, on a 1600×900 interface.</p>
<p dir="auto">Same pattern, two more sites: <code>RestHelpers.cpp:2725</code> (<code>testing/e2e</code>, 30 s) and <code>:6508</code> (<code>dsp/screenshot</code>, 1500 ms — and that lambda spends 500 ms in <code>runDispatchLoopUntil</code> before capturing, re-entering the message loop).</p>
<p dir="auto">Suggested fix. <code>SafeAsyncCall::callAsyncAndWait</code> already exists in the same header (<code>MiscToolClasses.h:104</code>) and is documented to return false on timeout/deletion. Failing that: heap‑allocate the shared state in a <code>ReferenceCountedObject/shared_ptr</code> captured by value, so a timed‑out request cannot outlive it. A <code>try/catch</code> around the lambda body would also convert the abort into a 500.</p>
<hr />
<p dir="auto">Two caveats so you can present it accurately: the other 5 SIGABRTs I can't attribute to the screenshot endpoint from the crash file alone — the unwound stack gives nothing. And the dangling-frame mechanism is provable from the code and matches the 500-then-crash sequence, but I couldn't confirm which exception actually terminates, only that one escapes a message-thread callback.</p>
]]></description><link>https://forum.hise.audio/topic/15018/claude-screenshot-crashes-hise</link><generator>RSS for Node</generator><lastBuildDate>Sun, 23 Aug 2026 05:14:48 GMT</lastBuildDate><atom:link href="https://forum.hise.audio/topic/15018.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 22 Aug 2026 23:59:28 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Claude screenshot crashes Hise on Sun, 23 Aug 2026 00:20:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/12">@David-Healey</a> When Claude makes modifications on UI, it makes a screenshot using the interaction test window to see if it renders as it should</p>
]]></description><link>https://forum.hise.audio/post/122648</link><guid isPermaLink="true">https://forum.hise.audio/post/122648</guid><dc:creator><![CDATA[ustk]]></dc:creator><pubDate>Sun, 23 Aug 2026 00:20:28 GMT</pubDate></item><item><title><![CDATA[Reply to Claude screenshot crashes Hise on Sun, 23 Aug 2026 00:16:33 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/449">@ustk</a> what's a Claude screenshot?</p>
]]></description><link>https://forum.hise.audio/post/122647</link><guid isPermaLink="true">https://forum.hise.audio/post/122647</guid><dc:creator><![CDATA[David Healey]]></dc:creator><pubDate>Sun, 23 Aug 2026 00:16:33 GMT</pubDate></item></channel></rss>