The app crashes while trying to send GPS, and wifi request. It crashed because the Edittext for the functions in settings was set to empty

in #utopian-io5 years ago

Project Information

Expected behavior

I expect it to reject an empty Edittext field.

Actual behavior

The app crashes while trying to send GPS, and wifi request. It crashed because the Edittext for the functions in settings was set to empty.

How to reproduce

  • Navigate to settings and delete the wifi and GPS name.
  • Go to homescreen and add a name and number to number to request,
  • click on the added number and then click on wifi or GPS request
  • Watch it crash.
Browser/App version:

Finder v1.5

Operating system:

Android 0

Recording Of The Bug

Logcat

2019-05-31 17:38:31.872 946-16895/? E/TouchFilter: setTouchFilter LOG Enable prameter: 0
2019-05-31 17:38:38.144 28546-29085/? E/memtrack: Couldn't load memtrack module
2019-05-31 17:38:43.611 946-975/? E/BatteryExternalStatsWorker: no controller energy info supplied for wifi
2019-05-31 17:38:43.666 946-975/? E/BatteryExternalStatsWorker: no controller energy info supplied for bluetooth
2019-05-31 17:38:43.700 946-975/? E/BatteryExternalStatsWorker: modem info is invalid: ModemActivityInfo{ mTimestamp=0 mSleepTimeMs=0 mIdleTimeMs=0 mTxTimeMs[]=[0, 0, 0, 0, 0] mRxTimeMs=0 mEnergyUsed=0}
2019-05-31 17:38:44.635 2469-2469/? E/TAG: Power Widget test:9-----14
2019-05-31 17:38:44.635 2469-2469/? E/PowerCenter/PowerWidgetProvider: updateValues mBatteryPercentage:52
2019-05-31 17:38:54.713 1673-3018/? E/byop: *~*~*~ Channel {0} was not shutdown properly!!! ~*~*~*
        Make sure to call shutdown()/shutdownNow() and wait until awaitTermination() returns true.
    java.lang.RuntimeException: ManagedChannel allocation site
        at byos.<init>(:com.google.android.gms@[email protected] (040408-245988633):1)
        at byop.<init>(:com.google.android.gms@[email protected] (040408-245988633):2)
        at byhd.b(:com.google.android.gms@[email protected] (040408-245988633):14)
        at rwn.a(:com.google.android.gms@[email protected] (040408-245988633):41)
        at rwn.a(:com.google.android.gms@[email protected] (040408-245988633):63)
        at alvr.a(:com.google.android.gms@[email protected] (040408-245988633):6)
        at alxt.b(:com.google.android.gms@[email protected] (040408-245988633):11)
        at alxe.a(:com.google.android.gms@[email protected] (040408-245988633):2)
        at zwc.run(:com.google.android.gms@[email protected] (040408-245988633):19)
        at bhlo.run(:com.google.android.gms@[email protected] (040408-245988633):2)
        at sed.b(:com.google.android.gms@[email protected] (040408-245988633):29)
        at sed.run(:com.google.android.gms@[email protected] (040408-245988633):21)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
        at skl.run(Unknown Source:7)
        at java.lang.Thread.run(Thread.java:764)
2019-05-31 17:38:54.713 1673-3018/? E/byop: *~*~*~ Channel {0} was not shutdown properly!!! ~*~*~*
        Make sure to call shutdown()/shutdownNow() and wait until awaitTermination() returns true.
    java.lang.RuntimeException: ManagedChannel allocation site
        at byos.<init>(:com.google.android.gms@[email protected] (040408-245988633):1)
        at byop.<init>(:com.google.android.gms@[email protected] (040408-245988633):2)
        at byhd.b(:com.google.android.gms@[email protected] (040408-245988633):14)
        at rwn.a(:com.google.android.gms@[email protected] (040408-245988633):41)
        at rwn.a(:com.google.android.gms@[email protected] (040408-245988633):63)
        at alvr.a(:com.google.android.gms@[email protected] (040408-245988633):6)
        at alxt.b(:com.google.android.gms@[email protected] (040408-245988633):11)
        at alxe.a(:com.google.android.gms@[email protected] (040408-245988633):2)
        at zwc.run(:com.google.android.gms@[email protected] (040408-245988633):19)
        at bhlo.run(:com.google.android.gms@[email protected] (040408-245988633):2)
        at sed.b(:com.google.android.gms@[email protected] (040408-245988633):29)
        at sed.run(:com.google.android.gms@[email protected] (040408-245988633):21)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
        at skl.run(Unknown Source:7)
        at java.lang.Thread.run(Thread.java:764)
2019-05-31 17:38:54.714 1673-3018/? E/byop: *~*~*~ Channel {0} was not shutdown properly!!! ~*~*~*
        Make sure to call shutdown()/shutdownNow() and wait until awaitTermination() returns true.
    java.lang.RuntimeException: ManagedChannel allocation site
        at byos.<init>(:com.google.android.gms@[email protected] (040408-245988633):1)
        at byop.<init>(:com.google.android.gms@[email protected] (040408-245988633):2)
        at byhd.b(:com.google.android.gms@[email protected] (040408-245988633):14)
        at rwn.a(:com.google.android.gms@[email protected] (040408-245988633):41)
        at rwn.a(:com.google.android.gms@[email protected] (040408-245988633):63)
        at alvr.a(:com.google.android.gms@[email protected] (040408-245988633):6)
        at alxt.b(:com.google.android.gms@[email protected] (040408-245988633):11)
        at alxe.a(:com.google.android.gms@[email protected] (040408-245988633):2)
        at zwc.run(:com.google.android.gms@[email protected] (040408-245988633):19)
        at bhlo.run(:com.google.android.gms@[email protected] (040408-245988633):2)
        at sed.b(:com.google.android.gms@[email protected] (040408-245988633):29)
        at sed.run(:com.google.android.gms@[email protected] (040408-245988633):21)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
        at skl.run(Unknown Source:7)
        at java.lang.Thread.run(Thread.java:764)
2019-05-31 17:38:54.715 1673-3018/? E/byop: *~*~*~ Channel {0} was not shutdown properly!!! ~*~*~*
        Make sure to call shutdown()/shutdownNow() and wait until awaitTermination() returns true.
    java.lang.RuntimeException: ManagedChannel allocation site
        at byos.<init>(:com.google.android.gms@[email protected] (040408-245988633):1)
        at byop.<init>(:com.google.android.gms@[email protected] (040408-245988633):2)
        at byhd.b(:com.google.android.gms@[email protected] (040408-245988633):14)
        at rwn.a(:com.google.android.gms@[email protected] (040408-245988633):41)
        at rwn.a(:com.google.android.gms@[email protected] (040408-245988633):63)
        at alvr.a(:com.google.android.gms@[email protected] (040408-245988633):6)
        at alxt.b(:com.google.android.gms@[email protected] (040408-245988633):11)
        at alxe.a(:com.google.android.gms@[email protected] (040408-245988633):2)
        at zwc.run(:com.google.android.gms@[email protected] (040408-245988633):19)
        at bhlo.run(:com.google.android.gms@[email protected] (040408-245988633):2)
        at sed.b(:com.google.android.gms@[email protected] (040408-245988633):29)
        at sed.run(:com.google.android.gms@[email protected] (040408-245988633):21)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
        at skl.run(Unknown Source:7)
        at java.lang.Thread.run(Thread.java:764)
2019-05-31 17:38:54.716 1673-3018/? E/byop: *~*~*~ Channel {0} was not shutdown properly!!! ~*~*~*
        Make sure to call shutdown()/shutdownNow() and wait until awaitTermination() returns true.
    java.lang.RuntimeException: ManagedChannel allocation site
        at byos.<init>(:com.google.android.gms@[email protected] (040408-245988633):1)
        at byop.<init>(:com.google.android.gms@[email protected] (040408-245988633):2)
        at byhd.b(:com.google.android.gms@[email protected] (040408-245988633):14)
        at rwn.a(:com.google.android.gms@[email protected] (040408-245988633):41)
        at rwn.a(:com.google.android.gms@[email protected] (040408-245988633):63)
        at alvr.a(:com.google.android.gms@[email protected] (040408-245988633):6)
        at alxt.b(:com.google.android.gms@[email protected] (040408-245988633):11)
        at alxe.a(:com.google.android.gms@[email protected] (040408-245988633):2)
        at zwc.run(:com.google.android.gms@[email protected] (040408-245988633):19)
        at bhlo.run(:com.google.android.gms@[email protected] (040408-245988633):2)
        at sed.b(:com.google.android.gms@[email protected] (040408-245988633):29)
        at sed.run(:com.google.android.gms@[email protected] (040408-245988633):21)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
        at skl.run(Unknown Source:7)
        at java.lang.Thread.run(Thread.java:764)
2019-05-31 17:39:00.052 28184-28184/ru.seva.finder E/AndroidRuntime: FATAL EXCEPTION: main
    Process: ru.seva.finder, PID: 28184
    java.lang.IllegalArgumentException: Invalid message body
        at android.telephony.SmsManager.sendTextMessageInternal(SmsManager.java:329)
        at android.telephony.SmsManager.sendTextMessage(SmsManager.java:317)
        at ru.seva.finder.MainActivity$6.sendSmsRequest(MainActivity.java:438)
        at ru.seva.finder.MainActivity$6.onMenuItemClick(MainActivity.java:481)
        at android.widget.PopupMenu$1.onMenuItemSelected(PopupMenu.java:105)
        at com.android.internal.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:761)
        at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:167)
        at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:908)
        at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:898)
        at com.android.internal.view.menu.MenuPopup.onItemClick(MenuPopup.java:128)
        at android.widget.AdapterView.performItemClick(AdapterView.java:318)
        at android.widget.AbsListView.performItemClick(AbsListView.java:1158)
        at android.widget.AbsListView$PerformClick.run(AbsListView.java:3127)
        at android.widget.AbsListView$3.run(AbsListView.java:4042)
        at android.os.Handler.handleCallback(Handler.java:790)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:164)
        at android.app.ActivityThread.main(ActivityThread.java:6524)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:888)
2019-05-31 17:39:02.117 946-16895/? E/TouchFilter: setTouchFilter LOG Enable prameter: 0
2019-05-31 17:39:04.144 946-16895/? E/TouchFilter: setTouchFilter LOG Enable prameter: 0
2019-05-31 17:39:06.161 946-16895/? E/TouchFilter: setTouchFilter LOG Enable prameter: 0
2019-05-31 17:39:06.252 28184-28193/ru.seva.finder E/SpellCheckerSession: ignoring processOrEnqueueTask due to unexpected mState=TASK_CLOSE scp.mWhat=TASK_CLOSE
2019-05-31 17:39:06.265 28184-28193/ru.seva.finder E/SpellCheckerSession: ignoring processOrEnqueueTask due to unexpected mState=TASK_CLOSE scp.mWhat=TASK_CLOSE
2019-05-31 17:39:08.176 946-17179/? E/TouchFilter: setTouchFilter LOG Enable prameter: 0
2019-05-31 17:39:10.191 946-1816/? E/TouchFilter: setTouchFilter LOG Enable prameter: 0
2019-05-31 17:39:12.210 946-17179/? E/TouchFilter: setTouchFilter LOG Enable prameter: 0
2019-05-31 17:39:14.268 946-17179/? E/TouchFilter: setTouchFilter LOG Enable prameter: 0
2019-05-31 17:39:16.328 946-17179/? E/TouchFilter: setTouchFilter LOG Enable prameter: 0
2019-05-31 17:39:18.388 946-17179/? E/TouchFilter: setTouchFilter LOG Enable prameter: 0
2019-05-31 17:39:20.448 946-17179/? E/TouchFilter: setTouchFilter LOG Enable prameter: 0
2019-05-31 17:39:22.509 946-17179/? E/TouchFilter: setTouchFilter LOG Enable prameter: 0
2019-05-31 17:39:24.568 946-1816/? E/TouchFilter: setTouchFilter LOG Enable prameter: 0
2019-05-31 17:39:26.626 946-1816/? E/TouchFilter: setTouchFilter LOG Enable prameter: 0


Possible fix

Set Edittext to throw an error message when the field is empty

Github Account

https://github.com/realrufans

Sort:  

Hi @rufans, thanks for making this report.

I appreciate the effort in providing a logcat. This one is however bulky and could have maybe been trimmed to show just the important information - the trace leading to the crash only.

Leaving those fields empty caused the crash. A good way to fix this will be to throw an error message as you have suggested. Proposals ought to be more detailed. You can look at reports from blockchainstudio to get an idea

Thanks again for this report. I look forward to more of your reports.

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Chat with us on Discord.

[utopian-moderator]

Thank you for your review, @fego! Keep up the good work!

Hi @rufans!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server

Hey, @rufans!

Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

Coin Marketplace

STEEM 0.30
TRX 0.12
JST 0.034
BTC 63877.55
ETH 3143.56
USDT 1.00
SBD 3.97