Sometimes git crashes with this message, and the window stays empty ("Open a repository"):
git.exe - Błąd aplikacji
Aplikacja nie została właściwie uruchomiona (0xc0000142).
In English: "The application was unable to start correctly (0xc0000142)."
Why, as far as the code shows
The release build of gites has no console of its own. On Windows, every program without a console that starts a console program, such as git.exe, makes Windows open a new console window for it, unless it asks Windows not to. git() in src-tauri/src/git.rs does not ask, so every git command opens a window that flashes on screen.
Each of these windows takes the focus. When it closes, gites gets the focus back, and gites reloads the repository whenever its window gets focus (window.addEventListener("focus", load) in src/App.vue). One reload runs git several times, so it opens several more windows, and the reloads never stop. That explains the slowness and the flashing.
0xc0000142 means a program failed while Windows was starting it. It is a known result of opening and closing console windows very fast, but this has not been confirmed on a Windows machine.
Fix
Start git with the CREATE_NO_WINDOW flag on Windows, so no console window opens.
Do not start a reload while one is still running.
Reported by a Windows user, on v0.3.0.
## What happens
- The app is very slow.
- Windows flash in the background, again and again.
- Sometimes git crashes with this message, and the window stays empty ("Open a repository"):
> git.exe - Błąd aplikacji
> Aplikacja nie została właściwie uruchomiona (0xc0000142).
In English: "The application was unable to start correctly (0xc0000142)."
## Why, as far as the code shows
The release build of gites has no console of its own. On Windows, every program without a console that starts a console program, such as `git.exe`, makes Windows open a new console window for it, unless it asks Windows not to. `git()` in `src-tauri/src/git.rs` does not ask, so every git command opens a window that flashes on screen.
Each of these windows takes the focus. When it closes, gites gets the focus back, and gites reloads the repository whenever its window gets focus (`window.addEventListener("focus", load)` in `src/App.vue`). One reload runs git several times, so it opens several more windows, and the reloads never stop. That explains the slowness and the flashing.
0xc0000142 means a program failed while Windows was starting it. It is a known result of opening and closing console windows very fast, but this has not been confirmed on a Windows machine.
## Fix
- Start git with the `CREATE_NO_WINDOW` flag on Windows, so no console window opens.
- Do not start a reload while one is still running.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Reported by a Windows user, on v0.3.0.
What happens
The app is very slow.
Windows flash in the background, again and again.
Sometimes git crashes with this message, and the window stays empty ("Open a repository"):
In English: "The application was unable to start correctly (0xc0000142)."
Why, as far as the code shows
The release build of gites has no console of its own. On Windows, every program without a console that starts a console program, such as
git.exe, makes Windows open a new console window for it, unless it asks Windows not to.git()insrc-tauri/src/git.rsdoes not ask, so every git command opens a window that flashes on screen.Each of these windows takes the focus. When it closes, gites gets the focus back, and gites reloads the repository whenever its window gets focus (
window.addEventListener("focus", load)insrc/App.vue). One reload runs git several times, so it opens several more windows, and the reloads never stop. That explains the slowness and the flashing.0xc0000142 means a program failed while Windows was starting it. It is a known result of opening and closing console windows very fast, but this has not been confirmed on a Windows machine.
Fix
CREATE_NO_WINDOWflag on Windows, so no console window opens.