You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Probably picture will be worth more than hundred words so I'm attaching:
The issue I'm reporting here is not SPI itself related only the GUI part which gets broken in this specific case.
Namely the string Vendor id: 0x20 which should got split into two lines:
Vendor id:
0x20
Actually get splits into 3 lines:
Vendor
i-
d: 0x20
So I'm betting it somehow related to multiline splitting or just memory corruption.
The code printing it is:
I've tried to dig into the code and guessing that this is something related to:
function elements_multiline_text_aligned and its subsequent call to: size_t chars_fit = elements_get_max_chars_to_fit(canvas, horizontal, start, x); and line = furi_string_alloc_printf("%.*s-\n", chars_fit, start); where the dash char is added. But I'm unable to quickly determine if this is bug in flipper GUI logic or in the way fapp is using those GUI calls.
The text was updated successfully, but these errors were encountered:
Yes, I've realized that in the middle of writing avove with function widget_add_string_multiline_element being good starting candidate. Maybe someone familiar with how this overflow is supposed to work can point to specific logic which might be te cause here.
Probably picture will be worth more than hundred words so I'm attaching:
![obraz](https://private-user-images.githubusercontent.com/4950101/311505267-c950ebfa-71a9-4457-84e9-a93b26b7801e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQwMzAwOTIsIm5iZiI6MTcyNDAyOTc5MiwicGF0aCI6Ii80OTUwMTAxLzMxMTUwNTI2Ny1jOTUwZWJmYS03MWE5LTQ0NTctODRlOS1hOTNiMjZiNzgwMWUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgxOSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MTlUMDEwOTUyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ODk2ZDAwYmQxN2M3Y2U0ZThkMzYxOGQ0NDY4NTAxNTY4NjQ0NDQ1Yjk5MTFlY2MwMDQ5MDQwMWU2YTM2OGUwZSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.EUEvhIUpRtaEittigkmN82Px7Z6c9TpxvYFx3jTs3KE)
The issue I'm reporting here is not SPI itself related only the GUI part which gets broken in this specific case.
Namely the string
Vendor id: 0x20
which should got split into two lines:Vendor id:
0x20
Actually get splits into 3 lines:
Vendor
i-
d: 0x20
So I'm betting it somehow related to multiline splitting or just memory corruption.
The code printing it is:
I've tried to dig into the code and guessing that this is something related to:
function
elements_multiline_text_aligned
and its subsequent call to:size_t chars_fit = elements_get_max_chars_to_fit(canvas, horizontal, start, x);
andline = furi_string_alloc_printf("%.*s-\n", chars_fit, start);
where the dash char is added. But I'm unable to quickly determine if this is bug in flipper GUI logic or in the way fapp is using those GUI calls.The text was updated successfully, but these errors were encountered: