FORUMS
Remove All Ads from XDA

 View Poll Results: What are you using this guide for?

A starting point to learn
 
536 Vote(s)
73.02%
A quick refresher course
 
94 Vote(s)
12.81%
Troubleshooting
 
244 Vote(s)
33.24%
Referring users from development threads
 
44 Vote(s)
5.99%
Linking to my own guide(s)
 
10 Vote(s)
1.36%

[UNIVERSAL][LOGCAT]How to get & read a logcat/ Troubleshoot your own issues!

6,796 posts
Thanks Meter: 9,126
 
Post Reply Email Thread
6th August 2017, 02:48 PM |#791  
Junior Member
Thanks Meter: 5
 
More
android starts crashing every app after some time
hey guys,
I'm running a good old oneplus one with CM Version: '13.0-ZNH5Y-20170430-STABLE-Sultan-bacon', rooted (supersu) and xposed module installed.
one day apps started crashing when I wanted to open them ("unfortunately, app1 has stopped"), so i flashed my phone with the same rom and re-installed the apps using titanium backup. everything was fine for around 5 days but then the same problems returned.
the thing is, it doesn't happen in the first hours after reboot and it gets worse if I'm connected to a wifi.
Could someone please take a look at the logcat and tell me what to do? I'm getting crazy
thanks a lot
Attached Files
File Type: rar LOGCAT(2017-08-06)(1518).rar - [Click for QR Code] (50.4 KB, 12 views)
The Following User Says Thank You to oriped For This Useful Post: [ View ] Gift oriped Ad-Free
 
 
12th August 2017, 06:13 PM |#792  
nophyan's Avatar
Member
Flag magelang
Thanks Meter: 26
 
Donate to Me
More
Very confusing to find the error code, please help what should i do
Code:
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference
	at com.android.systemui.statusbar.phone.KeyguardStatusBarView.onBatteryLevelChanged(KeyguardStatusBarView.java)
	at com.android.systemui.statusbar.policy.BatteryController.addStateChangedCallback(BatteryController.java)
	at com.android.systemui.statusbar.phone.KeyguardStatusBarView.setListening(KeyguardStatusBarView.java)
This is the smali
Code:
.method public onBatteryLevelChanged(IZZ)V
    .locals 8

    invoke-static {}, Ljava/text/NumberFormat;->getPercentInstance()Ljava/text/NumberFormat;

    move-result-object v2

    int-to-double v4, p1

    const-wide/high16 v6, 0x4059000000000000L    # 100.0

    div-double/2addr v4, v6

    invoke-virtual {v2, v4, v5}, Ljava/text/NumberFormat;->format(D)Ljava/lang/String;

    move-result-object v1

    iget-object v2, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mBatteryLevel:Landroid/widget/TextView;

    invoke-virtual {v2, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    iget-boolean v2, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mBatteryCharging:Z

    if-eq v2, p3, :cond_1

    const/4 v0, 0x1

    :goto_0
    iput-boolean p3, p0, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->mBatteryCharging:Z

    if-eqz v0, :cond_0

    invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/KeyguardStatusBarView;->updateVisibilities()V

    :cond_0
    return-void

    :cond_1
    const/4 v0, 0x0

    goto :goto_0
.end method
12th August 2017, 06:47 PM |#793  
ballerd's Avatar
Senior Member
Flag manchester
Thanks Meter: 50
 
More
Quote:
Originally Posted by oriped

hey guys,
I'm running a good old oneplus one with CM Version: '13.0-ZNH5Y-20170430-STABLE-Sultan-bacon', rooted (supersu) and xposed module installed.
one day apps started crashing when I wanted to open them ("unfortunately, app1 has stopped"), so i flashed my phone with the same rom and re-installed the apps using titanium backup. everything was fine for around 5 days but then the same problems returned.
the thing is, it doesn't happen in the first hours after reboot and it gets worse if I'm connected to a wifi.
Could someone please take a look at the logcat and tell me what to do? I'm getting crazy
thanks a lot

.
On reading your logcat I would need further information like the log from xposed I'd say it could be a xposed module that's the issue without the log am just guessing try disabling all modules then turn on one at a time and see if u can find the culprit and also are u restoreing data with titanium backup some times this can cause issues try just restoring apps with no data also try different ROM or update are you using custom kernel etc etc also if its a google app that's crashing then you can try different version of opengapps also if u have reboot issues I couldent help without a last_kmsg log or dmesg I'd try kernel auditor it has built in feature to save a kmsg and dmesg to sdcard with out having to use adb or a terminal hope I helped you would be glad to assist you in future if u can provide the logs I asked for if not unfortunately I won't be much use with out them
15th August 2017, 03:46 AM |#794  
Stryke_the_Orc's Avatar
OP Senior Moderator
Flag Maras Dantia
Thanks Meter: 9,126
 
More
Quote:
Originally Posted by nophyan

Very confusing to find the error code, please help what should i do


This is the smali

The first line is your error. It's trying to set the text value of something that doesn't exist.
15th August 2017, 04:13 AM |#795  
nophyan's Avatar
Member
Flag magelang
Thanks Meter: 26
 
Donate to Me
More
Quote:
Originally Posted by Stryke_the_Orc

The first line is your error. It's trying to set the text value of something that doesn't exist.

This line?
Code:
invoke-static {}, Ljava/text/NumberFormat;->getPercentInstance()Ljava/text/NumberFormat;
15th August 2017, 04:52 AM |#796  
Stryke_the_Orc's Avatar
OP Senior Moderator
Flag Maras Dantia
Thanks Meter: 9,126
 
More
Quote:
Originally Posted by nophyan

This line?

"java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequ ence)' on a null object reference
at"

The lines following that show you where the values are (trying to be) being written. Follow the paths in the error to find the appropriate functions/methods being called.
15th August 2017, 05:19 AM |#797  
nophyan's Avatar
Member
Flag magelang
Thanks Meter: 26
 
Donate to Me
More
Quote:
Originally Posted by Stryke_the_Orc

"java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequ ence)' on a null object reference
at"

The lines following that show you where the values are (trying to be) being written. Follow the paths in the error to find the appropriate functions/methods being called.

Yes i know it, but i dont understand with "Attempt to invoke virtual method " i checked on line android/widget/TextView.setText(java that calls on framework.jar, then i decompile framework to view the code is there. And the method is present
15th August 2017, 11:19 AM |#798  
Stryke_the_Orc's Avatar
OP Senior Moderator
Flag Maras Dantia
Thanks Meter: 9,126
 
More
Quote:
Originally Posted by nophyan

Yes i know it, but i dont understand with "Attempt to invoke virtual method " i checked on line android/widget/TextView.setText(java that calls on framework.jar, then i decompile framework to view the code is there. And the method is present

Correct. Where you're experiencing the error is in the two methods trying to set the widget text.
Lol for these lines "invoke-virtual {v2, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequenceV"
15th August 2017, 12:06 PM |#799  
nophyan's Avatar
Member
Flag magelang
Thanks Meter: 26
 
Donate to Me
More
Quote:
Originally Posted by Stryke_the_Orc

Correct. Where you're experiencing the error is in the two methods trying to set the widget text.
Lol for these lines "invoke-virtual {v2, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequenceV"

Should i delete these line?
15th August 2017, 02:20 PM |#800  
Stryke_the_Orc's Avatar
OP Senior Moderator
Flag Maras Dantia
Thanks Meter: 9,126
 
More
Quote:
Originally Posted by nophyan

Should i delete these line?

You can try commenting them out, but I wouldn't delete them.
15th August 2017, 05:23 PM |#801  
nophyan's Avatar
Member
Flag magelang
Thanks Meter: 26
 
Donate to Me
More
Quote:
Originally Posted by Stryke_the_Orc

You can try commenting them out, but I wouldn't delete them.

Can you give me an example to commenting out, i'm bad on coding 😁
Post Reply Subscribe to Thread

Tags
how-to, logcat, troubleshooting

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes