Installing widget causes afb-service homescreen to crash
Fixed
Description
Environment
None
Attachments
1
- 19 Nov 2020, 04:25 PM
Activity
Show:
Walt Miner December 22, 2020 at 7:36 PM
Walt Miner
December 22, 2020 at 7:36 PM
Close for KK M1
Marius Vlad December 14, 2020 at 10:14 AM
Marius Vlad
December 14, 2020 at 10:14 AM
I believe this has been fixed a while ago. Fix should be in master.
Marius Vlad November 24, 2020 at 12:05 PM
Marius Vlad
November 24, 2020 at 12:05 PM
@jose bollo thanks for taking a look. Who's exactly giving you 403? Is it gerrit when trying to push a MR?
^^ @Jan-Simon Moeller
jose bollo November 24, 2020 at 10:24 AM(edited)
jose bollo
November 24, 2020 at 10:24 AM
(edited)
I tried to send the following change that solves but got 403 error
commit 157fd7911d9860c73033cfc51feb3ed40900e2d2 (HEAD -> master)
Author: José Bollo <jose.bollo@iot.bzh>
Date: Tue Nov 24 11:19:41 2020 +0100
Fix crashes
The used json_object where released 2 times, leading
to crashes on install/uninstall.
Bug-AGL: SPEC-3694
Bug-AGL: SPEC-3693
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
diff --git a/src/hs-appinfo.cpp b/src/hs-appinfo.cpp
index 9ccd660..d4559d4 100644
— a/src/hs-appinfo.cpp
+++ b/src/hs-appinfo.cpp
@@ -248,7 +248,7 @@ int HS_AppInfo::updateAppDetailList(afb_api_t api, struct json_object *object)
return 1;
}
addAppDetail(j_found);
- pushAppListChangedEvent(_keyInstall, j_found);
+ pushAppListChangedEvent(_keyInstall, json_object_get(j_found));
}
else \{ AFB_ERROR("get runnalbes failed."); @@ -261,7 +261,7 @@ int HS_AppInfo::updateAppDetailList(afb_api_t api, struct json_object *object) AFB_INFO("uninstalled application isn't in runnables list, appid=%s.", appid.c_str()); return 1; }
- pushAppListChangedEvent(_keyUninstall, obj_data);
+ pushAppListChangedEvent(_keyUninstall, json_object_get(obj_data));
removeAppDetail(appid);
}
else \{ @@ -513,4 +513,4 @@ std::string HS_AppInfo::getAppProperty(const std::string appid, std::string key) value = it->second.getProperty(key); }
return value;
-}
\ No newline at end of file
+}
jose bollo November 20, 2020 at 2:28 PM
jose bollo
November 20, 2020 at 2:28 PM
time? no. Did something changed in jsonc? i don't think so. neither the binder. I guess it will be easy for you to check if what I suggest improves or not.
Details
Details
Assignee
Marius Vlad
Marius VladReporter
Marius Vlad
Marius VladFix versions
Labels
Priority
Created November 19, 2020 at 12:06 PM
Updated December 22, 2020 at 7:36 PM
Resolved December 14, 2020 at 10:14 AM
Like the uninstall one, this seem to be caused by something into json-c. IDK what change to cause this issue but it affects the CI. Installation succeeds but we end up with a failure due to this:
Nov 19 12:01:46 qemux86-64 afbd-homescreen[944]: WebSocket Text Received: "[5,\"afm-main/application-list-changed\",{\"event\":\"afm-main/application-list-changed\",\"data\":{\"event\":\"afm-main/application-list-changed\",\"data\":{\"operation\":\"install\",\"data\":\"waltham-receiver\"},\"jtype\":\"afb-event\"},\"jtype\":\"afb-event\"}]" Nov 19 12:01:46 qemux86-64 afbd-homescreen[944]: MasterVolume::onClientEventReceived[ "afm-main/application-list-changed" ]: QJsonValue(object, QJsonObject({"data":{"data":"waltham-receiver","operation":"install"},"event":"afm-main/application-list-changed","jtype":"afb-event"})) Nov 19 12:01:46 qemux86-64 afbd-agl-service-homescreen[923]: INFO: [API homescreen] synchronous call, error=(null), info=(null). [/usr/src/debug/agl-service-homescreen/git-r0/git/src/hs-proxy.cpp:104,api_call_sync] Nov 19 12:01:46 qemux86-64 afbd-agl-service-homescreen[923]: INFO: [API homescreen] called, event=application-list-changed. [/usr/src/debug/agl-service-homescreen/git-r0/git/src/hs-client.cpp:484,pushEvent] Nov 19 12:01:46 qemux86-64 afbd-agl-service-homescreen[923]: ERROR: ALERT! signal 11 received: Segmentation fault [/usr/src/debug/af-binder/master+gitAUTOINC+1b6249810b-r0/git/src/sig-monitor.c:362,on_signal_error] Nov 19 12:01:46 qemux86-64 afbd-agl-service-homescreen[923]: ERROR: BACKTRACE due to signal Segmentation fault/11: Nov 19 12:01:46 qemux86-64 afbd-agl-service-homescreen[923]: [1/13] /usr/lib/libjson-c.so.4(+0x5745) [0x7fa8223ba745] Nov 19 12:01:46 qemux86-64 afbd-agl-service-homescreen[923]: [2/13] /usr/lib/libjson-c.so.4(json_object_to_json_string_length+0x3b) [0x7fa8223ba54b] Nov 19 12:01:46 qemux86-64 afbd-agl-service-homescreen[923]: [3/13] afbd-agl-service-homescreen(+0x3e874) [0x55de4d941874] Nov 19 12:01:46 qemux86-64 afbd-agl-service-homescreen[923]: [4/13] afbd-agl-service-homescreen(+0x3eb68) [0x55de4d941b68] Nov 19 12:01:46 qemux86-64 afbd-agl-service-homescreen[923]: [5/13] afbd-agl-service-homescreen(+0x2d08d) [0x55de4d93008d] Nov 19 12:01:46 qemux86-64 afbd-agl-service-homescreen[923]: [6/13] afbd-agl-service-homescreen(+0x3dd5f) [0x55de4d940d5f] Nov 19 12:01:46 qemux86-64 afbd-agl-service-homescreen[923]: [7/13] afbd-agl-service-homescreen(+0x379de) [0x55de4d93a9de] Nov 19 12:01:46 qemux86-64 afbd-agl-service-homescreen[923]: [8/13] afbd-agl-service-homescreen(+0x35601) [0x55de4d938601] Nov 19 12:01:46 qemux86-64 afbd-agl-service-homescreen[923]: [9/13] afbd-agl-service-homescreen(+0x3582f) [0x55de4d93882f] Nov 19 12:01:46 qemux86-64 afbd-agl-service-homescreen[923]: [10/13] afbd-agl-service-homescreen(jobs_start+0x16e) [0x55de4d93935e] Nov 19 12:01:46 qemux86-64 afbd-agl-service-homescreen[923]: [11/13] afbd-agl-service-homescreen(main+0x1fb) [0x55de4d91712b] Nov 19 12:01:46 qemux86-64 afbd-agl-service-homescreen[923]: [12/13] /lib/libc.so.6(__libc_start_main+0xeb) [0x7fa821e37cdb] Nov 19 12:01:46 qemux86-64 afbd-agl-service-homescreen[923]: [13/13] afbd-agl-service-homescreen(_start+0x2a) [0x55de4d91740a] Nov 19 12:01:46 qemux86-64 afbd-agl-service-homescreen[923]: [/usr/src/debug/af-binder/master+gitAUTOINC+1b6249810b-r0/git/src/sig-monitor.c:103,dumpstack]
/cc @Scott Murray @Jan-Simon Moeller