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

Error while using PNGdec library conflict with bundled zlib? #129

Open
niccocco opened this issue Sep 13, 2024 · 1 comment
Open

Error while using PNGdec library conflict with bundled zlib? #129

niccocco opened this issue Sep 13, 2024 · 1 comment
Labels

Comments

@niccocco
Copy link

I'm trying to download and show to display a png image. But before that i wanted to try the basic functions of the PNGdec library from bitbank2 this. To recreate the issue i tried using the demo code provided in the examples folder of the display.

...
#include <PNGdec.h>
...
PNG png; 
...
void convertToGrayscale(uint8_t *framebufferImg, size_t imageSize)
{
    int16_t rc = png.openRAM(framebufferImg, (int)imageSize, NULL);
    if (rc == 0)
    {
        uint16_t width = png.getWidth();
        uint16_t height = png.getHeight();
        ESP_LOGI("PNG", "Image size: %dx%d", width, height);
        png.close();
    }
}

(for the moment the function only decodes the image)

Even not calling the function, but just leaving the code inside the demo.ino file causes a crash of the esp32s3 with reason StoreProhibited, the crash dump is the following:

Guru Meditation Error: Core  0 panic'ed (StoreProhibited). Exception was unhandled.

Core  0 register dump:
PC      : 0x4200634f  PS      : 0x00060a30  A0      : 0x8200639d  A1      : 0x3fcebb60  
A2      : 0x3fcebbb8  A3      : 0x0000000f  A4      : 0x00060623  A5      : 0x00000038  
A6      : 0x00060620  A7      : 0x00000001  A8      : 0x00000031  A9      : 0x3fcebb90  
A10     : 0x3fca3f70  A11     : 0x000000ba  A12     : 0xfffffffe  A13     : 0xfffffffd  
A14     : 0x00060220  A15     : 0x00000001  SAR     : 0x0000000e  EXCCAUSE: 0x0000001d  
EXCVADDR: 0x00060623  LBEG    : 0x400570e8  LEND    : 0x400570f3  LCOUNT  : 0x00000000  


Backtrace: 0x4200634c:0x3fcebb60 0x4200639a:0x3fcebb80 0x42008ccf:0x3fcebba0 0x42008d71:0x3fcebc10 0x40375dd1:0x3fcebc40 0x42008aa9:0x3fcebca0 0x42008b92:0x3fcebd40 0x42004ce1:0x3fcebd70 0x420108c6:0x3fcebe20
  #0  0x4200634c in inflateInit2_ at .pio/libdeps/T5-ePaper-S3/PNGdec/src/inflate.c:222
  #1  0x4200639a in inflateInit_ at .pio/libdeps/T5-ePaper-S3/PNGdec/src/inflate.c:252
  #2  0x42008ccf in uncompress2 at src/zlib/uncompr.c:57
  #3  0x42008d71 in uncompress at src/zlib/uncompr.c:94
  #4  0x40375dd1 in draw_char at src/font.c:381
  #5  0x42008aa9 in write_mode at src/font.c:232
  #6  0x42008b92 in writeln at src/font.c:258
  #7  0x42004ce1 in setup() at examples/demo/demo.ino:187
  #8  0x420108c6 in loopTask(void*) at /Users/nicco/.platformio/packages/framework-arduinoespressif32/cores/esp32/main.cpp:42

for what i understood the problem seems like that the compilers uses the inflate library that comes with PNGdec and not the one budled in src/

Has anyone had this kind of error? and how can i fix this?

Moreover the problem appears as soon as write the png.openRAM line

@niccocco niccocco changed the title Error while using PNGdec library Error while using PNGdec library conflict with bundled zlib? Sep 13, 2024
Copy link

github-actions bot commented Nov 2, 2024

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant