http://bugs.winehq.org/show_bug.cgi?id=59283 Bug ID: 59283 Summary: Berkeley DB version mismatch crashes 32-bit GTK+ applications in Wine 11 Product: Wine Version: 11.0 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@list.winehq.org Reporter: nen24t@gmail.com Distribution: --- Created attachment 80208 --> http://bugs.winehq.org/attachment.cgi?id=80208 Full backtrace reaper 32bit ## Bug Summary **Title:** Berkeley DB version mismatch causes crashes in 32-bit applications using GTK+ **Component:** wine (core) **Severity:** normal **Priority:** P2 **Version:** Wine 11.0 **Hardware:** x86_64 **OS:** Linux (Ubuntu 24.04) --- ## Description Wine 11.0 exhibits Berkeley DB (libdb) version mismatch errors when running certain 32-bit Windows applications that use GTK+ libraries. The error occurs before the application can fully initialize, resulting in a crash. ### Error Message ``` BDB1539 Build signature doesn't match environment Cannot open DB environment: BDB0091 DB_VERSION_MISMATCH: Database environment version mismatch wine: Unhandled page fault on execute access to 0x00000000 ``` ### Affected Applications - REAPER 32-bit (Digital Audio Workstation) - Garritan CFX Lite 32-bit (VST instrument host) - Other applications using GTK+ with Berkeley DB backend ### Impact Applications crash immediately on startup, before reaching their main functionality. This affects audio production software and other professional tools that rely on GTK+ libraries. --- ## Steps to Reproduce 1. Install Wine 11.0 (wine-stable or custom build) 2. Set up a 32-bit Wine prefix 3. Install REAPER 32-bit or similar GTK+-based application 4. Run the application: ```bash WINEPREFIX=~/.wine wine "C:\Program Files (x86)\REAPER\reaper.exe" ``` 5. Observe crash with BDB error ### Environment - **Wine version:** wine-11.0 - **Distribution:** Ubuntu 24.04 LTS - **Kernel:** 6.14.0-1019-oem - **System libdb:** libdb-5.3.so (from libdb5.3-dev package) - **Architecture:** x86_64 (running 32-bit Windows apps via WoW64) --- ## Expected Behavior Application should start normally without Berkeley DB errors. GTK+ libraries should either: 1. Use a compatible libdb version, or 2. Handle version mismatches gracefully, or 3. Not use persistent Berkeley DB storage that can become outdated --- ## Actual Behavior Application crashes with page fault at NULL pointer (0x00000000) after Berkeley DB version mismatch error. The crash occurs in system libraries before the application's main code executes. ### Backtrace ``` Unhandled exception: page fault on write access to 0x00000000 in wow64 32-bit code (0x003600a9). Register dump: CS:0023 SS:002b DS:002b ES:002b FS:0063 GS:006b EIP:003600a9 ESP:0141a864 EBP:00688f36 EFLAGS:00010203 EAX:00000000 EBX:006885e0 ECX:018eb0b0 EDX:00000000 Modules: Module Address Debug info Name (146 modules) PE 400000- 1317000 Deferred reaper ELF f2271000-f2464000 Deferred libdb-5.3.so [... more modules ...] ``` --- ## Analysis ### Root Cause The issue appears to be related to: 1. **GTK+ uses Berkeley DB** for recently-used file tracking (`.local/share/recently-used.xbel`) 2. **System libdb version** (5.3.x) may be incompatible with Wine's expectations 3. **Database files persist** between Wine versions, causing signature mismatch 4. **32-bit applications more affected** - possibly due to WoW64 library loading ### Not Application-Specific This is NOT an application bug. We verified this by: - Testing with multiple applications (REAPER, CFX Lite) - Creating a minimal test program that does NOT use Berkeley DB - works perfectly - The crash occurs in Wine/GTK+ code, not application code --- ## Workarounds ### Temporary Solutions 1. **Remove stale database files:** ```bash rm -rf ~/.wine/.local/share/recently-used.xbel* find ~/.wine -name "*.db" -delete ``` 2. **Use 64-bit applications** (not always possible) 3. **Downgrade to Wine 10.x** (loses Wine 11 improvements) ### Limitations These workarounds are temporary - the issue recurs after GTK+ recreates database files. --- ## Additional Information ### Testing Details - **Wine 11 new WoW64:** Crashes - **Wine 11 old WoW64 (wine-stable):** Crashes - **Wine 10.x:** Also affected (issue predates Wine 11) - **64-bit applications:** Generally unaffected ### Relevant Files - System libdb: `/lib/x86_64-linux-gnu/libdb-5.3.so` (64-bit) - System libdb: `/lib/i386-linux-gnu/libdb-5.3.so` (32-bit) - Wine loads: `ELF f2271000-f2464000 Deferred libdb-5.3.so` ### Related Issues This may be related to GTK+'s use of Berkeley DB for: - Recently used files tracking - Icon cache - Other persistent data structures --- ## Suggested Fixes 1. **Pin libdb version:** Bundle compatible libdb version with Wine 2. **Handle version mismatch:** Gracefully recreate database on version mismatch 3. **Alternative backend:** Consider switching GTK+ to use SQLite or other database 4. **Clear on upgrade:** Automatically clear incompatible databases when Wine version changes --- ## Impact Assessment - **Severity:** Medium-High - Affects professional audio production tools - **Scope:** 32-bit GTK+ applications on Wine 11 - **Workaround:** Available but temporary - **User Impact:** Cannot use certain professional Windows software on Linux --- ## Test Case A minimal test case that demonstrates the issue: 1. Create Wine prefix: ```bash WINEPREFIX=~/.wine wineboot ``` 2. Install REAPER 32-bit (or any GTK+ app) 3. Run with debug output: ```bash WINEDEBUG=+all wine reaper.exe 2>&1 | grep -i "bdb\|berkeley" ``` 4. Observe BDB error followed by crash --- ## References - **WineASIO project:** https://github.com/giang17/wineasio - **Issue documented in:** TEST-RESULTS.md (comprehensive 32-bit testing analysis) - **Berkeley DB:** https://www.oracle.com/database/technologies/related/berkeleydb.html - **GTK+ documentation:** https://www.gtk.org/ --- ## Reporter Information - **Reporter:** WineASIO v1.4.1 testing team - **Date:** January 21, 2026 - **Tested configurations:** Multiple Wine 11 builds, Ubuntu 24.04 - **Verification:** Extensive testing with multiple applications --- ## Additional Notes This bug was discovered during Wine 11 porting of WineASIO (ASIO to JACK audio driver). While investigating what appeared to be a WineASIO bug, we determined the root cause is a Wine/GTK+/Berkeley DB compatibility issue. The WineASIO library itself works correctly - we confirmed this with a minimal test program that bypasses GTK+. The crash occurs in Wine's GTK+ implementation before WineASIO is even initialized. --- **Follow-up questions for WineHQ developers:** 1. Is Wine's libdb build compatible with system libdb 5.3? 2. Should Wine bundle its own libdb version? 3. Can GTK+ database initialization be made more robust? 4. Is there a way to force database recreation on version mismatch? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.