apps crashes when navigating in it
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
openerp-mobile |
New
|
Undecided
|
Unassigned |
Bug Description
I downloaded an apps with a fixed synchronization error from http://
I adapted the leads for our database. The apps crashes in these cases:
1) When I choose to display the leads list second time it crashes on this line in Lead.java:
OEDataRow row = (OEDataRow) mLeadItems.
Logcat shows that position is 0 and size of mLeadItems is 0.
I added a check: if (mLeadsItems.
This allows to display leads list more times.
After this I noticed more cases when the apps crashed:
2) The apps crashes on navigating with back button( the logcat writes that "fragment is already set");
3)The apps crashes when the orientation of a device is changed from landscape to portrait or vice versa.
I analyzed crashes of type 3 and noticed that some classes derived from BaseFragment(eg. AboutFragment) onDestroy( ); main(). getActionBar( ).setDisplayHom eAsUpEnabled( true); main(). getActionBar( ).setHomeButton Enabled( true); main(). getActionBar( ).setDisplayHom eAsUpEnabled( true); main(). getActionBar( ).setHomeButton Enabled( true);
have code:
public void onDestroy() {
super.
scope.
scope.
}
and some have code:
public void onStop() {
{
super.onStop();
scope.
scope.
}
Crashes sometimes happen in the classes with onDestroy() method( null pointer exception).
I have a question: When a class must have code in the method onDestroy() and when in the method onStop()?