Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix blank line cause silent quit. #145

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nomadalex
Copy link

when logcat output blank line, pidcat will silent quit.

@JakeWharton
Copy link
Owner

Hmm should we actually continue here? Or display the blank line?

@nomadalex
Copy link
Author

nomadalex commented Aug 7, 2017

It is completely blank line, it is unnecessary to display it. Blank which application output will not be completely blank.

@JakeWharton
Copy link
Owner

JakeWharton commented Aug 7, 2017 via email

@nomadalex
Copy link
Author

I don't know, but it exists, I found it on huawei honor 6, below is raw output with print(repr(line)), the second line cause quit.

"int logctl_get(): open '/dev/hwlog_switch' fail -1, 13. Permission denied\r\n"
'\r\n'
'Note: log switch off, only log_main and log_events will have logs!\r\n'
'--------- beginning of system\r\n'
'V/ToolboxContentView( 4766): onReceive:action ACTION_STATE_CHANGED\r\n'
'V/ToolboxContentView( 4766): onReceive:action ACTION_STATE_CHANGED\r\n'
'V/ToolboxContentView( 4766): onReceive:action ACTION_STATE_CHANGED\r\n'
'D/ConnectivityService( 4261): registerNetworkAgent NetworkAgentInfo{ ni{[type: WIFI[], state: CONNECTING/CONNECTING, reason: (unspecified), extra: "360WiFi-xiuusei", roaming: false, failover: false, isAvailable: true]}  network{100}  lp{{LinkAddresses: []  Routes: [] DnsAddresses: [] Domains: null MTU: 0 TcpBufferSizes: 524288,1048576,2097152,262144,524288,1048576}}  nc{[ Transports: WIFI Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN LinkUpBandwidth>=1048576Kbps LinkDnBandwidth>=1048576Kbps]}  Score{60}  everValidated{false}  lastValidated{false}  created{false} lingering{false} explicitlySelected{false} acceptUnvalidated{false} everCaptivePortalDetected{false} lastCaptivePortalDetected{false} }\r\n'
'D/ConnectivityService( 4261): Got NetworkAgent Messenger\r\n'
'D/ConnectivityService( 4261): NetworkAgentInfo [WIFI () - 100] EVENT_NETWORK_INFO_CHANGED, going from null to CONNECTING\r\n'
'D/HwConnectivityService( 4261): hintUserSwitchToMobileWhileWifiDisconnected, state=CONNECTING  type =1\r\n'
'D/HwConnectivityService( 4261): mLastWifiState =DISCONNECTED\r\n'
'D/HwConnectivityService( 4261): [enter]handleLteMobileDataStateChange type=1,subType=0\r\n'
'D/HwConnectivityService( 4261): csagent WIFI NetworkAgent regist as netid: 100, mWifiNetworkMessenger=android.os.Messenger@a22f484\r\n'
'D/ConnectivityService( 4261): NetworkAgent connected\r\n'
'D/HwConnectivityService( 4261): mIntentReceiver begin\r\n'
'D/HwConnectivityService( 4261): CtrlSocket Receiver,disable: false locked: false action: android.net.wifi.STATE_CHANGE mSmartKeyguardLevel: normal_level mStartPowerSaving: false\r\n'
'D/WifiService( 4261): onReceive, action:android.net.wifi.STATE_CHANGE\r\n'
'D/NetdConnector( 4261): SND -> {205 interface ipv6 wlan0 enable}\r\n'
'D/FrameworkListener( 3726): dispatchCommand cmdNum = 205, argv[0] = interface\r\n'
'W/SocketListener( 3726): sending broadcast to Pid = 4261, Uid = 1000 \r\n'
'W/SocketListener( 3726): sending broadcast to Pid = 4261, Uid = 1000 \r\n'
'D/NetdConnector( 4261): RCV <- {200 205 IPv6 state changed}\r\n'
'D/NetdConnector( 4261): RCV <- {200 205 IPv6 state changed}\r\n'
'D/NetdConnector( 4261): RCV <- {616 Route updated fe80::/64 dev wlan0}\r\n'
'D/NetdConnector( 4261): RCV <- {616 Route updated fe80::/64 dev wlan0}\r\n'
'D/NetdConnector( 4261): RCV <- {614 Address updated fe80::5a1f:28ff:fe0a:1642/64 wlan0 196 253}\r\n'
'D/NetdConnector( 4261): RCV unsolicited event from native daemon, event = 616 Route updated fe80::/64 dev wlan0\r\n'
'D/NetdConnector( 4261): RCV <- {614 Address updated fe80::5a1f:28ff:fe0a:1642/64 wlan0 196 253}\r\n'
'D/NetdConnector( 4261): SND -> {206 interface setcfg wlan0 0.0.0.0 0}\r\n'
'D/FrameworkListener( 3726): dispatchCommand cmdNum = 206, argv[0] = interface\r\n'
'D/NetdConnector( 4261): RCV <- {200 206 Interface configuration set}\r\n'
'D/NetdConnector( 4261): RCV <- {200 206 Interface configuration set}\r\n'

@nomadalex
Copy link
Author

hello?

@rodriamaro
Copy link

Hi, I reach the same problem with Huawei device and this PR fixes the silent quit.

nicopico-dev added a commit to nicopico-dev/pidcat that referenced this pull request Apr 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants