codeka / wwmmo

War Worlds MMO
MIT License
291 stars 201 forks source link

Crash on Colonization attempt when no colony ships present #134

Closed jeromehollon closed 8 years ago

jeromehollon commented 9 years ago

Bug:

Application closes with "Unfortunately, War Worlds Has Closed" when attempting to colonize a planet when there are no colony ships present in the star system.

Steps to Reproduce:

  1. Select a star system with no colony ships available, and a planet capable of being colonized
  2. Select colonizable planet.
  3. Click Colonize.

    Expected Result:

Useful error message indicating no available colony ships

Actual Result:

Application closes with "Unfortunately, War Worlds Has Closed"

jeromehollon commented 9 years ago

Details from logcat:

D/PhoneInterfaceManager( 4949): [PhoneIntfMgr] mSigLevel = 5 I/[SystemUI]NetworkController( 4130): onReceive: intent=Intent { act=android.intent.action.SIG_STR flg=0x20000010 (has e xtras) } E/AndroidRuntime( 8998): FATAL EXCEPTION: main E/AndroidRuntime( 8998): Process: au.com.codeka.warworlds, PID: 8998 E/AndroidRuntime( 8998): java.lang.NumberFormatException: Invalid int: "" E/AndroidRuntime( 8998): at java.lang.Integer.invalidInt(Integer.java:138) E/AndroidRuntime( 8998): at java.lang.Integer.parseInt(Integer.java:358) E/AndroidRuntime( 8998): at java.lang.Integer.parseInt(Integer.java:334) E/AndroidRuntime( 8998): at au.com.codeka.warworlds.model.MyEmpire$1.onComplete(MyEmpire.java:87) E/AndroidRuntime( 8998): at au.com.codeka.warworlds.model.MyEmpire$1.onComplete(MyEmpire.java:48) E/AndroidRuntime( 8998): at au.com.codeka.BackgroundRunner$InternalHandler.handleMessage(BackgroundRunner.java:12 3) E/AndroidRuntime( 8998): at android.os.Handler.dispatchMessage(Handler.java:102) E/AndroidRuntime( 8998): at android.os.Looper.loop(Looper.java:135) E/AndroidRuntime( 8998): at android.app.ActivityThread.main(ActivityThread.java:5430) E/AndroidRuntime( 8998): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime( 8998): at java.lang.reflect.Method.invoke(Method.java:372) E/AndroidRuntime( 8998): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:913) E/AndroidRuntime( 8998): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:706) W/ActivityManager( 1141): Force finishing activity 1 au.com.codeka.warworlds/.game.solarsystem.SolarSystemActivity