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

Memory leak lottie2gif fails to converte file #2070

Closed
Tracked by #2067
qarmin opened this issue Mar 18, 2024 · 0 comments
Closed
Tracked by #2067

Memory leak lottie2gif fails to converte file #2070

qarmin opened this issue Mar 18, 2024 · 0 comments
Assignees
Labels
bug Something isn't working lottie Lottie animation
Milestone

Comments

@qarmin
Copy link
Contributor

qarmin commented Mar 18, 2024

Command

~/test/thorvg/build/src/tools/lottie2gif/lottie2gif ../Untitled\ Folder\ 3/about.json -r 300x300

json (real json, but not lottie file)

about.json.zip

Failed Converting Gif file : ../Untitled Folder 3/manifest.json

=================================================================
==400865==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 120 byte(s) in 1 object(s) allocated from:
    #0 0x7f3aa04dfba8 in operator new(unsigned long) ../../../../src/libsanitizer/asan/asan_new_delete.cpp:95
    #1 0x7f3a9ff1e443 in LottieParser::parse() ../src/loaders/lottie/tvgLottieParser.cpp:1299
    #2 0x7f3a9fef6046 in LottieLoader::run(unsigned int) ../src/loaders/lottie/tvgLottieLoader.cpp:58
    #3 0x7f3a9fef2f33 in LottieLoader::header() ../src/loaders/lottie/tvgLottieLoader.cpp:92
    #4 0x7f3a9fdbd745 in LoaderMgr::loader(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool*) ../src/renderer/tvgLoader.cpp:315
    #5 0x7f3a9fddda8d in tvg::Picture::Impl::load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ../src/renderer/tvgPicture.h:152
    #6 0x7f3a9fddda8d in tvg::Picture::load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ../src/renderer/tvgPicture.cpp:175
    #7 0x55f051fd1aeb in App::convert(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) ../src/tools/lottie2gif/lottie2gif.cpp:74
    #8 0x55f051fd408c in App::convert(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) ../src/tools/lottie2gif/lottie2gif.cpp:102
    #9 0x55f051fd77ef in App::setup(int, char**) ../src/tools/lottie2gif/lottie2gif.cpp:269
    #10 0x55f051fcfc08 in main ../src/tools/lottie2gif/lottie2gif.cpp:280
    #11 0x7f3a9ea2814f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

Direct leak of 120 byte(s) in 1 object(s) allocated from:
    #0 0x7f3aa04dfba8 in operator new(unsigned long) ../../../../src/libsanitizer/asan/asan_new_delete.cpp:95
    #1 0x7f3a9ff1e443 in LottieParser::parse() ../src/loaders/lottie/tvgLottieParser.cpp:1299
    #2 0x7f3a9fef6046 in LottieLoader::run(unsigned int) ../src/loaders/lottie/tvgLottieLoader.cpp:58
    #3 0x7f3a9fef2f33 in LottieLoader::header() ../src/loaders/lottie/tvgLottieLoader.cpp:92
    #4 0x7f3a9fdbd2c5 in LoaderMgr::loader(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool*) ../src/renderer/tvgLoader.cpp:301
    #5 0x7f3a9fddda8d in tvg::Picture::Impl::load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ../src/renderer/tvgPicture.h:152
    #6 0x7f3a9fddda8d in tvg::Picture::load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ../src/renderer/tvgPicture.cpp:175
    #7 0x55f051fd1aeb in App::convert(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) ../src/tools/lottie2gif/lottie2gif.cpp:74
    #8 0x55f051fd408c in App::convert(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) ../src/tools/lottie2gif/lottie2gif.cpp:102
    #9 0x55f051fd77ef in App::setup(int, char**) ../src/tools/lottie2gif/lottie2gif.cpp:269
    #10 0x55f051fcfc08 in main ../src/tools/lottie2gif/lottie2gif.cpp:280
    #11 0x7f3a9ea2814f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

SUMMARY: AddressSanitizer: 240 byte(s) leaked in 2 allocation(s).
JSUYA added a commit to JSUYA/thorvg that referenced this issue Mar 19, 2024
When json file is invalid in the parser,
the LottieComposition object is not released and the parse() returns false.
To prevent memory leaks, free the memory before returning false.

related issue : thorvg#2070
@hermet hermet added bug Something isn't working lottie Lottie animation labels Mar 19, 2024
@hermet hermet added this to the 0.13 milestone Mar 19, 2024
hermet pushed a commit that referenced this issue Mar 19, 2024
When json file is invalid in the parser,
the LottieComposition object is not released and the parse() returns false.
To prevent memory leaks, free the memory before returning false.

related issue : #2070
@hermet hermet closed this as completed Mar 19, 2024
@hermet hermet mentioned this issue Mar 19, 2024
37 tasks
hermet pushed a commit that referenced this issue Mar 21, 2024
When json file is invalid in the parser,
the LottieComposition object is not released and the parse() returns false.
To prevent memory leaks, free the memory before returning false.

related issue : #2070
hermet pushed a commit that referenced this issue Apr 5, 2024
When json file is invalid in the parser,
the LottieComposition object is not released and the parse() returns false.
To prevent memory leaks, free the memory before returning false.

related issue : #2070
hermet pushed a commit that referenced this issue Apr 6, 2024
When json file is invalid in the parser,
the LottieComposition object is not released and the parse() returns false.
To prevent memory leaks, free the memory before returning false.

related issue : #2070
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lottie Lottie animation
Projects
Status: Done 0.13
Development

No branches or pull requests

3 participants