Git Product home page Git Product logo

Comments (3)

MarkCallow avatar MarkCallow commented on July 2, 2024

I am having a hard time reproducing this. It has failed once. I then set a breakpoint in malloc_error_break and it didn't fail. I removed the breakpoint. It didn't fai.l I restarted Xcode. It didn't fail. I tried many times. It didn't fail. This smells like an uninitialized variable. If you can more reliably reproduce it, please see if you can narrow down the cause.

from ktx-software.

zeux avatar zeux commented on July 2, 2024

The callstack I get in Debug is as follows:

(gdb) bt
#0  __memmove_avx_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:238
#1  0x00007fffff508ae5 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#2  0x0000000008015af9 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign (__str=...,
    this=0x7ffffffee0d8) at /usr/include/c++/9/bits/basic_string.h:1364
#3  std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator= (__str=..., this=0x7ffffffee0d8)
    at /usr/include/c++/9/bits/basic_string.h:696
#4  processCommandLine (argc=1, argv=0x7ffffffee458, options=...) at /mnt/c/work/KTX-Software/tools/toktx/toktx.cpp:1169
#5  0x0000000008016139 in main (argc=1, argv=0x7ffffffee458) at /mnt/c/work/KTX-Software/tools/toktx/toktx.cpp:590

So it crashes on this line:

    options.outfile = parser.argv[i++];

Here, parser.optind is 1, so i starts as 1; argc is also 1 so this is dereferencing the element past the end of argv array - on my system it's always NULL, maybe on macOS it's sometimes non-NULL.

from ktx-software.

MarkCallow avatar MarkCallow commented on July 2, 2024

Fixed by PR #147. Autoclose did not work despite the PR saying fixes #143.

from ktx-software.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.