BelledonneCommunications / linphone-android

Linphone.org mirror for linphone-android (https://gitlab.linphone.org/BC/public/linphone-android)
https://linphone.org
GNU General Public License v3.0
1.12k stars 688 forks source link

Linphone Android App Crashed on Chat Message Received #1285

Closed amit1576 closed 3 years ago

amit1576 commented 3 years ago

@Viish ,

With latest sdk 4.5.0_Beta android app got crashed on chat message received. Same is happening with Linphone Desktop with sdk Virsion 4.5.0-alpha-312-g15a9aecaf.

Logs are attached. LinphoneCrashOnMessageReceived.txt

Viish commented 3 years ago

There is no crash in the logs you attached after the (only) message received. Please attach more specific logs and the back stack of the crash.

amit1576 commented 3 years ago

@Viish ,

Please find full logs as required.

Please check either these is enough or should i send logcat ?

AppCrashAfterChat.txt

Viish commented 3 years ago

No, I need the stack trace in adb logcat.

amit1576 commented 3 years ago

ok. Providing you.

amit1576 commented 3 years ago

@Viish .

Please find the crash dump.

logcat.txt

Viish commented 3 years ago

Problem seems to be due to the fact that you aren't using the configured account to send chat messages but instead the local identity:

02-04 16:41:11.711  4114  4114 I CoralUC : Proxy config [0xe99f1400] for identity [sip:3005@collaboration.coraltele.com] moving from state [LinphoneRegistrationProgress] to [LinphoneRegistrationOk] on core [0xe0bb3400]
02-04 16:41:11.711  4114  4114 I CoralUC : Updating friends for identity [sip:3005@collaboration.coraltele.com] on core [0xe0bb3400]
02-04 16:41:11.711  4114  4114 I CoralUC : Cannot look for proxy for uri [0xe18045c0] that has no domain set, returning default
02-04 16:41:11.717  4114  4114 I CoralUC : Cannot look for proxy for uri [0xe18045c0] that has no domain set, returning default
02-04 16:41:11.718  4114  4114 W CoralUC : no host found in this uri
02-04 16:41:11.721  4114  4114 E CoralUC : fast_header_address parser error for [sip:]
02-04 16:41:11.721  4114  4114 E CoralUC : No To: address, cannot build request
02-04 16:41:11.722  4114  4114 I CoralUC : _linphone_update_dependent_proxy_config(): 0xe99f1400 is registered, checking for [0xe99f1400] ->dependency=0x0
02-04 16:41:11.725  4114  4114 I CoralUC : Skipping top route of initial route-set because same as request-uri
02-04 16:41:11.728  4114  4114 I CoralUC : bellesip_wake_lock_acquire(): Android wake lock [belle-sip transaction(0xe182bf00)] acquired [ref=0x2e2a]
02-04 16:41:11.728  4114  4114 I CoralUC : bellesip_wake_lock_acquire(): cast long of wakelock 11818
02-04 16:41:11.728  4114  4114 I CoralUC : transaction [0xe182bf00]: starting transaction background task with id=[2e2a].
02-04 16:41:11.728  4114  4114 I CoralUC : Changing [client] [MESSAGE] transaction [0xe182bf00], from state [INIT] to [TRYING]
02-04 16:41:11.728  4114  4114 I CoralUC : Body has been compressed: 282->201:
02-04 16:41:11.728  4114  4114 I CoralUC : <?xml version="1.0" encoding="UTF-8" standalone="no" ?><imdn xmlns="urn:ietf:params:xml:ns:imdn"><message-id>595002df-2bec-4497-9264-0e57cb0d6212</message-id><datetime>2021-02-04T11:10:37Z</datetime><delivery-notification><status><delivered/></status></delivery-notification></imdn>
02-04 16:41:11.728  4114  4114 W CoralUC : message [0xce47c080] has Content-Length [282] and body size [201] which are inconsistent, fixing it.
02-04 16:41:11.731  4114  4114 I CoralUC : channel [0xce324980]: found binary data in buffer, will stop logging it now.
02-04 16:41:11.732  4114  4114 I CoralUC : channel [0xce324980]: message sent to [TLS://collaboration.coraltele.com:5061], size: [941] bytes
02-04 16:41:11.732  4114  4114 I CoralUC : MESSAGE sip:7002@collaboration.coraltele.com SIP/2.0
02-04 16:41:11.732  4114  4114 I CoralUC : Via: SIP/2.0/TLS 192.168.232.2:59728;branch=z9hG4bK.noCW5rBEI;rport
02-04 16:41:11.732  4114  4114 I CoralUC : From: <sip:3005@122.160.221.52;app-id=108861424352;pn-silent=1;pn-timeout=0;pn-tok=eKBhZIKt7Hg:APA91bEsX4T1IyzONfdl9T7MD8T7Lg9K-wulmYfG6szGhf3D2wvAryPSFa0TwM5aFBMT9obsPzJSysA7yNBP5JOmQFVQ5P8FG2pgBThhH2FTgkBwFISl6U5rv7TLp3KljrDp5jVRzzVD;pn-type=firebase>;tag=v4ssFSsv2
02-04 16:41:11.732  4114  4114 I CoralUC : To: sip:7002@collaboration.coraltele.com
02-04 16:41:11.732  4114  4114 I CoralUC : CSeq: 20 MESSAGE
02-04 16:41:11.732  4114  4114 I CoralUC : Call-ID: y7lZTaMov4
02-04 16:41:11.732  4114  4114 I CoralUC : Max-Forwards: 70
02-04 16:41:11.732  4114  4114 I CoralUC : Supported: replaces, outbound, gruu
02-04 16:41:11.732  4114  4114 I CoralUC : Date: Thu, 04 Feb 2021 11:11:11 GMT
02-04 16:41:11.732  4114  4114 I CoralUC : Content-Encoding: deflate
02-04 16:41:11.732  4114  4114 I CoralUC : Content-Type: message/imdn+xml
02-04 16:41:11.732  4114  4114 I CoralUC : Content-Length: 201
02-04 16:41:11.732  4114  4114 I CoralUC : Priority: non-urgent
02-04 16:41:11.732  4114  4114 I CoralUC : User-Agent: CoralUCAPP/4.4.18 (AOSP on IA Emulator) CoralUC SDK/4.5.0

Check your chat room / chat message creation code.

And just to be clear, issue isn't when you receive a chat message, but when you receive the 202 Accepted for an outgoing chat message.

amit1576 commented 3 years ago

Hi @Viish ,

Thanks for your reply.

But this issue started when I started using 4.5.0-beta. With SDK 4.5.0-alpha there was no such problem. Further I started using 4.5.0-beta as 4.5.0-alpha has app crash issue in case of Serial forking(#1270) and you suggest me to use 4.5.0-beta.

Please suggest.

Viish commented 3 years ago

Also check that your proxy config is correctly set as default in the Core.