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

Exception thrown in StatusFragment in onNotifyReceived #309

Closed
a1batross opened this issue Jul 9, 2018 · 1 comment
Closed

Exception thrown in StatusFragment in onNotifyReceived #309

a1batross opened this issue Jul 9, 2018 · 1 comment

Comments

@a1batross
Copy link

Hi there.

I am not familiar with SIP, but seems code in onNotifyReceived is wrong.
Server sends a header with Voice-Message: 7/0 (0/0)
Meanwhile code in onNotifyReceived tries to split by "voice-message". String.split() method does not care about case-insensitivity, so it fails with following backtrace:

07-09 17:28:21.729   899   899 W System.err: java.lang.ArrayIndexOutOfBoundsException: length=1; index=1
07-09 17:28:21.730   899   899 W System.err:    at org.linphone.fragments.StatusFragment$1.onNotifyReceived(StatusFragment.java:125)
07-09 17:28:21.730   899   899 W System.err:    at org.linphone.core.CoreImpl.iterate(Native Method)
07-09 17:28:21.730   899   899 W System.err:    at org.linphone.core.CoreImpl.iterate(Core.java:4591)
07-09 17:28:21.730   899   899 W System.err:    at org.linphone.LinphoneManager$2$1.run(LinphoneManager.java:647)
07-09 17:28:21.731   899   899 W System.err:    at android.os.Handler.handleCallback(Handler.java:751)
07-09 17:28:21.731   899   899 W System.err:    at android.os.Handler.dispatchMessage(Handler.java:95)
07-09 17:28:21.731   899   899 W System.err:    at android.os.Looper.loop(Looper.java:154)
07-09 17:28:21.731   899   899 W System.err:    at android.app.ActivityThread.main(ActivityThread.java:6121)
07-09 17:28:21.731   899   899 W System.err:    at java.lang.reflect.Method.invoke(Native Method)
07-09 17:28:21.731   899   899 W System.err:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:898)
07-09 17:28:21.731   899   899 W System.err:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:788)

Then I have fixed it, but it tries to pass an Integer to setText method. Android's setText(int) method means that this is internal resource(like R.string.some_localized_string), so it fails again.

07-09 17:57:26.968  2122  2122 W System.err: android.content.res.Resources$NotFoundException: String resource ID #0x7
07-09 17:57:26.969  2122  2122 W System.err:    at android.content.res.Resources.getText(Resources.java:335)
07-09 17:57:26.969  2122  2122 W System.err:    at android.widget.TextView.setText(TextView.java:4555)
07-09 17:57:26.969  2122  2122 W System.err:    at org.linphone.fragments.StatusFragment$1.onNotifyReceived(StatusFragment.java:129)
07-09 17:57:26.969  2122  2122 W System.err:    at org.linphone.core.CoreImpl.iterate(Native Method)
07-09 17:57:26.969  2122  2122 W System.err:    at org.linphone.core.CoreImpl.iterate(Core.java:4591)
07-09 17:57:26.969  2122  2122 W System.err:    at org.linphone.LinphoneManager$2$1.run(LinphoneManager.java:647)
07-09 17:57:26.969  2122  2122 W System.err:    at android.os.Handler.handleCallback(Handler.java:751)
07-09 17:57:26.969  2122  2122 W System.err:    at android.os.Handler.dispatchMessage(Handler.java:95)
07-09 17:57:26.969  2122  2122 W System.err:    at android.os.Looper.loop(Looper.java:154)
07-09 17:57:26.969  2122  2122 W System.err:    at android.app.ActivityThread.main(ActivityThread.java:6121)
07-09 17:57:26.969  2122  2122 W System.err:    at java.lang.reflect.Method.invoke(Native Method)
07-09 17:57:26.969  2122  2122 W System.err:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:898)
07-09 17:57:26.969  2122  2122 W System.err:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:788)
@Viish
Copy link
Member

Viish commented Jan 24, 2019

Thanks for the report, I'll fix that for the next release (4.1)

@Viish Viish closed this as completed Jan 24, 2019
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

No branches or pull requests

2 participants