Android Question How identify error with a Crashlytics

scsjc

Well-Known Member
Licensed User
Longtime User
Hi all
Every day I learn more and each time less ;) but I love being able to program with B4A and belong to this great community

Normally with the error reports is: "main.java line 1232"
1 - I open the file that is in the folder project /objects/src/xxxxxxx/xxxxxx/com/main.java
2 - and I locate the line 1232 with which I have clues to find out in the B4A main where the error is found.

But in some cases like the one I attached in the screen "Common.java line 1194" I do not know what file this information can contain in order to follow the clues and find the error.


upload_2018-11-14_19-37-59.png
 

Computersmith64

Well-Known Member
Licensed User
Longtime User
Generally if you look back through the stack trace, you'll find a point in your code where you made a call to the function that generated the exception. For example in the report you posted, it looks like you passed an object to a function that was expecting a string. If you go back through the stack trace, you should find your line of code that did this.

- Colin.
 
Upvote 0

scsjc

Well-Known Member
Licensed User
Longtime User
Generally if you look back through the stack trace, you'll find a point in your code where you made a call to the function that generated the exception. For example in the report you posted, it looks like you passed an object to a function that was expecting a string. If you go back through the stack trace, you should find your line of code that did this.

- Colin.

When you tell "look back through the stack trace"... where find?... i open and mark.. is that??? subprocesses???
Where can I look at the stack? I only get this that I have indicated



upload_2018-11-14_20-24-38.png
 
Upvote 0

Computersmith64

Well-Known Member
Licensed User
Longtime User
Yes - that is the stack trace. Sometimes you won't find any of your code in the stack trace - eg: if the crash is caused by the app failing to install & it hasn't actually run - but a lot of the time you will be able to find something you recognize.

Failing that, search the forum (& Mr Google) for "java.lang.object cannot be cast to java.lang.string" & you might get some ideas as to where you have made the mistake in your code.

- Colin.
 
Upvote 0

scsjc

Well-Known Member
Licensed User
Longtime User
Yes - that is the stack trace. Sometimes you won't find any of your code in the stack trace - eg: if the crash is caused by the app failing to install & it hasn't actually run - but a lot of the time you will be able to find something you recognize.

Failing that, search the forum (& Mr Google) for "java.lang.object cannot be cast to java.lang.string" & you might get some ideas as to where you have made the mistake in your code.

- Colin.
if it is what I did, sometimes I showed the lines of javaline and it was great and other times because of clues ... (but it is going very blindly) and wanted to know if I did well, or had some better method .

thank you
 
Upvote 0

Computersmith64

Well-Known Member
Licensed User
Longtime User
Yes - unfortunately it's not always easy to track down the cause of a crash, but Crashlytics is a lot better than nothing at all! :)

- Colin
 
Upvote 0
Top