lvgl / lv_lib_gif

GIF library for LVGL
MIT License
36 stars 13 forks source link

Hard fault #2

Closed stetzanton closed 4 years ago

stetzanton commented 4 years ago

Hey. Trying to run the gif library on stm32f407. I get hardfault after launch. I get "invalid signature" in the console. But the process continues to run after that. c9f85ae734

kisvegabor commented 4 years ago

It seems there is no proper error handling in the lib.

"Invalid signature" means the GIF file was invalid.

kisvegabor commented 4 years ago

I've added error handling here: https://github.com/lvgl/lv_lib_gif/commit/d64a40001fe01e35e01533b8deee942756943617

stetzanton commented 4 years ago

can you send any correct gif file for test?

kisvegabor commented 4 years ago

it works for me: test

stetzanton commented 4 years ago

Hardfault is passed. But "invalid signature" is in place. I use your gif file placed in the root of SD-card. I also have a problem reading images from the card. All UI elements are created successfully. But the images are not loading. Maybe this is a common problem? projects - SmartProjector_407V_LVGLv7CoreSrcmain c - STM32CubeIDE

kisvegabor commented 4 years ago

How do you set the path of the files? Do you use LVGL's files system API? E.g. S/path/to/image.gif

stetzanton commented 4 years ago

"S:/path/to/image.gif" But images with errors in .bin format Problem with cache start after include lv_lib_gif and replace lvgl version (feat/new-fs-api) and lv_fs_if(new-api)

kisvegabor commented 4 years ago

You don't need to convert it into bin, just use the gif as it is.

stetzanton commented 4 years ago

I do not convert .GIF to .bin. The cache issue was with old files that were loaded from SD card(background pictures). Images from flash(button icons) are loaded and displayed normally.

kisvegabor commented 4 years ago

I suggest using a simulator (I use Eclipse you can use other) to have a common platform to investigate the issue.

If you place the images to the projet's root folder and you enable LV_FS_IF_PC 'P' it should work for "normal images":

lv_img_set_src(img, "P/my_image.bin");

Is it working?

stetzanton commented 4 years ago

.bin working good with master-branch of lvgl can i use lv_lib_gif with master branch or only with new-fs-api?

stetzanton commented 4 years ago

When i use without lv_fs_if library have this errors http://joxi.ru/n2Ybe6hbDObbA6 (with master branch of lvgl .bin files are open good with "S:/path/to/image.bin"). Where i can add disk letter for new-fs-api branch of lvgl?

kisvegabor commented 4 years ago

can i use lv_lib_gif with master branch or only with new-fs-api?

No, I made some changes in the FS API when added the GIF library.

When i use without lv_fs_if library have this errors http://joxi.ru/n2Ybe6hbDObbA6 (with master branch of lvgl .bin files are open good with "S:/path/to/image.bin"). Where i can add disk letter for new-fs-api branch of lvgl?

If you don't use lv_fs_if you need to register a driver yourself. See here https://docs.lvgl.io/latest/en/html/overview/file-system.html

stale[bot] commented 4 years ago

This issue or pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.