Coder Social home page Coder Social logo

Comments (14)

alexolog avatar alexolog commented on June 19, 2024 3

Any chance of this being looked at?

from lldb-mi.

H-G-Hristov avatar H-G-Hristov commented on June 19, 2024 2

I seem to have the same issue when I try to debug a Google Test UnitTest with the TestMate C++ extension.

There are more details here:

microsoft/vscode-cpptools#9831

I hit the issue with a code like this. In this context it is reproducible 100%. In other context there is no issue.

    struct KeepAlive
    {
        /**
         * @brief `KeepAlive` subkeys.
         *
         */
        enum class Subkey
        {
            /// Subkey `AfterInitialDemand` - delaying the start.
            AfterInitialDemand,
            /// Subkey `Crashed` - depending on crashes.
            Crashed,
            /// Subkey `NetworkState` - depending on network availability.
            NetworkState,
            /// Subkey `OtherJobEnabled` - depending on other jobs.
            OtherJobEnabled,
            /// Subkey `PathState` - depending on the existence of a path.
            PathState,
            /// Subkey `SuccessfulExit` - depending on the last exit status.
            SuccessfulExit,
        };

        /**
         * @brief `KeepAlive` subkey value types.
         *
         */
        struct SubkeyValueType
        {
            /// Subkey `AfterInitialDemand` - delaying the start.
            using AfterInitialDemand = std::map<std::string, bool>;
            /// Subkey `Crashed` - depending on crashes.
            using Crashed = bool;
            /// Subkey `NetworkState` - depending on network availability.
            using NetworkState = bool;
            /// Subkey `OtherJobEnabled` - depending on other jobs.
            using OtherJobEnabled = std::map<std::string, bool>;
            /// Subkey `PathState` - depending on the existence of a path.
            using PathState = std::map<std::string, bool>;
            /// Subkey `SuccessfulExit` - depending on the last exit status.
            using SuccessfulExit = bool;
        };

        /**
         * @brief A `variant` of `KeepAlive` subkey value types.
         *
         */
        using SubkeyType = ::boost::variant2::variant<
            KeepAlive::SubkeyValueType::AfterInitialDemand,
            KeepAlive::SubkeyValueType::Crashed,
            KeepAlive::SubkeyValueType::NetworkState,
            KeepAlive::SubkeyValueType::OtherJobEnabled,
            KeepAlive::SubkeyValueType::PathState,
            KeepAlive::SubkeyValueType::SuccessfulExit>;
    };

tl::optional<
    ::boost::variant2::variant<bool, std::map<ILaunchdPlist::KeepAlive::Subkey, ILaunchdPlist::KeepAlive::SubkeyType>>>
LaunchdPlist::GetKeepAlive() const noexcept
{
...
}

TEST_F(LaunchdPlistTest, GetKeepAliveBool)
{
    // Binary plist

    auto valueOpt = LaunchdPlistTest::GetValidBinaryPlist()->GetKeepAlive();
    EXPECT_TRUE(valueOpt.has_value());

Here it hangs:
Screenshot 2022-09-02 at 9 26 03

from lldb-mi.

hackroid avatar hackroid commented on June 19, 2024 1

related microsoft/vscode-cpptools/issues/10176

from lldb-mi.

donangel avatar donangel commented on June 19, 2024 1

Same issue here.

from lldb-mi.

garfieldnate avatar garfieldnate commented on June 19, 2024 1

Is this perhaps related to microsoft/vscode-cpptools#7240 (comment)? @shiretu posted his workaround there. Further comment:

This is truly a problem with the lldb. See my patch above. lldb is out-of-bounds-ing on walking uninitialized variables with garbage values on things like internal counters and sizes. My quick yet brutal fix is to limit these things to 64.

Unfortunately, VSCode tries to render all local variables in the current scope. And when it reaches one of those not-yet-initialized vars, it behaves like that.

from lldb-mi.

pangdaxing23 avatar pangdaxing23 commented on June 19, 2024 1

I can confirm this is also happening on Monterey on Intel Mac.

from lldb-mi.

sunshaoce avatar sunshaoce commented on June 19, 2024 1

We need a programmer to solve this bug : )

from lldb-mi.

H-G-Hristov avatar H-G-Hristov commented on June 19, 2024

If I stop debugging the lldb-mi process stays running at 100% CPU.

Screenshot 2022-09-02 at 9 28 12

from lldb-mi.

H-G-Hristov avatar H-G-Hristov commented on June 19, 2024

After several runs I have multiple lldb-mi instances:

Screenshot 2022-09-02 at 9 29 58

from lldb-mi.

H-G-Hristov avatar H-G-Hristov commented on June 19, 2024

Same here:
#96 #89
VSCode is rendered useless because of this in a complex scenario of C++ templates, abstract classes and Google Test.

I can confirm now that this issue happened to me on Intel macOS BigSur but it is very, very common and reproducible on M1 in the above scenario.

from lldb-mi.

H-G-Hristov avatar H-G-Hristov commented on June 19, 2024

@sunshaoce This is getting a major issue. CodeLLDB also stopped working recently.

from lldb-mi.

sunshaoce avatar sunshaoce commented on June 19, 2024

microsoft/vscode-cpptools#7240
Here seems to be a feasible solution, can any Mac users help test it out?

from lldb-mi.

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.