SimpleNES icon indicating copy to clipboard operation
SimpleNES copied to clipboard

VS2022: Doesnt work in debug but in release mode

Open 29th-Day opened this issue 3 years ago • 4 comments

I imported the source into a visual studio 2022 solution and fixed any compiler errors. Now I can compile the program in debug and release mode, but debug mode either barely runs or throws runtime errors. However, everything works in release mode. Any suggestions where the problem could be?

29th-Day avatar Jun 01 '22 12:06 29th-Day

Can you post what errors you were getting?

amhndu avatar Jun 01 '22 12:06 amhndu

Microsoft Visual C++ Runtime Library

Debug Assertion Failed!

Program: \SimpleNES\x64\Debug\SimpleNES.exe File: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.3126\include\vector Line: 1742

Expression: vector subscript out of range


When I try to run the compiler in RELEASE mode, it works well and smooth with the ROMs I tested it with (Legend of Zelda and Super Mario Bros). In DEBUG mode, diffrent things happen:
1. LOZ: The code throws the described error
2. SMB: The code works and no runtime exception is thrown. But it freezes in the title screen.

Do you have any ideas, where the macro could be causing this exception? You surely have more overview over the project.

29th-Day avatar Jun 01 '22 13:06 29th-Day

which one did you fill in? because I had a block in the version with the sound that I posted in my github in the debug mode

in this version no problem here

SuzieQQ avatar Jun 04 '22 22:06 SuzieQQ

Can you run it with an active debugger? A stack trace would be very helpful. Please also pull the latest changes

amhndu avatar Aug 08 '22 14:08 amhndu

I've played SMB many times with the emulator and tried at least the beginning part of LoZ many times, this has never happened. I'm sorry but I'll have to close this as I can't reproduce.

amhndu avatar Aug 21 '22 15:08 amhndu

l studio 2022 solution and fixed any compiler errors. Now I can compile the program in debug and release mode, but debug mode either barely runs or throws runtime errors. However, everything works in release mode. Any suggestions where the problem could be?

Can you share your SimpleNES fork (with .sln solution)?

mediaexplorer74 avatar Oct 29 '22 09:10 mediaexplorer74