http://bugs.winehq.org/show_bug.cgi?id=18477
Summary: Need For Speed Most Wanted: Screen turns black after accepting video settings Product: Wine Version: 1.1.21 Platform: PC OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: lukasz.wojnilowicz@gmail.com
Created an attachment (id=21102) --> (http://bugs.winehq.org/attachment.cgi?id=21102) log after accepting video settings
I'm using Wine 1.1.21 (compiled from source using gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) ) on Fedora 10 i386.
The problem is that when i set something in video settings in NFS MW and try to accept that then i get black screen, the game doesn't hang because music is played. If i don't change anything and press accept then everything is ok.
The settings for this game are saved as DWORDS in registry
In terminal there is:
err:heap:HEAP_ValidateInUseArena Heap 0x110000: in-use arena 0x35287f0 next block has PREV_FREE flag
http://bugs.winehq.org/show_bug.cgi?id=18477
Florian mcflow-forum@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mcflow-forum@gmx.net
--- Comment #1 from Florian mcflow-forum@gmx.net 2009-05-15 05:55:26 --- Confirmed. Graphic settings can only be changed by using the regedit.
http://bugs.winehq.org/show_bug.cgi?id=18477
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1
--- Comment #2 from Vitaliy Margolen vitaliy@kievinfo.com 2009-05-15 07:46:44 --- Confirming per comment 2.
http://bugs.winehq.org/show_bug.cgi?id=18477
--- Comment #3 from NSLW lukasz.wojnilowicz@gmail.com 2009-09-11 12:41:43 --- It's still an issue in Wine 1.1.29
http://bugs.winehq.org/show_bug.cgi?id=18477
Ursan Marius Bogdan Creationn@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |Creationn@gmail.com
--- Comment #4 from Ursan Marius Bogdan Creationn@gmail.com 2009-12-28 01:47:44 --- The same thing happens under wine 1.1.35
http://bugs.winehq.org/show_bug.cgi?id=18477
--- Comment #5 from Wylda wylda@volny.cz 2010-05-28 07:50:43 --- Created an attachment (id=28349) --> (http://bugs.winehq.org/attachment.cgi?id=28349) console log from wine-1.2-rc1-142-ga72f3f3
Unfortunately this is still present, but now the console log looks better (provides backtrace). I can offer a debug log, if someone is interested :)
Tested under: * NFS MW v1.3 + crack (has SafeDisc v4.60 :-/) * wine-1.2-rc1-142-ga72f3f3 * nVidia GT240 195.36.24 * kernel 2.6.33.3 (patched ~ bug 20380)
http://bugs.winehq.org/show_bug.cgi?id=18477
Adam Bolte boltronics@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |boltronics@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=18477
Wylda wylda@volny.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |wylda@volny.cz
--- Comment #6 from Wylda wylda@volny.cz 2010-08-21 00:15:46 ---
Still present in wine-1.3.1. Back-trace didn't changed much since comment #5.
http://bugs.winehq.org/show_bug.cgi?id=18477
--- Comment #7 from Luis Alvarado luisalvaradox@gmail.com 2011-10-04 21:57:38 CDT --- Confirmed on 1.3.27, 1.3.28 and 1.3.29. any change to the video settings results in black screen and after a couple of seconds crash.
http://bugs.winehq.org/show_bug.cgi?id=18477
Adam Maćkowiak Admc@ufurmix.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |Admc@ufurmix.org
--- Comment #8 from Adam Maćkowiak Admc@ufurmix.org 2012-01-24 06:18:37 CST --- Still present in wine 1.3.36
http://bugs.winehq.org/show_bug.cgi?id=18477
Bavani wakingbavani@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |wakingbavani@gmail.com
--- Comment #9 from Bavani wakingbavani@gmail.com 2012-04-30 01:07:49 CDT --- This bug is still present in wine 1.4
http://bugs.winehq.org/show_bug.cgi?id=18477
Ursan Marius Bogdan Creationn@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC|Creationn@gmail.com |
http://bugs.winehq.org/show_bug.cgi?id=18477
Damian Ivanov damianatorrpm@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |damianatorrpm@gmail.com
--- Comment #10 from Damian Ivanov damianatorrpm@gmail.com 2012-05-12 03:27:58 CDT --- Bug still present in 1.5.3.
Also I found out that using software render swiftshader from transgaming (which is very slow) this bug does NOT occur. Video settings can be changed without problem.
http://bugs.winehq.org/show_bug.cgi?id=18477
joaopa jeremielapuree@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree@yahoo.fr
--- Comment #11 from joaopa jeremielapuree@yahoo.fr 2012-05-12 12:40:40 CDT --- Is it possible to have a new backtrace? The previous one is very old.
http://bugs.winehq.org/show_bug.cgi?id=18477
--- Comment #12 from Damian Ivanov damianatorrpm@gmail.com 2012-07-10 06:31:42 CDT --- Created attachment 40950 --> http://bugs.winehq.org/attachment.cgi?id=40950 console output
http://bugs.winehq.org/show_bug.cgi?id=18477
--- Comment #13 from Damian Ivanov damianatorrpm@gmail.com 2012-07-10 06:32:30 CDT --- Bug still present in 1.5.8
Also I found out that using software render swiftshader from transgaming (which is very slow) this bug does NOT occur. Video settings can be changed without problem.
http://bugs.winehq.org/show_bug.cgi?id=18477
Wylda wylda@volny.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #21102|0 |1 is obsolete| | Attachment #28349|0 |1 is obsolete| | Attachment #40950|0 |1 is obsolete| |
--- Comment #14 from Wylda wylda@volny.cz 2012-07-15 05:30:31 CDT --- Created attachment 41003 --> http://bugs.winehq.org/attachment.cgi?id=41003 Console log from wine-1.5.8-160-g8613d5e.
(In reply to comment #11)
Is it possible to have a new backtrace? The previous one is very old.
Fresh log attached.
@Damian> Your log was missing debuging symbols.
http://bugs.winehq.org/show_bug.cgi?id=18477
--- Comment #15 from Henri Verbeet hverbeet@gmail.com 2012-07-16 09:21:05 CDT --- Created attachment 41016 --> http://bugs.winehq.org/attachment.cgi?id=41016 patch
The attached patch seems to help in the demo, but I'm not sure if it's the right thing to do. The application releases a reference it doesn't have on the (implicit) depth/stencil surface, which then ends up blocking the Reset() call because the surface now has a non-zero reference count.
http://bugs.winehq.org/show_bug.cgi?id=18477
Wylda wylda@volny.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Need For Speed Most Wanted: |Need For Speed Most Wanted |Screen turns black after |crashes after accepting |accepting video settings |video settings changes
--- Comment #16 from Wylda wylda@volny.cz 2012-07-16 15:09:52 CDT ---
Hi Henri, thank you for taking time with this bug. It fixes full version too :-)
http://bugs.winehq.org/show_bug.cgi?id=18477
MD.IMAM HOSSAIN imamdxl8805@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |imamdxl8805@gmail.com
--- Comment #17 from MD.IMAM HOSSAIN imamdxl8805@gmail.com 2012-11-19 08:45:40 CST --- (In reply to comment #15)
Created attachment 41016 [details] patch
The attached patch seems to help in the demo, but I'm not sure if it's the right thing to do. The application releases a reference it doesn't have on the (implicit) depth/stencil surface, which then ends up blocking the Reset() call because the surface now has a non-zero reference count.
is this merged to the master?
http://bugs.winehq.org/show_bug.cgi?id=18477
Paul Bredbury brebs@sent.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |brebs@sent.com
http://bugs.winehq.org/show_bug.cgi?id=18477
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download URL| |http://www.nfsplanet.com/nf | |smw_demo.php?lang=eng CC| |focht@gmx.net, | |wine-bugs@winehq.org Component|-unknown |directx-d3dx9
--- Comment #18 from Anastasius Focht focht@gmx.net --- Hello folks,
still present. Adding download link to demo.
Henri's patch (comment #15) has not been merged into master.
--- snip --- $ pwd /home/focht/.wine/drive_c/Program Files/EA GAMES/Need for Speed Most Wanted PC Demo
$ wine ./speedDemo.exe ... Unhandled exception: page fault on write access to 0x39e56b70 in 32-bit code (0x7bc4bd1c). ... Backtrace: =>0 0x7bc4bd1c list_remove+0xe(elem=0x339ee60) [/home/focht/projects/wine/wine-git/include/wine/list.h:100] in ntdll (0x0033f8f4)
1 0x7bc4ce7e HEAP_CreateFreeBlock+0xd6(subheap=0x2797000, ptr=0x333a888, size=0x645d0) [/home/focht/projects/wine/wine-git/dlls/ntdll/heap.c:595] in ntdll (0x0033f928)
2 0x7bc4d06b HEAP_MakeInUseBlockFree+0x132(subheap=0x2797000, pArena=0x339abd0) [/home/focht/projects/wine/wine-git/dlls/ntdll/heap.c:656] in ntdll (0x0033f968)
3 0x7bc504d8 RtlFreeHeap+0xfc(heap=<couldn't compute location>, flags=<couldn't compute location>, ptr=<couldn't compute location>) [/home/focht/projects/wine/wine-git/dlls/ntdll/heap.c:1771] in ntdll (0x0033f9c8)
4 0x7ec524f3 wined3d_buffer_decref+0x185(buffer=<couldn't compute location>) [/home/focht/projects/wine/wine-git/dlls/wined3d/buffer.c:572] in wined3d (0x0033fa48)
5 0x7ecfa1b5 state_unbind_resources+0x10e(state=0x143680) [/home/focht/projects/wine/wine-git/dlls/wined3d/stateblock.c:497] in wined3d (0x0033fa98)
6 0x7ec78094 wined3d_device_reset+0x130(device=<couldn't compute location>, swapchain_desc=<couldn't compute location>, mode=<couldn't compute location>, callback=<couldn't compute location>, reset_state=<couldn't compute location>) [/home/focht/projects/wine/wine-git/dlls/wined3d/device.c:4140] in wined3d (0x0033fc58)
7 0x7eda29d6 d3d9_device_Reset+0x132(iface=0x13e530, present_parameters=0x9398cc) [/home/focht/projects/wine/wine-git/dlls/d3d9/device.c:621] in d3d9 (0x0033fce8) 0x7bc4bd1c list_remove+0xe [/home/focht/projects/wine/wine-git/include/wine/list.h:100] in ntdll: movl %edx,0x4(%eax) 100 elem->next->prev = elem->prev; ... --- snip ---
$ sha1sum nfsmwdemo.exe 09ba787467321e1245420b2b6257271c1a24880e nfsmwdemo.exe
$ du -sh nfsmwdemo.exe 545M nfsmwdemo.exe
$ wine --version wine-1.7.8-248-g8dd9c61
Regards
http://bugs.winehq.org/show_bug.cgi?id=18477
Andrey Gusev andrey.goosev@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |andrey.goosev@gmail.com
--- Comment #19 from Andrey Gusev andrey.goosev@gmail.com --- Still in 1.7.16
https://bugs.winehq.org/show_bug.cgi?id=18477
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sebastian@fds-team.de
--- Comment #20 from Sebastian Lackner sebastian@fds-team.de --- Still present in wine-1.7.30-148-gafc6962.
I have added a rebased version of the patch to the staging tree:
https://github.com/wine-compholio/wine-staging/blob/master/patches/d3d9-Surf...
https://bugs.winehq.org/show_bug.cgi?id=18477
--- Comment #21 from Andrey Gusev andrey.goosev@gmail.com --- (In reply to Sebastian Lackner from comment #20)
Still present in wine-1.7.30-148-gafc6962.
I have added a rebased version of the patch to the staging tree:
https://github.com/wine-compholio/wine-staging/blob/master/patches/d3d9- Surface_Refcount/
I get this:
fixme:d3d:fixed_get_input Unsupported input stream [usage=WINED3D_DECL_USAGE_TANGENT, usage_idx=0]. err:d3d9:d3d9_surface_Release Surface doesn't have any references.
wine-1.7.51-133-g9061ee4
https://bugs.winehq.org/show_bug.cgi?id=18477
Michael Müller michael@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |STAGED CC| |michael@fds-team.de Staged patchset| |https://github.com/wine-com | |pholio/wine-staging/tree/ma | |ster/patches/d3d9-Surface_R | |efcount
https://bugs.winehq.org/show_bug.cgi?id=18477
--- Comment #22 from Rafał Mużyło galtgendo@o2.pl --- I'm seeing a very similar crash in a different app, where this patch doesn't help - the crash still happens.
=>0 0x7ef5f63e HEAP_CreateFreeBlock+0x36e(subheap=0x2160000, ptr=0x2160028, size=0x6040) [wine-1.7.53/include/wine/list.h:100] in ntdll (0x0033f748) 1 0x7ef5f904 HEAP_MakeInUseBlockFree+0x183(subheap=0x2160000, pArena=<is not available>) [wine-1.7.53/dlls/ntdll/heap.c:655] in ntdll (0x0033f7e8) 2 0x7ef6064a RtlFreeHeap+0xc9(heap=<couldn't compute location>, flags=<couldn't compute location>, ptr=<couldn't compute location>) [wine-1.7.53/dlls/ntdll/heap.c:1770] in ntdll (0x0033f858) 3 0x7e1d7f52 wined3d_resource_free_sysmem+0x31(resource=0x25085e8) [wine-1.7.53/dlls/wined3d/resource.c:322] in wined3d (0x0033f888) 4 0x7e1d8606 resource_cleanup+0x65(resource=0x25085e8) [wine-1.7.53/dlls/wined3d/resource.c:238] in wined3d (0x0033f8c8) 5 0x7e217636 surface_cleanup+0x245(surface=<is not available>) [wine-1.7.53/dlls/wined3d/surface.c:103] in wined3d (0x0033f918) 6 0x7e219194 wined3d_surface_destroy+0x53(surface=<is not available>) [wine-1.7.53/dlls/wined3d/surface.c:110] in wined3d (0x0033f948) 7 0x7e22b626 wined3d_texture_cleanup+0x55(texture=0x25103e8) [wine-1.7.53/dlls/wined3d/texture.c:127] in wined3d (0x0033f988) 8 0x7e22dc34 wined3d_texture_decref+0x73(texture=<couldn't compute location>) [wine-1.7.53/dlls/wined3d/texture.c:415] in wined3d (0x0033f9c8) 9 0x7e2c49f3 in d3d9 (+0x249f2) (0x0033fa28)
On a potentially interesting note: LIBGL_ALWAYS_SOFTWARE makes no difference toward the crash, but LIBGL_ALWAYS_INDIRECT in a way does, it triggers a somewhat different crash almost immediately:
=>0 0x7e2c2b12 d3d9_texture_2d_UnlockRect+0x52(iface=<couldn't compute location>, level=<couldn't compute location>) [wine-1.7.53/dlls/d3d9/texture.c:378] in d3d9 (0x0033f958) 0x7e2c2b12 d3d9_texture_2d_UnlockRect+0x52 [wine-1.7.53/dlls/d3d9/texture.c:378] in d3d9: call *0x38(%edx)
https://bugs.winehq.org/show_bug.cgi?id=18477
--- Comment #23 from Rafał Mużyło galtgendo@o2.pl --- So, just dropping a note about an odd, though somewhat interesting result.
My crash was fixed, when in dlls/wined3d/resource.c, in 'BOOL wined3d_resource_allocate_sysmem(struct wined3d_resource *resource)' I've added 32 to HeapAlloc size argument. The surface getting corrupted was a 16bit 256x32 one, so 32 wouldn't cover even a single column, which given the data is written by rows... Still don't know why this particular value worked (16 didn't).
This was found after a hint from Stefan Dösinger to use WINEDEBUG=warn+heap, which prevented the crash, but was sending errors due to corruption still taking place.
https://bugs.winehq.org/show_bug.cgi?id=18477
--- Comment #24 from Rafał Mużyło galtgendo@o2.pl --- ...so, yeah, was too optimistic...
32 helps with the easy to trigger crash, but not some of the more difficult, so the value probably does depend on the resource size, just the formula is somewhat tricky...
Did more testing then - for the first crash: 24 fixes, 20 doesn't.
https://bugs.winehq.org/show_bug.cgi?id=18477
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
https://bugs.winehq.org/show_bug.cgi?id=18477
Sergey Isakov isakov-sl@bk.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |isakov-sl@bk.ru
--- Comment #25 from Sergey Isakov isakov-sl@bk.ru --- I confirm the crash as in comment 18. ~~~ Backtrace: =>0 0x7bc41a39 HEAP_CreateFreeBlock+0x179() in ntdll (0x0033fb08) 1 0x7bc3faa1 HEAP_MakeInUseBlockFree+0xf0() in ntdll (0x0033fb48) 2 0x7bc3f60b RtlFreeHeap+0x7a() in ntdll (0x0033fba8) 3 0x4002e4a0 wined3d_buffer_decref+0xef() in wined3d (0x0033fbe8) 4 0x400c36d2 state_unbind_resources+0xc1() in wined3d (0x0033fc08) 5 0x400503b1 wined3d_device_reset+0x120() in wined3d (0x0033fcd8) 6 0x3ebb5e42 d3d9_device_reset+0x131() in d3d9 (0x0033fd68) 7 0x3ebaf3b2 d3d9_device_Reset+0x61() in d3d9 (0x0033fd98) ~~~ I can say that it happens in state_unbind_resources() at lines ~~~ for (i = 0; i < MAX_STREAMS; ++i) //16 { if ((buffer = state->streams[i].buffer)) { state->streams[i].buffer = NULL; wined3d_buffer_decref(buffer); } } ~~~ at i=0
PS. Patch from wine-staging is obsolete. It can't be applied to wine-hq.
https://bugs.winehq.org/show_bug.cgi?id=18477
--- Comment #26 from Sebastian Lackner sebastian@fds-team.de --- (In reply to Sergey Isakov from comment #25)
PS. Patch from wine-staging is obsolete. It can't be applied to wine-hq.
Applies fine here.
https://bugs.winehq.org/show_bug.cgi?id=18477
--- Comment #27 from Sergey Isakov isakov-sl@bk.ru --- But I confirm, wine-staging 1.7.53 works without crash. Last message err:d3d9:d3d9_surface_Release Surface doesn't have any references.
https://bugs.winehq.org/show_bug.cgi?id=18477
--- Comment #28 from Sergey Isakov isakov-sl@bk.ru --- (In reply to Sebastian Lackner from comment #26)
(In reply to Sergey Isakov from comment #25)
PS. Patch from wine-staging is obsolete. It can't be applied to wine-hq.
Applies fine here.
OK, updated patch from your git is good. Now the problem is resolved! Thanks.
https://bugs.winehq.org/show_bug.cgi?id=18477
--- Comment #29 from Wylda wylda@volny.cz --- Still present in wine-2.0-rc5.
https://bugs.winehq.org/show_bug.cgi?id=18477
Matteo Bruni matteo.mystral@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|directx-d3dx9 |directx-d3d
https://bugs.winehq.org/show_bug.cgi?id=18477
winetest@luukku.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |winetest@luukku.com
--- Comment #30 from winetest@luukku.com --- http://source.winehq.org/git/wine.git/commit/d39630fc396b0f732b49e9bbc29669c...
Fixed?
https://bugs.winehq.org/show_bug.cgi?id=18477
Andrey Gusev andrey.goosev@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|STAGED |RESOLVED Fixed by SHA1| |d39630fc396b0f732b49e9bbc29 | |669c62338248f Resolution|--- |FIXED
--- Comment #31 from Andrey Gusev andrey.goosev@gmail.com --- Confirm that works.
https://bugs.winehq.org/show_bug.cgi?id=18477
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #32 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 2.2.
https://bugs.winehq.org/show_bug.cgi?id=18477
Michael Stefaniuc mstefani@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |2.0.x
https://bugs.winehq.org/show_bug.cgi?id=18477
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|2.0.x |---
--- Comment #33 from Michael Stefaniuc mstefani@winehq.org --- Removing the 2.0.x milestone from bugs included in 2.0.1.