How to solve crashes in Google Play Console? - crash

In Google Play Console on the dashboard of your application there
is a graph with Crashes & ANRs.
What is the best practice to solve
crashes to provide the best service to your users? My application is
written in Python in Kivy framework.

Navigate to Quality -> Android Vitals -> Crashes and ANRs.
This lists each event and on the right you will see a "->" arrow labelled "View Details".
Click this, scroll down past the graph and you'll see the Stack traces.
This is what you need to look at to fix your code.
The top line will be the error, then it'll show the line of code where the error occurred, for example:
[code]
java.lang.NullPointerException:
at com.test.MyApp.doSomethingCool (MyClass.java:123)
at com.test.MyApp.somethingElse (AnotherClass.java:321)
[/code]
Here you have some null value causing an issue in the "doSomethingCool" function of your app and that code should be on line 123 of "MyClass.java".
The trace lines after that show what called that function that failed, so above, this is showing that "doSomethingCool" was called from function "somethingElse" on line 321 and that code is in "AnotherClass.java".
This example is for Java.
--Updated--
If you are coding in Python, then the stack trace may not show you where in your own code the problem lies. Instead your best bet is to search on Google for the top line error and hope that the answer is online.
Separately from stack trace analysis I would highly recommend that you place your project into source control with GIT or SVN, specifically so that you can see what changes might have caused an error.
Update your code in the repository only when it's working and then you will always have a safe saved version that is known as working. You can then easily compare your current code and see what changes might have caused an error. This is especially useful for Android, which regularly updates versions of shared libraries.

Related

How to make Vue error show the exact error source line in the code?

I am using Nuxt to develop an application.
Currently, when I ran into error, the stack trace looks like this.
This is very difficult to debug and find the error.
Is there any way to make it show the source file, the function, or the line that is causing the error?

Why is my AUv3 randomly disappearing with "viewServiceDidTerminateWithError"?

I’ve encountered a strange problem during iOS AUv3 Instrument development which I’m having trouble finding information on. I’ve spent a couple weeks now attempting to debug this, and I was wondering if anyone else has encountered it. It feels more like an "OS killed the app" than a crash, so I use the term crash loosely. Here are the symptoms:
It doesn't seem to ever happen on initial instantiation; it's when a project is reloaded. But, you can comment out setFullState and it'll still occur.
The “crash” is inconsistent. Like a lot of slippery bugs, it’ll start happening consistently and then it’ll stop happening completely.
When it does happen, it initially appears to load fine: the view loads and looks correct, and it produces audio. But, after a couple seconds, the plugin view disappears and it stops producing audio. I see this in the console log:
viewServiceDidTerminateWithError:: Error Domain=_UIViewServiceInterfaceErrorDomain Code=3 "(null)" UserInfo={Message=Service Connection Interrupted}
You don’t have to generate any MIDI events to crash it. It would crash even after I commented out the processing block.
If anyone has any ideas, including how to get some useful debugging info out of this situation, let me know!
I tried to look at crash logs, but there are no crash logs generated
didReceiveMemoryWarning is not tripped. In fact, I did an experiment where I allocated 100 megs and memset’d it on startup, and it didn’t crash it.
I tried attaching a debugger, but it goes from “no debug session” to “waiting to attach” after it crashes-- at no point does it actually attach. It will attach if I then reload the plugin, but then it won’t crash. The Zombies and Leaks tools didn't reveal anything, nor did the memory sanitizers.
Using a Storyboard instead of a XIB didn't change the behavior (not sure why it would, but it was one of the last few differences between this and Apple's example).
I created a very tiny example project which exhibits the problem (unfortunately, I cannot post any code which shows the problem because I cannot find where exactly the problem code is-- maybe it's even a project setting?). It has a minimal GUI, no setFullState, and generates white noise:
https://drive.google.com/open?id=1dw3xTHn3qY411eXLaIb_9_S5PAtrr5Nk
Expected: It doesn't crash or disappear randomly
Actual results: After reloading a project file which uses this AUv3, the plugin will disappear after a few seconds. It initially produces audio normally and the GUI looks OK, but then vanishes.

QtCreator WYSIWYG quality

I am making my first steps with QtCreator and I see some issues. I designed a simple widget, see the image below. On this screenshot the bottom view is what I designed and the top view is the result of running the design. I say they are similar, but I expected more. It looks like the running version compresses the components. Is there something I should set in QtCreator?
I also attempted to check the functionality of my widget, using debugging, but I receive the Warning 'This does not seem to be a "Debug" build.' Shall I set something to produce a debug build?
In the meantime I found out that if I do not put the widgets in a layout box,then I receive as output what I expected. Why a layout has such side effect?
Also, in the meantime I added some signal/slot connections. Since I did, I am presented with error message ui_registerwidget.h:13: error: QtWidgets/QAction: No such file or directory. It is a file/code generated by the QtCreator.

Ported OSX Obj-C/CG Screenshot Code to js-ctypes - crash on final line

I ported some objective-c/CoreGraphics code that takes a screenshot of multiple monitors but it's not working. The jsctypes guys won't be able to help because the section is just me answering questions lol
The objc/cg code is from here: https://stackoverflow.com/a/28247749/1828637
My jsctypes type/struct/declares are here: https://github.com/Noitidart/NativeShot/blob/mac-troubleshooting/modules/ostypes_mac.jsm
The jsctypes port is here: https://github.com/Noitidart/NativeShot/blob/mac-troubleshooting/modules/workers/MainWorker.js#L443-656
And the last line is line 643 which causes the crash:
var rez_writeToFile = ostypes.API('objc_msgSend')(data, ostypes.HELPER.sel('writeTofile:atomically:'), myNSStrings.get(OS.Path.join(OS.Constants.Path.desktopDir, 'full_ss.png')), ostypes.CONST.YES);
This coincides with the objectivec of
[data writeToFile:#"/tmp/screenshot.png" atomically:YES];
except i changed path to ...desktop/...png
I wrote to sepearte gists, to align the lines in text diff software to make sure I did everything.
Here is objc/cg: https://gist.github.com/Noitidart/8affcd8bee60d22dcb52
and here is jsctypes: https://gist.github.com/Noitidart/3d4a4e8df625dbea8cc1
I dont think i missed anything i dont know why it crashes on that final line
Do any of the ObjC/CG people see any type definition that is wrong or something that I missed (for example the ObjC code uses compound statments I'm not sure I understood/translated them correctly in the port).
Wowww so after struggling for like some hours then posting this I realize it right away haha
Casing typo in selector!! I had writeTofile:atomically instead of writeToFile:atomically!
If anyone would like to test this out, it's a simple firefox addon test case.
Install an addon that allows installing addons from github repos from here: https://addons.mozilla.org/en-US/firefox/addon/github-extension-installer/
Go to commit on this branch that works here: https://github.com/Noitidart/NativeShot/tree/f5f2e8606d3c5c657e901239d3ceb8c8c79a4494
Then click the "Add to Firefox" button at bottom right, below the "Download Zip" button
Click on the toolbar button icon that gets added to firefox, as seen in this screenshot: http://i.imgur.com/n7lSxje.png
Check desktop you now have a single png file with a screenshot of all the monitors, huge props to #KenThomas!

OpenCart auto complete broken on featured module

apologies if this has already been covered.
I have an issue where i can't add products to the featured module as the auto-complete doesn't find anything and never drops down. Is this something that's happened for any one else?
Currently using v1.5.6
Error shown in console after any action on the featured module admin page is...
"event.returnValue is deprecated. Please use the standard event.preventDefault() instead. "
OpenCarts error log shows...
'PHP Notice: Undefined variable: filter_category in /home/sites/cardboutique.ie/public_html/admin/controller/catalog/product.php on line 1434'
I've re-upped all the files (as it was working) but no joy.
I also doubt the first error is the main issue but don't have decent enough knowledge to vouch for that.