The error of the report is not the same as the original exception, can only read the Oom memory overflow, error code as follows:
Private voidgetpersons () {String path= "Content://com.lss.readcontactmassage.persondbprovider/query"; Uri URI=uri.parse (path); Contentresolver Contentresolver=Getcontentresolver (); Cursor Cursor= Contentresolver.query (URI,NULL,NULL,NULL,NULL); Persons=NewArraylist<person>(); if(cursor==NULL){ return; } while(cursor.movetolast ()) {intid = cursor.getint (cursor.getcolumnindex ("id"))); String name= Cursor.getstring (Cursor.getcolumnindex ("name")); String Number= Cursor.getstring (Cursor.getcolumnindex ("number")); Person Person=NewPerson (ID, name, number); Persons.add (person); } cursor.close (); }
While constitutes a dead loop, so the memory overflow, this unusual error encountered when not panic, learn to use debug, break point to find errors.
Android Fool small Error