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

TestApp: Remove Field.METADATA from "casual" queries - only use it to set the DataType #24

Closed
wba2hi opened this issue Oct 19, 2023 · 0 comments · Fixed by #59
Closed

Comments

@wba2hi
Copy link
Contributor

wba2hi commented Oct 19, 2023

Describe the bug
When fetching the VssPath Property (non-specification) Vehicle with Field.VALUE and Field.METADATA a result with 270_000 characters is returned. This is to much to put into the log, which will simply crash because it can not provide the corresponding height. To fix the crash a workaround was implemented, which truncates to long textes (see: OutputViewModel#sanitizeString). If Field.METADATA is removed it's roughly 80k which should easily be representable inside the ScrollView of the Log Output.

We should try to fix the root cause here and remove the truncation logic if feasible.

Instead of sending a single query with Field.METADATA and Field.VALUE maybe two queries should be send, one to set the datatype (which uses Field.METADATA) of the field and one to fetch and log the value.

To Reproduce
Steps to reproduce the behavior:

  1. Remove Sanitization Logic in OutputViewModel (e.g. return text)
  2. Connect to DataBroker
  3. Get "Vehicle"
  4. Crash

Expected behavior
4. No Crash, Output is logged into Output View

wba2hi added a commit to boschglobal/kuksa-android-sdk that referenced this issue Dec 6, 2023
Closes: eclipse-kuksa#24
Signed-off-by: Andre Weber <andre.weber3@etas.com>
wba2hi added a commit to boschglobal/kuksa-android-sdk that referenced this issue Dec 6, 2023
Closes: eclipse-kuksa#24
Signed-off-by: Andre Weber <andre.weber3@etas.com>
wba2hi added a commit to boschglobal/kuksa-android-sdk that referenced this issue Dec 6, 2023
Splitting up fetching the FIELD_TYPE and fetching the actual
query from the user into two separate ones.
Unfortunately this did not fix the crash when logging vehicle
because the json contained to many lineBreaks ("\n").

Closes: eclipse-kuksa#24
Signed-off-by: Andre Weber <andre.weber3@etas.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant