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

fix google charts memory leak #20995

Merged
merged 1 commit into from
Mar 21, 2024
Merged

Conversation

gemu2015
Copy link
Contributor

Description:

another regression from scripter memory rework

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.2.0.14
  • I accept the CLA.

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

@arendst arendst merged commit a38e884 into arendst:development Mar 21, 2024
64 checks passed
@gemu2015 gemu2015 deleted the scripter_fix branch March 21, 2024 15:32
@rmi1974
Copy link

rmi1974 commented Mar 22, 2024

This commit now breaks building for tasmota-4M (and potentially others):

...
Processing tasmota-4M (board: esp8266_4M2M; platform: https://github.com/tasmota/platform-espressif8266/releases/download/2024.01.01/platform-espressif8266.zip; framework: arduino)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
-DCONFIG_TASMOTA_FLASHMODE_DOUT
*** use provided user_config_override.h as planned ***
*** use provided platformio_override.ini as planned ***
*** use provided platformio_tasmota_cenv.ini as planned ***
*** use provided platformio_tasmota_core3_env.ini as planned ***
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/esp8266_4M2M.html
PLATFORM: Espressif 8266 (2024.1.1) > Espressif Generic ESP8266 Tasmota 1M sketch 1M OTA 2M FS
HARDWARE: ESP8266 80MHz, 80KB RAM, 972.00KB Flash
PACKAGES: 
 - framework-arduinoespressif8266 @ 2.7.6 
 - tool-esptoolpy @ 1.40701.0+240306 (4.7.1) 
 - toolchain-xtensa @ 2.40802.200502 (4.8.2)
Converting tasmota.ino
...
Compiling .pio/build/tasmota-4M/libb84/ESP8266WiFi/ESP8266WiFiMulti.cpp.o
/home/rmi1974/projects/home-automation/Tasmota/tasmota/tasmota_xdrv_driver/xdrv_10_scripter.ino: In function 'void ScriptWebShow(char, uint8_t)':
/home/rmi1974/projects/home-automation/Tasmota/tasmota/tasmota_xdrv_driver/xdrv_10_scripter.ino:11124:21: error: 'struct SCRIPT_MEM' has no member named 'chartindex'
     glob_script_mem.chartindex = 1;
                     ^
/home/rmi1974/projects/home-automation/Tasmota/tasmota/tasmota_xdrv_driver/xdrv_10_scripter.ino:11125:21: error: 'struct SCRIPT_MEM' has no member named 'google_libs'
     glob_script_mem.google_libs = 0;
                     ^
Compiling .pio/build/tasmota-4M/libb84/ESP8266WiFi/ESP8266WiFiSTA-WPS.cpp.o
Compiling .pio/build/tasmota-4M/libb84/ESP8266WiFi/ESP8266WiFiSTA.cpp.o
Compiling .pio/build/tasmota-4M/libb84/ESP8266WiFi/ESP8266WiFiScan.cpp.o
Compiling .pio/build/tasmota-4M/libb84/ESP8266WiFi/WiFiClient.cpp.o
Compiling .pio/build/tasmota-4M/libb84/ESP8266WiFi/WiFiClientSecureAxTLS.cpp.o
Compiling .pio/build/tasmota-4M/libb84/ESP8266WiFi/WiFiClientSecureBearSSL.cpp.o
*** [.pio/build/tasmota-4M/src/tasmota.ino.cpp.o] Error 1
================================================================================ [FAILED] Took 17.63 seconds ================================================================================

Before this commit everything was building fine.

USE_GOOGLE_CHARTS is not defined in my config. It looks like preprocessor guards are missing for accessing those two struct members which only exist in USE_GOOGLE_CHARTS defined case.

glob_script_mem.chartindex = 1;

glob_script_mem.google_libs = 0;

BR

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.

3 participants