Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'AppIconsFolderMaxSize' in smartDeviceLink.ini cannot be configured to be less than 100MB #2206

Closed
shoamano83 opened this issue May 23, 2018 · 2 comments
Labels
Projects

Comments

@shoamano83
Copy link
Contributor

shoamano83 commented May 23, 2018

Bug Report

The minimum value of AppIconsFolderMaxSize is hard-coded to kDefaultAppIconsFolderMaxSize, which is 100MB. OEMs cannot make this value smaller than 100MB without customizing SDL Core's code.

Reference: https://github.com/smartdevicelink/sdl_core/blob/develop/src/components/config_profile/src/profile.cc#L1077-L1079

Reproduction Steps
  1. Update smartDeviceLink.ini file to:
  • set a dedicated folder for AppIconsFolder e.g. "icons"
  • set 10240 for AppIconsFolderMaxSize i.e. 10KB
  1. Create "icons" folder and create a dummy file of 20KB in it:
$ mkdir icons
$ dd if=/dev/zero of=icons/dummyfile count=20 bs=1024
  1. Run ./start.sh
  2. Launch sdl_hmi
  3. Using sdl_ios' example app, connect the app to Core through TCP transport
  4. Make the app in FULL level
Expected Behavior

The dummy file in "icons" folder should be removed as it exceeds the size specified by AppIconFolderMaxSize.

Observed Behavior

The dummy file is not removed.

$ ls -l icons/
合計 24
-rw-rw-r-- 1 samano samano  3906  5月 22 18:15 9999
-rw-rw-r-- 1 samano samano 20480  5月 22 18:13 dummyfile

Note: if I create a dummy file larger than 100MB in step 2, then the file is removed.

OS & Version Information
  • OS/Version: Ubuntu 16.04 (amd64)
  • SDL Core Version: commit 65c1e7e from develop branch
  • Testing Against: sdl_hmi (commit 18460356c02e985df598b94f5a6bdbba1c451fff from master), example app of sdl_ios release 5.2.0 on iPhone X (iOS 11.3 beta)
Test Case, Sample Code, and / or Example App

Log: SmartDeviceLinkCore.zip
smartDeviceLink.ini: smartDeviceLink_ini.zip

@shoamano83
Copy link
Contributor Author

shoamano83 commented May 23, 2018

Looking at the commit 5b58bf9 I think this is an intended behavior. However, I question the reason of adding such minimum value.

  • Why is such minimum value necessary?
  • Why was 100MB chosen for the minimum value? (Usually an icon file is a few KB in size, so we are unlikely to hit the total size of 100MB.)
  • If such minimum value is really necessary, then IMHO the document and/or the ini file should have clear description that OEMs are required to reserve 100MB or more for the icon storage.

My concern is that 100MB of storage may not be available on some embedded systems which have limited disk storage. I think OEMs should be able to choose smaller size of AppIconsFolder to support broader systems without modifying the code.

Note: a workaround for such systems is to configure AppIconsAmountToRemove to zero, so that SDL Core will not store any icon files to the folder.
https://github.com/smartdevicelink/sdl_core/blob/develop/src/components/application_manager/src/commands/mobile/set_app_icon_request.cc#L159-L164

@jacobkeeler
Copy link
Contributor

Closed via #3756

@theresalech theresalech moved this from In Review to Completed Bug Fixes/ Enhancements in 8.0.0 Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
8.0.0
Completed Bug Fixes / Enhancements
Development

No branches or pull requests

3 participants