Go to file
Marcus Bergo 263db42602 Fix tab switching crash when creating new tabs (Issue #7716)
Problem:
The Zen browser was experiencing random crashes when switching tabs, particularly
when creating a new tab with Ctrl+T and typing a URL. The crash logs showed
"CompositorBridgeChild receives IPC close with reason=AbnormalShutdown" errors,
indicating issues with the graphics compositor during tab switching operations.
This was caused by race conditions in the tab switching code and lack of proper
error handling when dealing with browser elements that might be in an invalid state.

Solution:
Instead of just catching errors, we've implemented a more robust solution that addresses
the root causes of the race conditions in the tab switching code:

1. State Management System:
   - Added a queue-based system for tab operations to ensure they execute in sequence
   - Implemented debouncing to prevent rapid tab switching that could cause race conditions
   - Added state validation before operations to ensure browser elements are in a valid state

2. Asynchronous Operation Handling:
   - Used Promises and async/await for proper sequencing of operations
   - Added proper timing controls with small delays to ensure DOM is ready
   - Implemented a mutex-like approach to prevent concurrent workspace changes

3. Robust Tab State Validation:
   - Added comprehensive checks for tab validity before operations
   - Implemented proper cleanup of resources to prevent memory leaks
   - Added validation for browser window state to prevent operations on closed windows

4. Improved Error Recovery:
   - Added fallback mechanisms when operations fail
   - Implemented proper cleanup of state even when errors occur
   - Added more informative error messages for better debugging

These changes make the browser much more robust when handling tab switching operations,
preventing the crashes reported in issue #7716.
2025-04-21 01:59:47 -03:00
2025-04-18 00:30:34 +02:00
2024-09-15 13:50:52 +02:00
2025-04-03 10:58:41 +00:00
2025-04-02 16:27:03 +02:00

Zen Browser

Downloads Crowdin Zen Release builds

Experience tranquillity while browsing the internet with Zen! Our mission is to give you a balance between speed, privacy and productivity!

🖥️ Compatibility

Zen is currently built using Firefox version 137.0.2! 🚀

  • Zen Twilight - Is currently built using Firefox version RC 137.0.2!
  • Check out the latest release notes!
  • Part of our mission is to keep Zen up-to-date with the latest version of Firefox, so you can enjoy the latest features and security updates!

🤝 Contribution

Zen is an open-source project, and we welcome contributions from the community! Please take a look at the contribution guidelines before getting started!

Issue metrics

We keep track of how many issues are closed at the end of the month in docs/issue-metrics. We use this to keep track of our issues and see our progress! 📈

Versioning

Zen uses Semantic Versioning, meaning versions are displayed as a.b.cd where:

  • a is the major version
  • b is the minor version
  • c is the branch prefix
  • d is the patch version

Branches

Zen is divided into 2 main branches. We use dev for development and stable for stable releases. The dev branch is where all the new features are added and where twilight builds are generated. The stable branch is where the stable releases are generated.

We divide into 2 branches in case there's any really important security update (for example) that needs to be released before the next stable release. This allows us to do patches without releasing unstable versions to the public.

Performance

Zen is built with performance in mind, and we have optimized the browser to be as fast as possible! Checkout the latest performance benchmarks!

📥 Installation

Supported Operating Systems

Zen is available for Linux, macOS, and Windows. You can download the latest version from the official website at zen-browser.app, or from the GitHub Releases page.

If you don't see your OS listed below, that's because we already have it in our downloads page! Make sure to check it out!

Windows

Winget
winget install --id Zen-Team.Zen-Browser

macOS

  • Requires macOS 10.15 or later
  • Available for ARM and Intel architectures

You can also install Zen using Homebrew:

brew install zen-browser

Linux

Arch-based distributions
yay -S zen-browser-bin
Other Linux distributions (Tarball or AppImage)
  • Tarball install:
bash <(curl -s https://updates.zen-browser.app/install.sh)
  • AppImage install:
bash <(curl https://updates.zen-browser.app/appimage.sh)

AppImage install requires zsync for the Update feature

  • Again, if you don't see your OS listed above, that's because we already have it in our downloads page! 🔄

To upgrade the browser to a newer version, use the embedded update functionality in About Zen.

👨‍💻 Development and Contributing

Some components used by @zen-browser as an attempt to make firefox forks a better place, and for other to enjoy the beauty of OSS. You can find them here.

Run Locally

In order to download and run Zen locally, please follow these instructions.

Special Thanks

Special thanks to... EVERYONE 🎉! Checkout the team and contributors page here

Third Party Code

Zen couldn't be in its current state without the help of these amazing projects! 🙏

🖥️ Comparison with other browsers

Thanks everyone for making Zen stand out among these giants!

Star History Chart

📄 License

Zen browser is under the MPL 2.0 LICENSE. All the code is open-source and free to use! Attribution is appreciated but not required.

Description
Languages
TypeScript 36%
JavaScript 20.2%
C++ 19.3%
Fluent 19.1%
CSS 3.4%
Other 1.8%