Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6710443
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:01:25+00:00 2026-05-26T08:01:25+00:00

One of my users has reported an error, this is the stack trace: java.lang.RuntimeException:

  • 0

One of my users has reported an error, this is the stack trace:

java.lang.RuntimeException: Unable to start service com.metatroid.minimal.weather.MinimalWeatherService@3082c088 with Intent { act=update dat=minimalweather://widget/id/295#update295 cmp=com.metatroid.minimal.weather/.MinimalWeatherService (has extras) }: java.lang.NumberFormatException: 
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3063)
at android.app.ActivityThread.access$3600(ActivityThread.java:125)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2096)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:878)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:636)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NumberFormatException: 
at org.apache.harmony.luni.util.FloatingPointParser.parseFloat(FloatingPointParser.java:305)
at java.lang.Float.parseFloat(Float.java:291)
at java.lang.Float.valueOf(Float.java:330)
at com.metatroid.minimal.weather.MinimalWeatherService.onStartCommand(MinimalWeatherService.java:104)
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3053)

Line 104 is remoteView.setFloat(R.id.dateText, "setTextSize", Float.valueOf(dst.trim()).floatValue());

Where ‘dst’ is

SharedPreferences prefs = getApplicationContext().getSharedPreferences("prefs", 0);
String dst = prefs.getString("dsize", "10");

Which is set from a configure activity with:

SharedPreferences prefs = self.getSharedPreferences("prefs", 0);
SharedPreferences.Editor edit = prefs.edit();
EditText ds = (EditText) findViewById(R.id.dateSize);
String dsv = ds.getText().toString().trim();
edit.putString("dsize", dsv);
edit.commit();
finish();

And R.id.dateSize refers to:

<EditText android:id="@+id/dateSize"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:numeric="decimal"
    android:maxLength="2"/>

I don’t see how the user was able to input anything other than a decimal, or how this error might happen. Any ideas? Is there something wrong with the above code?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T08:01:26+00:00Added an answer on May 26, 2026 at 8:01 am

    I think you might have parsed an empty String.

    String dsv = ds.getText().toString().trim();
    if(!dsv.equals(""))
        edit.putString("dsize", dsv); 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

One and only one of my hundreds of users has trouble starting my Java
One of my users has an HP Pavilion DV4-1430us laptop running Windows Vista Professional
I have a messageboard and one of my users has written a greasemonkey script
Let me start off with a bit of background. This morning one of our
This one has me rather confused. I've written a query which runs fine from
One of the users of a Java swing GUI program that I wrote is
Despite this being one of the best error messages I've ever seen (second only
One of my users is having this weird problem that I cannot seem to
A user has sent me some information that they posted to one of my
Has anyone used delegates with exchnage web services? I would like one user to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.