understanding logcat output when written to file
This can be easily understood by simply comparing the output of logcat with that displayed in DDMS. Here's an example:
Logcat output:
E/QC-DSS-LIB( 74): unrecognized ifi_index 15
D/wpa_supplicant(19367): RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
D/wpa_supplicant(19367): RTM_NEWLINK, IFLA_IFNAME: Interface 'eth0' added
D/wpa_supplicant(19367): Wireless event: cmd=0x8c02 len=27
D/wpa_supplicant(19367): RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
D/wpa_supplicant(19367): RTM_NEWLINK, IFLA_IFNAME: Interface 'eth0' added
D/wpa_supplicant(19367): Wireless event: cmd=0x8c02 len=33
D/WifiStateTracker( 123): Reset connections and stopping DHCP
DDMS screenshot:
Analysis of the first line from the screenshot:
- "E" is the log level
- QC-DSS-LIB is the tag
- "74" is the Process ID
If you wish to get the timestamp also from logcat, use the -v
switch like this:
logcat -v time
which would give an output in this format:
02-16 09:58:21.446 E/QC-DSS-LIB( 74): unrecognized ifi_index 15
Explanation about logcat?
Those are PID-TID.
PID is process ID, TID is thread id.
Interpret Logcat entry: threadid=8: still suspended after undo (sc=1 dc=1 s=Y)
The message comes from dvmSuspendSelf()
, which threads call when the debugger (via the JDWP thread) has asked them to suspend.
The way it's supposed to work is (where "we" are a thread):
- JDWP asks us to suspend
- we tell it we've suspended and go to sleep
- eventually, debugger wakes us up and we resume
The message is logged when the condition variable the VM is waiting on signals, but for some reason we're still marked as suspended. The code notes:
/*
* The condition was signaled but we're still suspended. This
* can happen if the debugger lets go while a SIGQUIT thread
* dump event is pending (assuming SignalCatcher was resumed for
* just long enough to try to grab the thread-suspend lock).
*/
The expectation in this case is that we got woken up unexpectedly when a signal arrived (e.g. system_server thinks there's an ANR because the main thread isn't responding because the debugger has suspended it), and if we loop around again the debugger will get a chance to clean us up and set us on our way.
The log message is printing the values of self->suspendCount
(how many times have we been told to suspend ourselves), self->dbgSuspendCount
(how many of those suspend requests came from the debugger, so we can "undo" all those if the debugger disconnects), and the value of the self->isSuspended
boolean.
Note the "s=Y" flag disappeared in gingerbread -- the way thread suspension works was changed.
Need help understanding logcat message ClassCastException
In your layout XML file there is TextInputLayout with ID type_text
which you are trying to convert into EditText.
In your XML file change this TextInputLayout to EditText
OR
In your Class.java file correct this :final EditText edt = findViewById(R.id.type_text);
to
final TextInputLayout your_name = findViewById(R.id.type_text);
Related Topics
Read Only File System on Android
Media Queries Not Behaving as Expected on Android
Actionbaractivity Is Deprecated
Getexternalstoragepublicdirectory Deprecated in Android Q
Cannot Load Library: Reloc_Library[1285]: Cannot Locate 'Rand'
Remove Underline from Links in Textview - Android
How to Get the APK of an Installed App Without Root Access
Quality Problems When Resizing an Image at Runtime
How to View Androidmanifest.Xml from APK File
Letting Webview on Android Work with Prefers-Color-Scheme: Dark
Facebook Key Hash Does Not Match Any Stored Key Hashes
Filtering Listview with Custom (Object) Adapter
Recognizing Multiple Keywords Using Pocketsphinx
Get Current Location of User in Android Without Using Gps or Internet