http://bugs.winehq.org/show_bug.cgi?id=15033
Summary: intermittant crashes while playing bf1942 Product: Wine Version: CVS/GIT Platform: Other OS/Version: other Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-d3d AssignedTo: wine-bugs@winehq.org ReportedBy: jeffzaroyko@gmail.com
Created an attachment (id=15678) --> (http://bugs.winehq.org/attachment.cgi?id=15678) backtrace
wine-1.1.3-51-g05a2c56, nv 8800 GTS, 177.13
Somewhere around 15-20 minutes of play, the attached crash occurs in wined3d.
http://bugs.winehq.org/show_bug.cgi?id=15033
Jeff Zaroyko jeffzaroyko@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression
http://bugs.winehq.org/show_bug.cgi?id=15033
Jeff Zaroyko jeffzaroyko@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |stefan@codeweavers.com
--- Comment #1 from Jeff Zaroyko jeffzaroyko@gmail.com 2008-08-27 07:53:31 --- reverting this commit appears to resolve the issue http://source.winehq.org/git/wine.git/?a=commit;h=f39e1224774a4f975951ccbc7d...
http://bugs.winehq.org/show_bug.cgi?id=15033
--- Comment #2 from Jeff Zaroyko jeffzaroyko@gmail.com 2008-09-01 04:07:46 --- Seems to be a memory leak somewhere. I added an assertion in gen_arbfp_ffp_shader on buffer.buffer after the HeapAlloc. top also shows that the resident memory usage grows to 2GB instead of hovering around the normal 700-800.
arb_program_shader.c:2687: gen_arbfp_ffp_shader: Assertion `buffer.buffer' failed
http://bugs.winehq.org/show_bug.cgi?id=15033
Jeff Zaroyko jeffzaroyko@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #15770|0 |1 is obsolete| |
--- Comment #3 from Jeff Zaroyko jeffzaroyko@gmail.com 2008-09-01 06:32:26 --- Created an attachment (id=15770) --> (http://bugs.winehq.org/attachment.cgi?id=15770) proposed patch
--- Comment #4 from Jeff Zaroyko jeffzaroyko@gmail.com 2008-09-03 06:24:21 --- Created an attachment (id=15803) --> (http://bugs.winehq.org/attachment.cgi?id=15803) fixed both the memory leak and a performance regression
HeapAlloc is too slow for this function, it causes a noticable drop in framerate. Allocating an automatic array SHADER_PGMSIZE in length fixes this.
http://bugs.winehq.org/show_bug.cgi?id=15033
edward savage epssyis@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |epssyis@gmail.com
--- Comment #5 from edward savage epssyis@gmail.com 2008-09-03 07:05:45 --- This bug is also effecting EVE Onlines EP 1.1 patch.
The patch supplied by Jeff fixes the memory leak and results in a dramatic improvement in game playability. This includes window switching, overall memory usage, faster 'grid' loading, and general responsiveness.
Many thanks.
http://bugs.winehq.org/show_bug.cgi?id=15033
Jeff Zaroyko jeffzaroyko@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
--- Comment #6 from Jeff Zaroyko jeffzaroyko@gmail.com 2008-09-03 07:13:52 --- patch sent http://www.winehq.org/pipermail/wine-patches/2008-September/060765.html
http://bugs.winehq.org/show_bug.cgi?id=15033
Stefan Dösinger stefandoesinger@gmx.at changed:
What |Removed |Added ---------------------------------------------------------------------------- CC|stefan@codeweavers.com |stefandoesinger@gmx.at
--- Comment #7 from Stefan Dösinger stefandoesinger@gmx.at 2008-09-03 09:36:00 --- The problem is that the fixed function pipeline description contains 3 padding bytes which are uninitialized, but still processed in the hash function. Thus we have 3 bytes adding random data, thus we are constantly generating new shaders. I'll send a patch for this.
Your patch is not correct because (I think) shader_addline may HeapReAlloc the buffer if it runs out of space
http://bugs.winehq.org/show_bug.cgi?id=15033
--- Comment #8 from Stefan Dösinger stefandoesinger@gmx.at 2008-09-03 10:17:51 --- Beyond this there's obviously a HeapFree missing...
http://bugs.winehq.org/show_bug.cgi?id=15033
--- Comment #9 from Jeff Zaroyko jeffzaroyko@gmail.com 2008-09-03 10:22:24 --- (In reply to comment #8)
Beyond this there's obviously a HeapFree missing...
Yeah, I added that in my first patch but noticed the performance issues and tried without HeapAlloc. Thanks for looking into this and the feedback.
http://bugs.winehq.org/show_bug.cgi?id=15033
Roy Marples roy@marples.name changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |roy@marples.name
--- Comment #10 from Roy Marples roy@marples.name 2008-09-03 17:54:21 --- + char pgmbuffer[SHADER_PGMSIZE];
- buffer.buffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, SHADER_PGMSIZE); + buffer.buffer = (char *)&pgmbuffer;
That looks wrong
+ buffer.buffer = pgmbuffer;
Should be right
char *foo; char foo[5];
The only difference between the two is that the former requires a malloc and the latter is of a fixed size.
http://bugs.winehq.org/show_bug.cgi?id=15033
--- Comment #11 from Jeff Zaroyko jeffzaroyko@gmail.com 2008-09-04 02:30:19 --- (In reply to comment #10)
- char pgmbuffer[SHADER_PGMSIZE];
- buffer.buffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
SHADER_PGMSIZE);
- buffer.buffer = (char *)&pgmbuffer;
That looks wrong
- buffer.buffer = pgmbuffer;
Should be right
char *foo; char foo[5];
The only difference between the two is that the former requires a malloc and the latter is of a fixed size.
It's not wrong, just redundant. The value of an array is a pointer to its first element, the addressof (&) the array is a pointer to an array of char of size SHADER_PGMSIZE and then casting that to char * is equivalent. It doesn't matter anyway, Stefan has pointed out that the patch is wrong due to the problem being elsewhere.
http://bugs.winehq.org/show_bug.cgi?id=15033
--- Comment #12 from Jeff Zaroyko jeffzaroyko@gmail.com 2008-09-05 07:58:10 --- Stefan,
Should I resend my original patch that only adds the HeapFree?
http://winehq.org/pipermail/wine-patches/2008-September/060623.html
http://bugs.winehq.org/show_bug.cgi?id=15033
--- Comment #13 from Stefan Dösinger stefandoesinger@gmx.at 2008-09-05 11:15:03 --- probably alexandre wanted my ok. Feel free to resend it, otherwise I'll send one myself later today
http://bugs.winehq.org/show_bug.cgi?id=15033
Jeff Zaroyko jeffzaroyko@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED
--- Comment #14 from Jeff Zaroyko jeffzaroyko@gmail.com 2008-09-08 11:38:18 --- no more crashes
http://bugs.winehq.org/show_bug.cgi?id=15033
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #15 from Alexandre Julliard julliard@winehq.org 2008-09-19 11:17:42 --- Closing bugs fixed in 1.1.5.
http://bugs.winehq.org/show_bug.cgi?id=15033
Jeff Zaroyko jeffz@jeffz.name changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|CVS/GIT |1.1.3