About the crash: Attach a debugger (Debug -> Start) and see where it crashes. Have you run the appropriate update3*.bat file?
Attach a debugger, I did it and here is the build log after it crashed:
Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
src
Adding source dir: D:\Downloads\codeblocks-code-r12201-trunk\src\
Adding source dir: D:\Downloads\codeblocks-code-r12201-trunk\src\
Adding file: D:\Downloads\codeblocks-code-r12201-trunk\src\devel31_64\codeblocks.exe
Changing directory to: D:/Downloads/codeblocks-code-r12201-trunk/src/devel31_64
Set variable: PATH=.;C:\wxWidgets-3.1.4\lib\gcc_dll;D:\Downloads\codeblocks-code-r12201-trunk\src\devel31_64;D:\Downloads\codeblocks-code-r12201-trunk\src\exchndl\win64\lib;C:\Program Files\CodeBlocks20\MinGW\bin;C:\Program Files\CodeBlocks20\MinGW;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\Git\cmd;C:\Program Files\CodeBlocks\MinGW\bin;C:\TDM-GCC-64\bin;D:\Downloads\zip300xn-x64;C:\Program Files\TortoiseGit\bin;C:\Users\aideb\AppData\Local\Microsoft\WindowsApps;C:\Users\aideb\AppData\Local\GitHubDesktop\bin
Starting debugger: C:\Program Files\CodeBlocks20\MINGW\bin\gdb.exe -nx -fullname -quiet -args D:/Downloads/codeblocks-code-r12201-trunk/src/devel31_64/codeblocks.exe
done
Setting breakpoints
Debugger name and version: GNU gdb (GDB) 8.1
Child process PID: 8
In ntdll!RtlIsNonEmptyDirectoryReparsePointAllowed () (C:\Windows\SYSTEM32\ntdll.dll)
#22 0x000000006edcafcc in wxNavigationEnabled<wxWindow>::~wxNavigationEnabled (this=0x20854910, __in_chrg=<optimized out>) at C:/wxWidgets-3.1.4/include/wx/containr.h:189
C:\wxWidgets-3.1.4\include\wx\containr.h:189:6912:beg:0x6edcafcc
At C:\wxWidgets-3.1.4\include\wx\containr.h:189
I am not sure I did the debugger right though ( I opened the CodeBlocks_wx31_64.cbp project and just debugged it like I would in a console program).
Yeah I ran the appropriate update3*.bat file but I will build the patch from the beginning just to be sure. Will tell you what happens.