Developer In NeedGeneral


Last Updated:

  1. donster

    donster Member This Topic's Starter

    Joined:
    Nov 18, 2009
    Messages:
    6
    Likes Received:
    0
    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
     

    Advertisement
  2. trick202

    trick202 Well-Known Member

    Joined:
    Aug 26, 2009
    Messages:
    949
    Likes Received:
    49
    Come on guys!

    These fellas are the lifeblood of our platform...........can we help him out?
     
  3. chibucks

    chibucks Well-Known Member

    Joined:
    Nov 3, 2009
    Messages:
    412
    Likes Received:
    48
    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.
     
  4. donster

    donster Member This Topic's Starter

    Joined:
    Nov 18, 2009
    Messages:
    6
    Likes Received:
    0
    Hi Guys,
    Cheers for the offers so far! I hate to look a gift horse in the mouth, but if possible I'd prefer for someone with experience developing on the samsung moment to do the debugging. Apparently it may not be the easiest phone to debug on (http://androidforums.com/samsung-moment/13477-samsung-moment-debog-mode-usb-driver.html), so I'd don't know how successful it would be for me to try to walk someone through it.

    Best Regards,
    Donster
     
  5. hokansoc

    hokansoc New Member

    Joined:
    Nov 8, 2009
    Messages:
    2
    Likes Received:
    0
    Which program is this? I'd be glad to grab the logcat for you.
     
  6. donster

    donster Member This Topic's Starter

    Joined:
    Nov 18, 2009
    Messages:
    6
    Likes Received:
    0
    Hi All,
    hokansoc was able to run my app on his Moment and capture the logcat. I've now solved the issue.
    Thanks once again!
    Don
     
  7. noonehereyet

    noonehereyet No One... VIP Member

    Joined:
    Nov 23, 2008
    Messages:
    3,121
    Likes Received:
    78
    Can i ask what the issue was? so that other devs reading this can avoid the issue in the future?
     
  8. donster

    donster Member This Topic's Starter

    Joined:
    Nov 18, 2009
    Messages:
    6
    Likes Received:
    0
    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 (Text):
    1.  
    2. public class AttackView extends MmlActivity implements SeekBar.OnSeekBarChangeListener{
    3. ...
    4. private SeekBar severitySeekBar;
    5. private Attack attack;
    6.  
    7. public void onCreate(Bundle savedInstanceState)
    8. {
    9.     ....
    10.     this.initControls();
    11.     //Instantiate attack object
    12.     ....
    13. }
    14.  
    15.  
    16. initControls()
    17. {
    18.     //Do lots of ui init stuff
    19.     ...
    20.     this.severitySeekBar = (SeekBar) findViewById(R.id.severitySeekBar);
    21.     this.severitySeekBar.setOnSeekBarChangeListener(this);
    22.     this.severitySeekBar.setProgress(MmlDbAdapter.DEFAULT_ATT_SEVERITY);
    23. }
    24.  
    25.  
    26. public void onProgressChanged(SeekBar seekBar, int progress, boolean fromTouch)
    27. {
    28.     setSeverityText(progress);
    29.     attack.setSeverity(progress); <- This is where the exception was occurring!
    30. }
    31.  
    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
     

Share This Page

Loading...