Giter Club home page Giter Club logo

Comments (6)

Nassim-Saboundji avatar Nassim-Saboundji commented on June 3, 2024 2

Describe the bug When exitProcessOnClose is set to true, closing the app will result in +5 sec freeze before the app closes on Windows

To Reproduce

  1. set exitProcessOnClose to true in neutralino.config.json.
  2. Open the app.
  3. Try closing it.

Expected behavior The app should close immediately. However, we have a +5 sec delay before closing. Which is not what we want.

Specifications

  • OS: Windows 11
  • Neutralinojs version : 4.14.1
  • Neutralinojs client library version: 3.12.0
  • Neutralinojs CLI version: 10.1.0

Note: you can enter the neu version command to find these details

Additional context The issue does not occur when using this workaround in main.js instead of relying on existProcessOnClose.

Neutralino.init();
Neutralino.events.on("windowClose", () => {
  Neutralino.app.exit();
});

how to use the workaround please?

Add the code shown above where you use the Neutralino object in your project. Usually it's in main.js

from neutralinojs.

thorin8k avatar thorin8k commented on June 3, 2024 1

Same here, tested in 4.15.0 and same results.

The workaround seems to be working fine.

from neutralinojs.

kwisatz avatar kwisatz commented on June 3, 2024 1

I had created a duplicate ticket of this on the wrong (?) project: neutralino.jsj #102

The workaround that is described above is what was in my app by default after neu create-ing it. This resulted in the app not closing at all on Windows.
Removing it now exhibits the behavior described by the OP. However, we have seen the time ranging from 2 seconds to more than 10 seconds on some Windows installations.

from neutralinojs.

ContrerasA avatar ContrerasA commented on June 3, 2024

Something similar happens when creating a react application as outlined under the "Using any frontend library" section of the docs

https://neutralino.js.org/docs/getting-started/using-frontend-libraries

In my case, when I press the X button to exit, the application hangs for 10 seconds before closing.
I have not found how to use the workaround shown above since there is no main.js file

from neutralinojs.

Rylazius avatar Rylazius commented on June 3, 2024

same, neutralino v4.14.1, client v3.12.0, workaround working fine but not the exitProcessOnClose

from neutralinojs.

multiman95 avatar multiman95 commented on June 3, 2024

Describe the bug When exitProcessOnClose is set to true, closing the app will result in +5 sec freeze before the app closes on Windows

To Reproduce

  1. set exitProcessOnClose to true in neutralino.config.json.
  2. Open the app.
  3. Try closing it.

Expected behavior The app should close immediately. However, we have a +5 sec delay before closing. Which is not what we want.

Specifications

  • OS: Windows 11
  • Neutralinojs version : 4.14.1
  • Neutralinojs client library version: 3.12.0
  • Neutralinojs CLI version: 10.1.0

Note: you can enter the neu version command to find these details

Additional context The issue does not occur when using this workaround in main.js instead of relying on existProcessOnClose.

Neutralino.init();
Neutralino.events.on("windowClose", () => {
  Neutralino.app.exit();
});

how to use the workaround please?

from neutralinojs.

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.