{"action":"closed","issue":{"url":"https://api.github.com/repos/j256/ormlite-android/issues/15","repository_url":"https://api.github.com/repos/j256/ormlite-android","labels_url":"https://api.github.com/repos/j256/ormlite-android/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/j256/ormlite-android/issues/15/comments","events_url":"https://api.github.com/repos/j256/ormlite-android/issues/15/events","html_url":"https://github.com/j256/ormlite-android/issues/15","id":37646831,"number":15,"title":"The application may be doing too much work on its main thread","user":{"login":"smail2133","id":5464497,"avatar_url":"https://avatars.githubusercontent.com/u/5464497?v=3","gravatar_id":"","url":"https://api.github.com/users/smail2133","html_url":"https://github.com/smail2133","followers_url":"https://api.github.com/users/smail2133/followers","following_url":"https://api.github.com/users/smail2133/following{/other_user}","gists_url":"https://api.github.com/users/smail2133/gists{/gist_id}","starred_url":"https://api.github.com/users/smail2133/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smail2133/subscriptions","organizations_url":"https://api.github.com/users/smail2133/orgs","repos_url":"https://api.github.com/users/smail2133/repos","events_url":"https://api.github.com/users/smail2133/events{/privacy}","received_events_url":"https://api.github.com/users/smail2133/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2014-07-11T09:59:59Z","updated_at":"2016-05-31T23:34:36Z","closed_at":"2016-05-31T23:34:36Z","body":"Hi Grey! I received exception when update database!!\r\nHere is log:\r\n{code}\r\n00:21 I/Choreographer: Skipped 752 frames!  The application may be doing too much work on its main thread.\r\n00:21 I/dalvikvm-heap: Grow heap (frag case) to 12.850MB for 1718978-byte allocation\r\n00:21 I/dalvikvm-heap: Grow heap (frag case) to 16.058MB for 3409936-byte allocation\r\n00:21 I/TableUtils: creating table 'credit_card'\r\n00:23 I/Choreographer: Skipped 92 frames!  The application may be doing too much work on its main thread.\r\n00:23 I/dalvikvm-heap: Grow heap (frag case) to 17.823MB for 1718976-byte allocation\r\n00:24 I/TableUtils: executed create table statement changed 0 rows: CREATE TABLE IF NOT EXISTS `credit_card` (`credit_card_ccv` VARCHAR , `credit_card_address_1` VARCHAR , `credit_card_address_2` VARCHAR , `credit_card_address_city` VARCHAR , `credit_card_address_country` VARCHAR , `credit_card_address_first_name` VARCHAR , `credit_card_address_id` VARCHAR , `credit_card_address_last_name` VARCHAR , `credit_card_address_phone` VARCHAR , `credit_card_address_state` VARCHAR , `credit_card_address_zip_code` VARCHAR , `credit_card_expiration_month` VARCHAR , `credit_card_expiration_year` VARCHAR , `credit_card_full_number` VARCHAR , `credit_card_id` VARCHAR , `credit_card_last_digit` VARCHAR , `credit_card_type` VARCHAR , `credit_card_type_id` VARCHAR , `credit_card_address_uri` VARCHAR , `credit_card_name` VARCHAR , `credit_card_first_name` VARCHAR , `credit_card_user_id` VARCHAR , `credit_card_last_name` VARCHAR , `credit_card_is_saved` SMALLINT , `credit_card_is_save_required` SMALLINT , `id` INTEGER PRIMARY KEY AUTOINCREMENT ) \r\n00:30 I/Choreographer: Skipped 41 frames!  The application may be doing too much work on its main thread.\r\n00:32 I/TableUtils: creating table 'deal'\r\n{code}\r\n\r\nAnd stack:\r\n{code}\r\njava.lang.RuntimeException: An error occured while executing doInBackground()\r\n\tat android.os.AsyncTask$3.done(AsyncTask.java:299)\r\n\tat java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:352)\r\n\tat java.util.concurrent.FutureTask.setException(FutureTask.java:219)\r\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:239)\r\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)\r\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)\r\n\tat java.lang.Thread.run(Thread.java:856)\r\nCaused by: java.lang.NullPointerException\r\n\tat com.j256.ormlite.db.BaseDatabaseType.appendColumnArg(BaseDatabaseType.java:64)\r\n\tat com.j256.ormlite.table.TableUtils.addCreateTableStatements(TableUtils.java:334)\r\n\tat com.j256.ormlite.table.TableUtils.doCreateTable(TableUtils.java:439)\r\n\tat com.j256.ormlite.table.TableUtils.createTable(TableUtils.java:220)\r\n\tat com.j256.ormlite.table.TableUtils.createTableIfNotExists(TableUtils.java:61)\r\n\tat com.ls.dailysteals.core.database.DB.onCreate(DB.java:81)\r\n\tat com.ls.dailysteals.core.database.DB.onUpgrade(DB.java:138)\r\n\tat com.j256.ormlite.android.apptools.OrmLiteSqliteOpenHelper.onUpgrade(OrmLiteSqliteOpenHelper.java:240)\r\n\tat android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:257)\r\n\tat android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:164)\r\n\tat com.j256.ormlite.android.AndroidConnectionSource.getReadWriteConnection(AndroidConnectionSource.java:66)\r\n\tat com.j256.ormlite.dao.BaseDaoImpl.callBatchTasks(BaseDaoImpl.java:626)\r\n\tat com.ls.***.ui.fragment.IceMonkeyFragment$3.doInBackground(IceMonkeyFragment.java:175)\r\n\tat com.ls.***.ui.fragment.IceMonkeyFragment$3.doInBackground(IceMonkeyFragment.java:170)\r\n\tat android.os.AsyncTask$2.call(AsyncTask.java:287)\r\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:234)\r\n\t... 3 more\r\n{code}\r\n\r\n{code}\r\n@Override\r\n\tpublic void onUpgrade(SQLiteDatabase sqLiteDatabase, ConnectionSource connectionSource, int oldVer, int newVer) {\r\n\r\n\t\t// drop all tables when database version latest 4 because database structure cardinal changes.\r\n\t\tif (oldVer < DATABASE_VERSION) {\r\n\t\t\tList<String> tables = new ArrayList<String>();\r\n\t\t\tCursor cursor = sqLiteDatabase.rawQuery(\"SELECT * FROM sqlite_master WHERE type='table';\", null);\r\n\t\t\tcursor.moveToFirst();\r\n\t\t\twhile (!cursor.isAfterLast()) {\r\n\t\t\t\tString tableName = cursor.getString(1);\r\n\t\t\t\tif (!tableName.equals(\"android_metadata\") && !tableName.equals(\"sqlite_sequence\"))\r\n\t\t\t\t\ttables.add(tableName);\r\n\t\t\t\tcursor.moveToNext();\r\n\t\t\t}\r\n\t\t\tcursor.close();\r\n\r\n\t\t\tfor (String tableName : tables) {\r\n\t\t\t\tsqLiteDatabase.execSQL(\"DROP TABLE IF EXISTS \" + tableName);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tonCreate(sqLiteDatabase, connectionSource);\r\n\t}\r\n{code}"}}
{"actor":{"display_login":"j256"}}