• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Developer In Need

donster

Lurker
Hello All,
I develop an application for the Android market and have run into a problem.
A customer (who has a samsung moment) has reported that the app crashes when opening a particular activity. I haven't been able to reproduce the issue and have tested my app on the following devices:
HTC Droid
HTC Magic
HTC Tattoo
HTC Hero
I've also tested the application extensively on the simulators, with no problems.

Due to the nature of the issue and the fact that other developers have had issues with their apps not working 100% on the Samsung Moment, it looks like the issue is specific to that device.

So, I'm hoping there is a helpful developer here who has a Samsung Moment and would be willing to test my application on their device with logcat running & capturing the exact details of the application crash.

If there is someone who could help me, I would be very grateful if you could send me a PM.

Cheers,
Donster
 
sorry... i have little / no knowledge on developing... i did post this link to a couple other forums that have more developers... so hopefully donster will hear back.
 
The cause of the application crash was a null pointer exception bug on a data storage class when a particular activity was opened. It was very easy to reproduce and occurred every time that activity was opened on a Samsung Moment device. I don't fully understand why the bug did not appear on any other devices.

Here is a extract from the activity class:
Code:
public class AttackView extends MmlActivity implements SeekBar.OnSeekBarChangeListener{
...
private SeekBar severitySeekBar;
private Attack attack;

public void onCreate(Bundle savedInstanceState)
{
    ....
    this.initControls();
    //Instantiate attack object
    ....
}


initControls()
{
    //Do lots of ui init stuff
    ...
    this.severitySeekBar = (SeekBar) findViewById(R.id.severitySeekBar);
    this.severitySeekBar.setOnSeekBarChangeListener(this);
    this.severitySeekBar.setProgress(MmlDbAdapter.DEFAULT_ATT_SEVERITY);
}


public void onProgressChanged(SeekBar seekBar, int progress, boolean fromTouch)
{
    setSeverityText(progress);
    attack.setSeverity(progress); <- This is where the exception was occurring!
}
As I have pointed out in the code, the exception occurs in the onProgressChanged() method. This is because initControls has not fully completed and the attack instantiated.
It looks like on the Samsung Moment, onProgressChanged() is being executed before onCreate completes and on other devices (and the simulators) it is being executed after! This really doesn't make much sense!

Anyway, i was able to tidy up the code and remove the bug. But still, there really should be no differences like this on various android devices (unless they are at diffenet firmware versions, of course).

Don
 
Back
Top Bottom