Add more logs to find the cause of no scim-helper-launcher 16/49716/1
authorSungmin Kwak <sungmin.kwak@samsung.com>
Wed, 23 Sep 2015 14:04:24 +0000 (23:04 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Mon, 19 Oct 2015 11:45:36 +0000 (20:45 +0900)
Change-Id: Iecd3d480bfafaac8cf080baa59df012c93c9085f

ism/extras/efl_panel/isf_panel_efl.cpp
ism/src/isf_pkg.cpp
ism/src/isf_query_utility.cpp
ism/src/scim.cpp
ism/src/scim_launcher.cpp
ism/src/scim_utility.cpp

index e0bad5c..84bf510 100644 (file)
@@ -4014,10 +4014,12 @@ static bool update_ise_list (std::vector<String> &list)
                 LOGD("package_manager_set_event_cb succeeded.");
             }
             else {
+                ISF_SAVE_LOG("package_manager_set_event_cb failed(%d)\n", ret);
                 LOGW("package_manager_set_event_cb failed(%d)", ret);
             }
         }
         else {
+            ISF_SAVE_LOG("package_manager_create failed(%d)\n", ret);
             LOGW("package_manager_create failed(%d)", ret);
         }
     }
index aaaaa72..94561da 100644 (file)
@@ -73,6 +73,7 @@ int isf_pkg_ime_app_list_cb (const pkgmgrinfo_appinfo_h handle, void *user_data)
     if (ret == PMINFO_R_OK)
         ime_db.appid = String (appid ? appid : "");
     else {
+        ISF_SAVE_LOG ("appid is not available!\n");
         LOGW ("appid is not available!");
         return 0;
     }
@@ -84,6 +85,7 @@ int isf_pkg_ime_app_list_cb (const pkgmgrinfo_appinfo_h handle, void *user_data)
     if (ret == PMINFO_R_OK)
         ime_db.pkgid = String (pkgid ? pkgid : "");
     else {
+        ISF_SAVE_LOG ("pkgid is not available!\n");
         LOGW ("pkgid is not available!");
         return 0;
     }
@@ -93,6 +95,7 @@ int isf_pkg_ime_app_list_cb (const pkgmgrinfo_appinfo_h handle, void *user_data)
     if (ret == PMINFO_R_OK)
         ime_db.exec = String (exec ? exec : "");
     else {
+        ISF_SAVE_LOG ("exec is not available!\n");
         LOGW ("exec is not available!");
         return 0;
     }
@@ -236,8 +239,14 @@ void isf_pkg_reload_ime_info_db(void)
         if (ret == PMINFO_R_OK) {
             ret = pkgmgrinfo_appinfo_filter_foreach_appinfo (handle, isf_pkg_ime_app_list_cb, NULL);
         }
+        else {
+            ISF_SAVE_LOG ("pkgmgrinfo_appinfo_filter_add_string failed(%d)\n", ret);
+        }
         pkgmgrinfo_appinfo_filter_destroy (handle);
     }
+    else {
+        ISF_SAVE_LOG ("pkgmgrinfo_appinfo_filter_create failed(%d)\n", ret);
+    }
 }
 
 /**
index 281c15d..c9fc4b7 100644 (file)
@@ -901,6 +901,7 @@ static int _db_update_ime_info(ImeInfoDB *ime_db)
 
     ret = sqlite3_prepare_v2(databaseInfo.pHandle, pQuery, -1, &pStmt, NULL);
     if (ret != SQLITE_OK) {
+        ISF_SAVE_LOG("sqlite3_prepare_v2: %s\n", sqlite3_errmsg(databaseInfo.pHandle));
         LOGE("sqlite3_prepare_v2: %s", sqlite3_errmsg(databaseInfo.pHandle));
         return i;
     }
@@ -950,6 +951,7 @@ static int _db_update_ime_info(ImeInfoDB *ime_db)
 
     ret = sqlite3_step(pStmt);
     if (ret != SQLITE_DONE) {
+        ISF_SAVE_LOG("sqlite3_step returned %d, appid=%s, %s\n", ret, ime_db->appid.c_str(), sqlite3_errmsg(databaseInfo.pHandle));
         LOGW("sqlite3_step returned %d, appid=%s, %s", ret, ime_db->appid.c_str(), sqlite3_errmsg(databaseInfo.pHandle));
         ret = SQLITE_ERROR;
         goto out;
@@ -993,6 +995,7 @@ static int _db_insert_ime_info(ImeInfoDB *ime_db)
 
     ret = sqlite3_prepare_v2(databaseInfo.pHandle, pQuery, -1, &pStmt, NULL);
     if (ret != SQLITE_OK) {
+        ISF_SAVE_LOG("sqlite3_prepare_v2: %s\n", sqlite3_errmsg(databaseInfo.pHandle));
         LOGE("sqlite3_prepare_v2: %s", sqlite3_errmsg(databaseInfo.pHandle));
         return i;
     }
@@ -1552,8 +1555,9 @@ EXAPI int isf_db_insert_ime_info(ImeInfoDB *ime_db)
         ret = _db_insert_ime_info(ime_db);
         _db_disconnect();
     }
-    else
-        LOGW("failed");
+    else {
+        ISF_SAVE_LOG("_db_connect() failed\n");
+    }
 
     return ret;
 }
index 21b30c7..5c7b275 100644 (file)
@@ -274,6 +274,12 @@ int main (int argc, char *argv [])
         load_engine_list.push_back (*it);
     }
 
+    /* Unless the target is no-keyboard model, we have a problem. */
+    if (load_engine_list.size () < 1) {
+        LOGW ("*** There is no helper/imeengine!");
+        ISF_SAVE_LOG ("*** There is no helper/imeengine!\n");
+    }
+
     /* Use x11 FrontEnd as default if available. */
     if (frontend_list.size ()) {
         def_frontend = String ("x11");
index ad7d4fe..3176797 100644 (file)
@@ -184,6 +184,11 @@ int main (int argc, char *argv [])
                 for (it = helper_list.begin (); it != helper_list.end (); it++)
                     engine_list.push_back (*it);
 
+                /* Unless the target is no-keyboard model, we have a problem. */
+                if (engine_list.size () < 1) {
+                    ISF_SAVE_LOG ("*** There is no helper/imeengine!\n");
+                }
+
                 list = scim_combine_string_list(engine_list, ',');
                 if (list.length () < 1)
                     new_argv [new_argc ++] = argv [i];
index 3e09df8..65d63c5 100644 (file)
@@ -1384,7 +1384,7 @@ EXAPI void isf_save_log (const char *fmt, ...)
     vsnprintf (buf, sizeof (buf), fmt, ap);
     va_end (ap);
 
-    const int MAX_LOG_FILE_SIZE = 12 * 1024; /* 12KB */
+    const int MAX_LOG_FILE_SIZE = 16 * 1024; /* 16KB */
 
     static bool size_exceeded = false;
     static struct stat st;