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

Bugfix: crash when using tjpegd and LVGL #21544

Merged
merged 2 commits into from
Jun 2, 2024
Merged

Conversation

Staars
Copy link
Contributor

@Staars Staars commented Jun 2, 2024

Description:

Tasmotas Arduino framework does include tjpegd in ROM and it clashes with the externally added library.
The external library would be compiled in with LVGL activated in the build environment and lead to repeatable crashes when accessing functions of tjpegd in other code parts.
This will also shrink the firmware binary in these cases.

Checklist:

  • The pull request is done against the latest development branch
  • Only relevant files were touched
  • Only one feature/fix was added per PR and the code change compiles without warnings
  • The code change is tested and works with Tasmota core ESP8266 V.2.7.6
  • The code change is tested and works with Tasmota core ESP32 V.3.0.0
  • I accept the CLA.

NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass

@arendst arendst merged commit 979dd86 into arendst:development Jun 2, 2024
59 checks passed
@s-hadinger
Copy link
Collaborator

Thanks. We need to keep track of this change otherwise it will be overwritten by the next LVGL update. Do you think of any other option in librariy.json to achieve the same result without changing source code ?

@Staars
Copy link
Contributor Author

Staars commented Jun 2, 2024

Maybe …
I am not sure, if there is guaranteed flag in the Arduino framework.

ESP_ROM_HAS_JPEG_DECODE Could be a candidate.

if this works, the best way would be to use this instead and upstream the change to LVGL.

@s-hadinger
Copy link
Collaborator

I was thinking about adding in library.json of LVGL:

[...]
	"build": {
		"includeDir": ".",
		"flags": [ "-I$PROJECT_DIR/tasmota/lvgl_berry" ],
                 "srcFilter": ["-<libs/tjpgd/**>"]
	},
[...]

I haven't tested at all, but that was the spirit of removing a directory from the build chain.

@Jason2866
Copy link
Collaborator

Jason2866 added a commit to Jason2866/Tasmota that referenced this pull request Jun 5, 2024
* Berry coc parser keeps order of variables (arendst#21542)

* Bugfix: crash when using tjpegd and LVGL (arendst#21544)

* prevent crashes when using tjpegd in other places in Tasmota

* do not use external tjpegd in Tasmota

* Update changelogs

* SML: Allow larger offset when using x to ignore bytes (arendst#21535)

* Allow larger offset when using x to ignore bytes

STW Klagenfurt sends 355 bytes, and the interesting values starts somewhere at position 304. Therefor we need to set a larger uint range to allow more than 255 bytes to ignore.

* Update xsns_53_sml.ino

---------

Co-authored-by: Theo Arends <11044339+arendst@users.noreply.github.com>

* Change GPIOViewer from v1.5.3 to v1.5.4 (No functional change)

* Fix GPIO16 as Transmit enable pin (arendst#21269)

* Support Levoit Core200s (WIP, Feedback requested) (arendst#21502)

* Support Levoit Core 200S

Add berry script to support Levoit Core 200S (and possibly other too
since levoit offers multiple similar devices)

* Core200S: fix comments

* forgotten safety check (arendst#21549)

* Bump v14.1.0.1

* Berry bytes solidification (arendst#21558)

* Berry prepare for bytes() solidification

* Berry solidification of bytes objects

* Berry solidification of `bytes` instances

* Matter support for Air Quality sensors (arendst#21559)

* Add default value for `SetOption151` (arendst#21560)

* Update changelogs

* Remove GPIO_I2S_BCLK_IN,  GPIO_I2S_WS_IN

* add uTouch settings

* uTouch for m5core2

* Berry `input()` returns empty string and does not crash (arendst#21565)

---------

Co-authored-by: s-hadinger <49731213+s-hadinger@users.noreply.github.com>
Co-authored-by: Christian Baars <baars@klinikum-brandenburg.de>
Co-authored-by: Theo Arends <11044339+arendst@users.noreply.github.com>
Co-authored-by: Andreas Doppelhofer <andreas.doppelhofer@gmx.at>
Co-authored-by: blenk92 <30472652+blenk92@users.noreply.github.com>
Co-authored-by: Christian Baars <Baars@gmx.de>
Co-authored-by: Jason2866 <24528715+Jason2866@users.noreply.github.com>
@Staars Staars deleted the patch-8 branch June 16, 2024 16:42
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 this pull request may close these issues.

None yet

4 participants