Fix for Rayman 2 crash on Woods of Light and other levels - make DEP exception or restore def. settings

For discussions about the Rayman series.

Moderator: English moderators

Forum rules
Please keep the forum rules and guidelines in mind when creating or replying to a topic.
Post Reply
deton24
Garatta Ciatik
Posts: 1141
Joined: Fri Jan 14, 2011 1:22 am
Location: Poland
Tings: 8652

Fix for Rayman 2 crash on Woods of Light and other levels - make DEP exception or restore def. settings

Post by deton24 »

Hi. I recently encountered crashes during loading of certain levels in Rayman 2.
E.g. in Woods of Light, Fairly Glade, Whale Bay;
while Prologue, Sanctuary of Stone and Fire, Echoing Caves cinematic, The Menhir Hills PT1 worked fine.

The problem touched few other people, and while starting a new game, it crashed on Woods of Light for everyone.
No matter of used game version (Uplay, GOG), renderer (DX6, Glide), sound drivers (w/ w/o dsound, w/ w/o A3D)
OS: W10 x64 (and posibly 8.x too)

Creating DEP exception helped to get rid of it.
Here is how to do that:
https://i.ytimg.com/vi/7IVC4Uwop3s/maxresdefault.jpg
https://www.trishtech.com/img_art/vista ... tion_2.jpg

Actually it shouldn't happen when you have default settings of DEP in your system (so enabled only for essential system services, so w/o exceptions).
https://i.stack.imgur.com/N9P74.png


Technical details:

After enabling debugger just in time in Visual Studio, it showed:

Unhandled exception at 0x1DF31FF8 in Rayman2.exe: 0xC0000005: Access violation executing location 0x1DF31FF8

Nieobsłużony wyjątek w lokalizacji 0x1A7C1FF8 w Rayman2.exe: 0xC0000005: Naruszenie zasad dostępu podczas wykonywania w lokalizacji 0x1A7C1FF8.: wystąpił wyjątek

In programming jargon 0xC0000005 means more or less, access violation.

After some research i found some posts about 0xC0000005:
"0xC0000005 is the code for an access violation. It happens when you access (read or write) an address that is not mapped to any physical memory or is protected (tried to write to read-only memory, for example). In this case your program tried to access 0x02fffdd8. The address 0x02fffdd8 is most likely just past the end of a heap block or just before a large mapped buffer.:"

On other issue connected with 0xC0000005:
"The problem here, as explained in other comments, is that the pointer is being dereference without being properly initialized. Operating systems like Linux keep the lowest addresses (eg first 32MB: 0x00_0000 -0x200_0000) out of the virtual address space of a process. This is done because dereferencing zeroed non-initialized pointers is a common mistake, like in this case. So when this type of mistake happens, instead of actually reading a random variable that happens to be at address 0x0 (but not the memory address the pointer would be intended for if initialized properly), the pointer would be reading from a memory address outside of the process's virtual address space. This causes a page fault, which results in a segmentation fault, and a signal is sent to the process to kill it. That's why you are getting the access violation error."

Seems like no one resolved the problem in other threads in the net before, so I'm leaving the info.

Cheers
Last edited by deton24 on Sat Dec 04, 2021 11:16 pm, edited 1 time in total.
Garo
Incrediball
Posts: 78
Joined: Sun Aug 08, 2021 1:37 pm
Location: Vegetables' HQ
Contact:
Tings: 390

Re: Fix for Rayman 2 crash on Woods of Light and other levels - make DEP exception or restore def. settings

Post by Garo »

deton24 wrote: Fri Apr 05, 2019 8:35 pm Hi. I recently encountered crashes during loading of certain levels in Rayman 2.
E.g. in Woods of Light, Fairly Glade, Whale Bay;
while Prologue, Sanctuary of Stone and Fire, Echoing Caves cinematic, The Menhir Hills PT1 worked fine.

The problem touched few other people, and while starting a new game, it crashed on Woods of Light for everyone.
No matter of used game version (Uplay, GOG), renderer (DX6, Glide), sound drivers (w/ w/o dsound, w/ w/o A3D)
OS: W10 x64 (and posibly 8.x too)

Creating DEP exception helped to get rid of it.
Here is how to do that:
https://i.ytimg.com/vi/7IVC4Uwop3s/maxresdefault.jpg
https://www.trishtech.com/img_art/vista ... tion_2.jpg
Hm I did make a DEP exception for Rayman2.exe but it did not fix the crashing. Has someone made a real patch for this glitch yet? If so please let me know because I really want to play this game.
"Troublesome isn't it, and untidy too." - The Magician from Rayman
dr_st
Eig
Posts: 1705
Joined: Sat Aug 25, 2012 5:52 pm
Tings: 40813

Re: Fix for Rayman 2 crash on Woods of Light and other levels - make DEP exception or restore def. settings

Post by dr_st »

deton24 wrote: Fri Apr 05, 2019 8:35 pm Actually it shouldn't happen when you have default settings of DEP in your system (so enabled only for essential system services, so w/o exceptions).
https://i.stack.imgur.com/N9P74.png
Then why not just leave it at the default setting, or revert to it? I doubt most people actually need to enable DEP everywhere for their workflows.
Garo wrote: Sun Aug 08, 2021 5:54 pm Hm I did make a DEP exception for Rayman2.exe but it did not fix the crashing. Has someone made a real patch for this glitch yet? If so please let me know because I really want to play this game.
Maybe it's a different cause? My DEP is at the default settings (W10 x64), and I just installed the GOG version and could not reproduce the crash.
deton24
Garatta Ciatik
Posts: 1141
Joined: Fri Jan 14, 2011 1:22 am
Location: Poland
Tings: 8652

Re: Fix for Rayman 2 crash on Woods of Light and other levels - make DEP exception or restore def. settings

Post by deton24 »

Garo wrote: Sun Aug 08, 2021 5:54 pm Hm I did make a DEP exception for Rayman2.exe but it did not fix the crashing. Has someone made a real patch for this glitch yet? If so please let me know because I really want to play this game.
Does it happen in the beginning of the game? Or maybe you cannot load it even to the main menu?

I've run into a crash on Menhir Hills Part 3 today. I couldn't reproduce it more than once or twice. It just disappeared permanently or happens only during the whole level walkthrough (later I was loading Part 3 with a OpenSpaceToolbox).

I checked the event log, and it was connected with ddraw.dll which is dgvoodo dx6 wrapper.
I wonder if your crash is connected with ddraw too. Maybe you could change the renderer to Glide or just update your ddraw.dll wrapper or replace it.
Trigger the crash and provide you crash log from event viewer.

If the crash happens in the same section of the game, you can use this tool to load a specific part of the game as a workaround:
https://github.com/raytools/OpenSpaceToolbox/releases
Double-click on a level and its specific part, and it will load it. Just load your save before, otherwise you won't be able to grab purple lums.

_________________________________

edit. Dec2021

I encountered a crash in a new game in Woods of Lights in the first cinematic. It was random, did not appear again in the same place again and it was connecterd with A3D enabled with Alchemy. Looks like after longer gameplay such crashes still may occur. I leaving event logs:

Nazwa aplikacji powodującej błąd: Rayman2.exe, wersja: 0.0.0.0, sygnatura czasowa: 0x3807b68b
Nazwa modułu powodującego błąd: WAVA1bvr.dll, wersja: 0.0.0.0, sygnatura czasowa: 0x3845b281
Kod wyjątku: 0xc0000005
Przesunięcie błędu: 0x0000e59e

Nazwa aplikacji powodującej błąd: Rayman2.exe, wersja: 0.0.0.0, sygnatura czasowa: 0x3807b68b
Nazwa modułu powodującego błąd: DSOUND.dll, wersja: 2.4.2.18, sygnatura czasowa: 0x5cda1b5a
Kod wyjątku: 0xc0000005
Przesunięcie błędu: 0x0001be66
Post Reply