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

oiiotool: work around static destruction order issue (#3295) #3591

Merged
merged 1 commit into from
Oct 7, 2022
Merged

Commits on Oct 7, 2022

  1. oiiotool: work around static destruction order issue (#3295)

    In some cases (at least on Windows, with static linking) the oiiotool
    main returns zero, but the full process returns 3 error code due to
    abort() being called. And that is called because a global shared
    image cache is already destroyed, but the image references from another
    global (Oiiotool itself) try to use it, get a call into a "pure virtual
    function" stub that is put by MSVC C runtime into a destroyed object
    vtable, and that ends up in an abort().
    
    Work around that by making sure various member variables holding
    ImageRecRef are cleared before main() finishes and global destructors
    are called.
    aras-p committed Oct 7, 2022
    Configuration menu
    Copy the full SHA
    e1715ec View commit details
    Browse the repository at this point in the history