◉GEMINI LABJP
●ARGON — gemini-4-argon is generally available as of 10/13, aimed at complex coding, agents, math and science●DEEP RES — deep-research-pro-preview-12-2025 shuts down 10/23, 6 days left. Move to deep-research-preview-04-2026●NANO — gemini-nano-banana-2.1 is GA (10/06). gemini-3.1-flash-image is deprecated with no shutdown date yet●MCP — One write-up cut an 85,000-token tool result to 310 tokens by wrapping it in an ADK FunctionTool●FLASH — gemini-3.7-flash and 3.5-flash now route automatically to newer Flash models (10/08)●NEW — Stop Re-Reading Every Crash Report: Gre…●ARGON — gemini-4-argon is generally available as of 10/13, aimed at complex coding, agents, math and science●DEEP RES — deep-research-pro-preview-12-2025 shuts down 10/23, 6 days left. Move to deep-research-preview-04-2026●NANO — gemini-nano-banana-2.1 is GA (10/06). gemini-3.1-flash-image is deprecated with no shutdown date yet●MCP — One write-up cut an 85,000-token tool result to 310 tokens by wrapping it in an ADK FunctionTool●FLASH — gemini-3.7-flash and 3.5-flash now route automatically to newer Flash models (10/08)●NEW — Stop Re-Reading Every Crash Report: Gre…
Articles/Dev Tools
⟐ Dev Tools/2026-07-18Advanced

I Was Handing Gemini Obfuscated Stack Traces — Until retrace Went In Front, the Diagnoses Were Confident and Wrong

Release stack traces come out of R8 with the names flattened. Feed one to Gemini as-is and the diagnosis arrives calm, well-written, and wrong. Put retrace in front, match the mapping by versionCode, and forbid confident answers when you cannot restore. Numbers from 42 reports.

Gemini API249Android12R8Crashlyticsindie development28

✦ Premium Article

java.lang.NullPointerException at a.a.a.b(SourceFile:0)

Given that single line, the model told me — calmly, with a code fix attached — that a RecyclerView.Adapter was reading a stale position in onBindViewHolder after the backing list had been swapped out asynchronously.

I believed it for a while. The symptom sounded familiar. But when I traced the actual code, a.a.a.b turned out to be a utility that assembles image cache keys. No adapter anywhere. No RecyclerView anywhere.

The model had not lied. There was simply no information in the string a.a.a.b to begin with. Ask for something plausible where nothing is known, and something plausible is exactly what comes back. An obvious thing, which I managed to overlook for about three weeks.

The model answered a.a.a.b(SourceFile:0) with confidence

I run Android wallpaper apps as an indie developer, and I collect non-fatal exceptions — the ones that get swallowed rather than crashing, but leave holes in the UI if ignored — into my own sink.

That is where the blind spot was. Open the Firebase console and the stack traces are rendered with human-readable names, because the Crashlytics Gradle plugin uploaded the mapping file at build time and the console restores them for you. I looked at that console every day, so I had quietly assumed that Android crash data simply arrives readable.

Nothing restores the traces I catch myself through Thread.setDefaultUncaughtExceptionHandler or a try-catch.

// Where non-fatal exceptions get queued to my own sink.
// In release builds, e.stackTraceToString() has already been flattened by R8.
private fun reportNonFatal(e: Throwable, context: String) {
    val payload = NonFatalPayload(
        versionCode = BuildConfig.VERSION_CODE,   // this matters later
        versionName = BuildConfig.VERSION_NAME,
        context = context,
        stackTrace = e.stackTraceToString(),      // release: "a.a.a.b(SourceFile:0)"
    )
    sink.enqueue(payload)
}

In debug builds this field is perfectly readable — R8 only runs for release. Readable on my machine, flattened in production. And only the production ones reached my analysis pipeline.

Those were the ones I was sending to Gemini.

Deobfuscation is not a probabilistic problem

This is the part I most want to hand over.

Turning a.a.a.b back into WallpaperCacheKeyBuilder.append is a lookup. There is a mapping file, there is exactly one correct answer in it, and no ambiguity anywhere.

A language model does something else entirely: it picks the most likely continuation given context. Without the table, a.a.a.b cannot be recovered — but push for an answer anyway and you get whatever Android crashes are most common in the training data. That, I suspect, is where RecyclerView came from.

I had taken a problem with a deterministic answer and routed it through a probabilistic system. That is not a limitation of Gemini. That was my design mistake.

So I reset the rule I work by: if a lookup table answers it, use the lookup table. Ask the model only what becomes knowable after the table has been read.

✦

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
✦If you have been getting plausible-but-wrong crash diagnoses, you can flip them to evidence-backed ones by adding a single deobfuscation step before the prompt
✦You get a complete Python pipeline that drops the mapping-in-the-prompt approach and instead matches mapping files by versionCode before restoring names
✦You get a responseSchema and a decision table that separate traces you should discard, refuse to let the model assert on, or pass through untouched
Secure payment via Stripe · Cancel anytime
✦

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Gemini Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $10 for lifetime access
View Membership →

Related Articles

⟐ Dev Tools2026-08-30
Why Shipped Clients Deserve a Refusal, Not a Silent Model Substitution
A model can retire, but the apps already on people's phones cannot. This is how I built a sunset ledger keyed on output contracts, and how I now back-date my own deadline from the version residue curve.
⟐ Dev Tools2026-08-24
Gemini quietly drops %1$s from translations, and no reviewer catches it
Format specifiers go missing, turn full-width, or get duplicated when Gemini translates app strings. Here are the four failure modes I keep seeing in production, how to stop them at generation time, and a short check that catches the rest.
⟐ Dev Tools2026-08-22
The One Call I Refuse to Hand Gemini During a Phased Release
Day one of a phased release has nowhere near the sample size to tell a healthy build from a broken one. Here is the three-state rollout gate I use, and the narrow job I give Gemini inside it.