What are you supposed to do when you just can't recreate an error from the stack trace?

Posted May 22, 2017, 5:43 PM UTC

15
aperture_synce•

Try to reproduce the problem as best as you can - trace through the code manually, trying to figure out what set of conditions/events were required for that particular code path to get executed and for that outcome to occur.

And then recreate those events/conditions to reproduce the problem.

Sometimes it's very tough to reproduce (concurrency bugs especially) - sometimes, you can't reproduce the problem, but you know that a change will fix it. Or just rewrite the code and the bug goes away

3
Darnith•

So let me just clarify, the exception popped up once and now it's not reoccurring?

What I'd suggest is make tests that you feel could cause the issue then test test test, setup some automated testing and see if it occurs again.

If nothing comes up, then move on until a user reports it.

Hope this helps, a more experienced developer might be able to give you something more solid.

2
little_z•

Where I work, we use a tool called Splunk:Mint. It's a reporting tool like Fabric. It has a cool feature where you can leave breadcrumbs as your user does things and then when a crash is reported, it also reports the trail of breadcrumbs that leads to the crash. I've been able to repro many issues that had completely vague stack traces this way.

2
aviparsaviparshan.com•

I ask the user to tell me details about their device and how the error happened. Then I try to link it up, if there is another error report. And from all the infomation that I gather, I get a decent idea of where the error is occuring and I try to find where my bug is.

For your case, could it be something with proguard? if so, you can upload a mapping file to the Developer Console and it will decipher the stack trace.

1
ZhuindenEpicPandaForce @ SO•

Then it's either a stupid Chinese phone where ANRManager is not implemented, or it only occurs after process death.

1