http://bugs.winehq.org/show_bug.cgi?id=4275
------- Additional Comments From hverbeet@gmail.com 2007-12-02 15:20 ------- What makes you suspect refcounting there? Also, what does +heap show for output?
In case of the rthdribl demo it appears to try and allocate a way too large random amount of memory, which fails and causes the NULL pointer dereference. When that demo is run with +d3d9 (for me at least), it only tries to allocate 0x400 bytes of memory and gets further, which IMO suggests some kind of memory corruption.