Ah, you were right, it was because I was missing MFC. I'm sorry; if I had known, I would have mentioned earlier that I was using VS Express.
I did get an exception when I closed the GUI editor, but it didn't lead back to the code.
Here are the messages that were logged right after the error. Most are in French though, so here's a summary: I got 16 messages about 'Thread Win32' stopping with the code 0, an access violation, and another two exceptions that were returned by the engine.
Code:
Le thread 'Thread Win32' (0x1038) s'est arrêté avec le code 0 (0x0).
Le thread 'Thread Win32' (0xca8) s'est arrêté avec le code 0 (0x0).
Le thread 'Thread Win32' (0x838) s'est arrêté avec le code 0 (0x0).
Le thread 'Thread Win32' (0x19c4) s'est arrêté avec le code 0 (0x0).
Le thread 'Thread Win32' (0x4a8) s'est arrêté avec le code 0 (0x0).
Le thread 'Thread Win32' (0x1014) s'est arrêté avec le code 0 (0x0).
Le thread 'Thread Win32' (0xfb0) s'est arrêté avec le code 0 (0x0).
Le thread 'Thread Win32' (0x116c) s'est arrêté avec le code 0 (0x0).
Le thread 'Thread Win32' (0x108) s'est arrêté avec le code 0 (0x0).
Le thread 'Thread Win32' (0x1134) s'est arrêté avec le code 0 (0x0).
Le thread 'Thread Win32' (0xa38) s'est arrêté avec le code 0 (0x0).
Le thread 'Thread Win32' (0x11d0) s'est arrêté avec le code 0 (0x0).
Le thread 'Thread Win32' (0x18b0) s'est arrêté avec le code 0 (0x0).
Le thread 'Thread Win32' (0x1750) s'est arrêté avec le code 0 (0x0).
Le thread 'Thread Win32' (0x428) s'est arrêté avec le code 0 (0x0).
Le thread 'Thread Win32' (0x16f8) s'est arrêté avec le code 0 (0x0).
Exception de première chance à 0x55b893c0 (gamex86.dll) dans DOOM3.exe : 0xC0000005: Violation d'accès lors de la lecture de l'emplacement 0x1d32d7f0.
Net_GetUDPPacket: WSANOTINITIALISED
Net_GetUDPPacket: WSANOTINITIALISED
From what I've read, the "Thread Win32" messages are normal.
The exception that comes after appears to involve my newly compiled gamex86.dll; as you said, it seems likely that the access violation was caused by improper freeing of memory.
I can't make heads or tails of the last two lines; all I could find out was that they probably came from a function called NET_ErrorString() in <sys/win32/win_net.cpp>.
I hate to post logs and ask others to tell me what they mean, but there's very little information online about these exceptions. Do you recognise any of these messages?
(Also, I should say, there's no rush. I greatly appreciate the help you've offered me so far, so
if you have any ideas, you can post them at any time.)