Coder Agent: ## Task Investigate and fix the SUSPECTED bug described below. You are continuing the SAME session t - #32
Open
kai-by-gleap[bot] wants to merge 1 commit into
Conversation
Investigate and fix the SUSPECTED bug described below. You are continuing the SAME session that investigated it — you already know the hypothesis and the evidence. VERIFY FIRST: Step 1 of you
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automated changes by Kai by Gleap.
Task: ## Task
Investigate and fix the SUSPECTED bug described below. You are continuing the SAME session that investigated it — you already know the hypothesis and the evidence.
VERIFY FIRST: Step 1 of your plan MUST verify the hypothesis against the code/data. If verification shows this is configuration or expected product behaviour — NOT a code bug — do not invent a code change: write
.kai/plan.mdstarting with the exact lineVERDICT: NOT_A_BUG, followed by the corrected explanation and a customer-ready answer. The platform routes that verdict back to the resolution flow.Bug report
Opening a full-screen ad triggers Android onTrimMemory, which evicts Gleap's image cache; a cached bitmap was already recycled by GleapChatMessage, so sizeOf's getByteCount() throws IllegalStateException in the unguarded onTrimMemory callback, crashing the host app on the main thread.
Gleap's image loader keeps remote images in an in-memory cache and hands the cached image object straight to chat/news message views. Those message views later recycle the image when they are cleared, but the cache still holds the same image. When a full-screen ad opens, Android asks the app to free memory; Gleap's memory-trim callback then tries to empty the cache, and measuring a recycled image throws an error. Because the trim callback has no error handling, that error is uncaught on the app's main thread and kills the host app. The same code path is present in both the customer's 16.4.6 SDK and the current development source.
Internal evidence