Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

realloc(): invalid pointer with wine x86 games #2184

Open
pdapandapda opened this issue Dec 21, 2024 · 7 comments
Open

realloc(): invalid pointer with wine x86 games #2184

pdapandapda opened this issue Dec 21, 2024 · 7 comments

Comments

@pdapandapda
Copy link

pdapandapda commented Dec 21, 2024

I am currently using wine wow64 mode with box64 on Tegra X1 ubuntu 24.04, before December 18th,it worked well.
But after updating box64 from commit 28fb1bb to commit 6e0f32f , only x64 games work now,and x86 games show like this:

ynarec for ARM64, with extension: ASIMD AES CRC32 PMULL SHA1 SHA2 PageSize:4096 Running on Unknown CPU with 4 cores
Will use hardware counter measured at 19.2 MHz emulating 2.4 GHz
Params database has 97 entries
Box64 with Dynarec v0.3.3 9fc46972 built on Dec 21 2024 06:40:08
BOX64: Wine64 detected, WINEPRELOADRESERVE=""
BOX64: Didn't detect 48bits of address space, considering it's 39bits
WINE prereserve of 0x10000:0x8000 done
WINE prereserve of 0x110000:0x30000000 done
WINE prereserve of 0x7f000000:0x3000000 done
BOX64: Detected running wine with "プレミアムプレイMain.exe"
Counted 74 Env var
BOX64 LIB PATH: BOX64 BIN PATH: ./:bin/:/usr/local/sbin/:/usr/local/bin/:/usr/sbin/:/usr/bin/:/sbin/:/bin/:/usr/games/:/usr/local/games/:/snap/bin/
Looking for /usr/local/bin/wine
Apply RC params for wine
Applying BOX64_MAXCPU=64
argv[1]="プレミアムプレイMain.exe"
Rename process to "wine"
Using native(wrapped) libdl.so.2
Using native(wrapped) libpthread.so.0
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux-x86-64.so.2
Using native(wrapped) libutil.so.1
Using native(wrapped) librt.so.1
Using native(wrapped) libbsd.so.0
Using emulated /opt/wine-9.17/bin/../lib/wine/x86_64-unix/ntdll.so
Using emulated /usr/lib/box64-x86_64-linux-gnu/libunwind.so.8
Using native(wrapped) liblzma.so.5
Dynarec for ARM64, with extension: ASIMD AES CRC32 PMULL SHA1 SHA2 PageSize:4096 Running on Unknown CPU with 4 cores
Will use hardware counter measured at 19.2 MHz emulating 2.4 GHz
Params database has 97 entries
Box64 with Dynarec v0.3.3 9fc46972 built on Dec 21 2024 06:40:08
BOX64: Wine preloader detected, loading "/opt/wine-9.17/bin/wine" directly
BOX64: Wine64 detected, WINEPRELOADRESERVE=""
BOX64: Didn't detect 48bits of address space, considering it's 39bits
WINE prereserve of 0x10000:0x8000 done
WINE prereserve of 0x110000:0x30000000 done
WINE prereserve of 0x7f000000:0x3000000 done
BOX64: Detected running wine with "プレミアムプレイMain.exe"
Counted 76 Env var
BOX64 LIB PATH: BOX64 BIN PATH: ./:bin/:/usr/local/sbin/:/usr/local/bin/:/usr/sbin/:/usr/bin/:/sbin/:/bin/:/usr/games/:/usr/local/games/:/snap/bin/
Looking for /opt/wine-9.17/bin/wine
Apply RC params for wine
Applying BOX64_MAXCPU=64
argv[1]="プレミアムプレイMain.exe"
Rename process to "wine"
Using native(wrapped) libdl.so.2
Using native(wrapped) libpthread.so.0
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux-x86-64.so.2
Using native(wrapped) libutil.so.1
Using native(wrapped) librt.so.1
Using native(wrapped) libbsd.so.0
Using emulated /opt/wine-9.17/bin/../lib/wine/x86_64-unix/ntdll.so
Using emulated /usr/lib/box64-x86_64-linux-gnu/libunwind.so.8
Using native(wrapped) liblzma.so.5
posix_spawn(0x7fa97ee69c, "/opt/wine-9.17/bin/wineserver", (nil), (nil), 0x7fa97ee6a0["/opt/wine-9.17/bin/wineserver", "", ...], 0x7fa97eeb28), IsX64=1, IsX86=0 IsScript=0 envp is context->envv
 => posix_spawn(0x7fa97ee69c, "/usr/local/bin/box64", (nil), (nil), 0x7ffe0df8b0 ["/usr/local/bin/box64", "/opt/wine-9.17/bin/wineserver", ""...:1], 0x7ffe0e0670)
posix_spawn returned 0
Dynarec for ARM64, with extension: ASIMD AES CRC32 PMULL SHA1 SHA2 PageSize:4096 Running on Unknown CPU with 4 cores
Will use hardware counter measured at 19.2 MHz emulating 2.4 GHz
Params database has 97 entries
Box64 with Dynarec v0.3.3 9fc46972 built on Dec 21 2024 06:40:08
BOX64: Didn't detect 48bits of address space, considering it's 39bits
Counted 76 Env var
BOX64 LIB PATH: BOX64 BIN PATH: ./:bin/:/usr/local/sbin/:/usr/local/bin/:/usr/sbin/:/usr/bin/:/sbin/:/bin/:/usr/games/:/usr/local/games/:/snap/bin/
Looking for /opt/wine-9.17/bin/wineserver
Rename process to "wineserver"
Using native(wrapped) libdl.so.2
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux-x86-64.so.2
Using native(wrapped) libpthread.so.0
Using native(wrapped) libutil.so.1
Using native(wrapped) librt.so.1
Using native(wrapped) libbsd.so.0
00a0:err:winediag:is_broken_driver Broken NVIDIA RandR detected, falling back to RandR 1.0. Please consider using the Nouveau driver instead.
00a0:fixme:xrandr:xrandr10_get_current_mode Non-primary adapters are unsupported.
00a0:fixme:xrandr:xrandr10_get_current_mode Non-primary adapters are unsupported.
0034:err:winediag:is_broken_driver Broken NVIDIA RandR detected, falling back to RandR 1.0. Please consider using the Nouveau driver instead.
002c:err:winediag:is_broken_driver Broken NVIDIA RandR detected, falling back to RandR 1.0. Please consider using the Nouveau driver instead.
00e4:err:winediag:is_broken_driver Broken NVIDIA RandR detected, falling back to RandR 1.0. Please consider using the Nouveau driver instead.
0128:err:winediag:is_broken_driver Broken NVIDIA RandR detected, falling back to RandR 1.0. Please consider using the Nouveau driver instead.
0128:err:setupapi:create_dest_file failed to create L"C:\\windows\\system32\\atl100.dll" (error=80)
0128:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION
0128:fixme:ntdll:NtQuerySystemInformation (0x00000007,0x813c3428,0x00000018,0x801ebd20) stub
0128:fixme:ntdll:NtQuerySystemInformation (0x00000050,0x813c3428,0x000000a8,0x801ebd20) stub
0128:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_CACHE_INFORMATION
0128:fixme:ntdll:NtQuerySystemInformation (0x00000021,0x813c35b0,0x00000010,0x801ebd20) stub
0128:fixme:ntdll:NtQuerySystemInformation (0x0000002d,0x813c35b0,0x00000020,0x801ebd20) stub
0128:fixme:ntdll:NtQuerySystemInformation (0x0000003d,0x813c35c8,0x00000a58,0x801ebd20) stub
0128:fixme:ntdll:NtQuerySystemInformation (0x00000012,0x813c35c8,0x00000a58,0x801ebd20) stub
0128:fixme:ntdll:NtQuerySystemInformation (0x0000002a,0x813c35e0,0x00000a40,0x801ebd20) stub
0128:fixme:reg:RegQueryInfoKeyW security argument not supported.
0128:fixme:reg:RegQueryInfoKeyW security argument not supported.
0128:fixme:reg:RegQueryInfoKeyW security argument not supported.
0128:fixme:reg:RegQueryInfoKeyW security argument not supported.
0128:fixme:reg:RegQueryInfoKeyW security argument not supported.
0128:fixme:reg:RegQueryInfoKeyW security argument not supported.
0128:fixme:reg:RegQueryInfoKeyW security argument not supported.
0128:fixme:reg:RegQueryInfoKeyW security argument not supported.
0128:fixme:reg:RegQueryInfoKeyW security argument not supported.
0128:fixme:reg:RegQueryInfoKeyW security argument not supported.
0128:fixme:reg:RegQueryInfoKeyW security argument not supported.
0128:fixme:reg:RegQueryInfoKeyW security argument not supported.
0128:fixme:reg:RegQueryInfoKeyW security argument not supported.
0130:err:winediag:is_broken_driver Broken NVIDIA RandR detected, falling back to RandR 1.0. Please consider using the Nouveau driver instead.
0140:err:environ:init_peb starting L"C:\\windows\\syswow64\\rundll32.exe" in experimental wow64 mode
0140:err:winediag:is_broken_driver Broken NVIDIA RandR detected, falling back to RandR 1.0. Please consider using the Nouveau driver instead.
0140:err:setupapi:create_dest_file failed to create L"C:\\windows\\system32\\atl100.dll" (error=80)
0140:err:setupapi:create_dest_file failed to create L"C:\\windows\\system32\\ucrtbase.dll" (error=80)
0140:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION
0140:fixme:wow:wow64_NtQuerySystemInformation unsupported class 7
0140:fixme:wow:wow64_NtQuerySystemInformation unsupported class 80
0140:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_CACHE_INFORMATION
0140:fixme:wow:wow64_NtQuerySystemInformation unsupported class 33
0140:fixme:wow:wow64_NtQuerySystemInformation unsupported class 45
0140:fixme:wow:wow64_NtQuerySystemInformation unsupported class 61
0140:fixme:wow:wow64_NtQuerySystemInformation unsupported class 18
0140:fixme:wow:wow64_NtQuerySystemInformation unsupported class 42
0140:fixme:reg:RegQueryInfoKeyW security argument not supported.
0140:fixme:reg:RegQueryInfoKeyW security argument not supported.
0140:fixme:reg:RegQueryInfoKeyW security argument not supported.
0140:fixme:reg:RegQueryInfoKeyW security argument not supported.
0140:fixme:reg:RegQueryInfoKeyW security argument not supported.
0140:fixme:reg:RegQueryInfoKeyW security argument not supported.
0140:fixme:reg:RegQueryInfoKeyW security argument not supported.
0140:fixme:reg:RegQueryInfoKeyW security argument not supported.
0140:fixme:reg:RegQueryInfoKeyW security argument not supported.
0140:fixme:reg:RegQueryInfoKeyW security argument not supported.
0140:fixme:reg:RegQueryInfoKeyW security argument not supported.
0140:fixme:reg:RegQueryInfoKeyW security argument not supported.
0140:fixme:reg:RegQueryInfoKeyW security argument not supported.
0148:err:environ:init_peb starting L"C:\\windows\\syswow64\\iexplore.exe" in experimental wow64 mode
0148:err:winediag:is_broken_driver Broken NVIDIA RandR detected, falling back to RandR 1.0. Please consider using the Nouveau driver instead.
0148:fixme:ver:GetCurrentPackageId (0031FECC 00000000): stub
0140:fixme:ver:GetCurrentPackageId (0031FECC 00000000): stub
0024:err:environ:init_peb starting L"H:\\ROMS\\PC\\\30d7\30ec\30df\30a2\30e0\30d7\30ec\30a4\\\30d7\30ec\30df\30a2\30e0\30d7\30ec\30a4Main.exe" in experimental wow64 mode
Using emulated /opt/wine-9.17/lib/wine/x86_64-unix/win32u.so
Using native(wrapped) libm.so.6
Using native(wrapped) libfreetype.so.6
Using native(wrapped) libfontconfig.so.1
Using native(wrapped) libexpat.so.1
Using emulated /opt/wine-9.17/lib/wine/x86_64-unix/opengl32.so
Using emulated /opt/wine-9.17/lib/wine/x86_64-unix/winex11.so
Using native(wrapped) libXext.so.6
Using native(wrapped) libX11.so.6
Using native(wrapped) libxcb.so.1
Using native(wrapped) libXau.so.6
Using native(wrapped) libXdmcp.so.6
Using native(wrapped) libXinerama.so.1
Using native(wrapped) libXxf86vm.so.1
Using native(wrapped) libXrender.so.1
Using native(wrapped) libXrandr.so.2
0024:err:winediag:is_broken_driver Broken NVIDIA RandR detected, falling back to RandR 1.0. Please consider using the Nouveau driver instead.
Using native(wrapped) libXcomposite.so.1
Using native(wrapped) libXi.so.6
Using native(wrapped) libXcursor.so.1
Using native(wrapped) libXfixes.so.3
Using emulated /opt/wine-9.17/lib/wine/x86_64-unix/winspool.so
Using native(wrapped) libcups.so.2
Using native(wrapped) libvulkan.so.1
Using native(wrapped) libGL.so.1
0024:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION
Using emulated /opt/wine-9.17/lib/wine/x86_64-unix/avicap32.so
0024:fixme:wow:wow64_NtQuerySystemInformation unsupported class 7
0024:fixme:wow:wow64_NtQuerySystemInformation unsupported class 80
0024:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_CACHE_INFORMATION
0024:fixme:wow:wow64_NtQuerySystemInformation unsupported class 33
0024:fixme:wow:wow64_NtQuerySystemInformation unsupported class 45
0024:fixme:wow:wow64_NtQuerySystemInformation unsupported class 61
0024:fixme:wow:wow64_NtQuerySystemInformation unsupported class 18
0024:fixme:wow:wow64_NtQuerySystemInformation unsupported class 42
0024:fixme:d3d:resource_check_usage Unhandled usage flags 0x10.
0024:fixme:win:WINNLSEnableIME hwnd 00040052 enable 0: stub!
0024:fixme:d3d:resource_check_usage Unhandled usage flags 0x10.
0024:fixme:d3d:resource_check_usage Unhandled usage flags 0x10.
0024:fixme:d3d:resource_check_usage Unhandled usage flags 0x10.
0024:fixme:d3d:resource_check_usage Unhandled usage flags 0x10.
0024:fixme:d3d:resource_check_usage Unhandled usage flags 0x10.
0024:fixme:d3d:resource_check_usage Unhandled usage flags 0x10.
0024:fixme:d3d:resource_check_usage Unhandled usage flags 0x10.
Using emulated /opt/wine-9.17/lib/wine/x86_64-unix/winepulse.so
Using native(wrapped) libpulse.so.0
realloc(): invalid pointer
Segmentation fault (コアダンプ)


@pdapandapda
Copy link
Author

After reverting box64 to 0.31 commit 08085be, things worked again.

@ptitSeb
Copy link
Owner

ptitSeb commented Dec 22, 2024

Oh, I broken wow64? I'll check (as I'm focussing on box32 lately, I use only Wine 64bits and not Wine Wow64 anywmore).

@ptitSeb
Copy link
Owner

ptitSeb commented Dec 22, 2024

So, I tried a few 32bits games with wine 9.20 wow64 with latest box64 and did not reproduced the issue. Did you tried with latest box64 version?

(also why did you revert to a v0.3.1 version?)

@pdapandapda
Copy link
Author

pdapandapda commented Dec 22, 2024

So, I tried a few 32bits games with wine 9.20 wow64 with latest box64 and did not reproduced the issue. Did you tried with latest box64 version?

(also why did you revert to a v0.3.1 version?)

That was the lasted deb I could find yesterday. Yes , the l4t-megascript added a repo that compile the box64 everyday. This is the latest commit that worked 28fb1bb.https://github.com/ryanfortner/box64-debs/blob/c32fccb7e71c98faa1c79dde2dbf28c131603d62/debian/box64-tegrax1_0.3.3%2B20241217.28fb1bb-1_arm64.deb
Definitely,the wine can actually run the Initialiazation menus of the games, but when booting into the games, the realloc() error happens, should I record a video to describe it?

@ptitSeb
Copy link
Owner

ptitSeb commented Dec 22, 2024

So, I tried a few 32bits games with wine 9.20 wow64 with latest box64 and did not reproduced the issue. Did you tried with latest box64 version?
(also why did you revert to a v0.3.1 version?)

That was the lasted deb I could find yesterday. Yes , the l4t-megascript added a repo that compile the box64 everyday. This is the latest commit that worked 28fb1bb.https://github.com/ryanfortner/box64-debs/blob/c32fccb7e71c98faa1c79dde2dbf28c131603d62/debian/box64-tegrax1_0.3.3%2B20241217.28fb1bb-1_arm64.deb Definitely,the wine can actually run the Initialiazation menus of the games, but when booting into the games, the realloc() error happens, should I record a video to describe it?

No, a video will not help me. I need to reproduce the issue on my side to be able to debug.

@Vitty85
Copy link

Vitty85 commented Dec 23, 2024

I had same issue, I reproduced the error with this app too: https://github.com/WagicProject/wagic/releases/download/wagic-v0.24.0/Wagic-windows.zip

Same env I'm using Ubuntu on switch with wine.

@ar37-rs
Copy link

ar37-rs commented Dec 26, 2024

Sometimes working great, sometimes crashing when not using dxvk as well, like when trying to start zuma (wined3d). issue realloc(), malloc() still appears per built (2024-12-25).
Screenshot_2024-12-26
https://github.com/user-attachments/assets/622b2c25-3773-49bd-b5b2-185dbbc04a5d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants