GithubHelp home page GithubHelp logo

Comments (5)

mathsoft-dev avatar mathsoft-dev commented on August 17, 2024

This piece of code(from method callJohnShow) doesn't work as we thought :
1.if (m_johnShow.state() != QProcess::NotRunning)
2. m_johnShow.stop();
.....
3. m_johnShow.start();
In fact, it doesn't seem to protect us. Imagine the use case described in the first post, m_johnShow.state() == QProcess::Starting before we call m_johnShow.stop(). However, it is probably stopped asynchronously, because, before starting johnShow again(line 3), m_johnShow is still in the Starting state as the debugger shows. It is NOT stopped yet which gives the warning on the terminal.

from johnny.

mathsoft-dev avatar mathsoft-dev commented on August 17, 2024

JohnHandler::terminate(bool) wasn't doing anything to terminate the process for the case QProcess::Starting. Fixed in 6bc896d.

from johnny.

shinnok avatar shinnok commented on August 17, 2024

How about we also don't call johnShow if johnAttack exited with error status?

from johnny.

mathsoft-dev avatar mathsoft-dev commented on August 17, 2024

How about we also don't call johnShow if johnAttack exited with error status?

Okay, I'll make the change

from johnny.

mathsoft-dev avatar mathsoft-dev commented on August 17, 2024

Fixed.

from johnny.

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.