Post: #102-26-2017, 06:27 PM
I'm learning / studying cMangos code so that I can ultimately participate in the project
Here is my issue :
When I simply run cMangos ( either mangosd.exe from the "run" folder or "Debug / Start Debugging" from Vision Studio ), it works fine. No issues with the lvl 5 Hunter walking around and killing boars in the Alvimar area. When I enable breakpoints, so that I can step through the code, it works for a while as well, but eventually crashes.
To recreate the issue, I :
1. Open "win/mangosdVC140.sln" in Visual Studio after starting apache and mySql thru XAMPP
2. Launch "run/realmd.exe"
3. Debug => Start Debugging "win/mangosdVC140.sln".
4. Launch wow.exe. Login. Walk around for a while w/ my lvl 5 dwarf hunter.
5. In the .sln in Visual Studio, go into WorldSession::ExecuteOpcode method and place a breakpoint on the first statement :
6. Alt + Tab to Wow.exe, this causes above breakpoint to be hit. I start stepping over/into the code, looking at the call stack, autos/locals window, etcâ€¦Periodically, I Alt+Tab to wow.exe to see how / if client is effected by the code I am stepping over. After several of these Alt+Tabs, client freezes, and so does my machine. I can't Alt+Tab out of the client, I can't do "Cntl+Alt+Delete" to shut the client down, etc. I can't even move my mouse to properly restart my machine. I end up having to power my computer off, then back on. I have not detected any pattern as to it crashing at a specific spot in the codeâ€¦or even how many "Alt+Tabs" back to the client it takes to crash. Last time it was only two Alt+Tabs, but there were times it was more like 5 or 6.
Really appreciate if anyone can shed some light here: what is happening, and how I can study/debug the code w/out it constantly crashing my machine.