Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Recently I tried to compile and run the source code of Quake 3 engine. I basically followed this article. However it doesn't work for me.

I am using Visual Studio 2010 on Windows 7, with June 2010 DirectX SDK (I doubt if it is necessary). Here is how I did:

  1. Install the original version of Quake 3 Arena to "D:\Quake III Arena", and update to 1.32
  2. Download and extract the source code
  3. Open quake3.sln in "code" folder. Visual Studio upgraded it to 2010 format.
  4. Build all the 8 projects in Debug mode (in some order). I checked that every project had been built successfully
  5. In the properties of quake3 project, in Debugging page, I changed "Working Directory" to "$(TargetDir)" and "Command Arguments" to "+set fs_cdpath "D:\Quake III Arena""
  6. Set quake3 as the Startup Project and press F5

The game started and could correctly recognize the game folder and parse some options, such as screen resolution. However an exception window popped out before I can see the game main menu, saying "Unhandled exception at 0x053e9938 in quake3.exe: 0xC0000005: Access violation."

I tried to start the game from command line, but it had the same problem.

I followed the code and found that the exception was generated in int VM_CallCompiled(vm_t *vm, int *args), when executing call entryPoint in the __asm block, located in line 1148 of vm_x86.c. Since it's assembler code, I don't know how to debug it.

I don't know if anyone here knows about this problem. Could anyone provide some help on this? Thanks gratefully.

share|improve this question

closed as off-topic by Josh Petrie Jun 19 at 18:35

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about debugging a problem in your project must present a concise selection of code and context so as to allow a reader to diagnose the issue without needing to read all of your code or to engage in extensive back-and-forth dialog. For more information, see this meta thread." – Josh Petrie
If this question can be reworded to fit the rules in the help center, please edit the question.

    
Callstack? Look at the parameters of the functions, this might give you an idea. Looks like a NULL pointer access, look where this pointer is coming from. –  Maik Semder Jun 13 '11 at 12:56
    
Correction: not a NULL pointer, I was reading 0x00000005, however, did you run a debug build or release build? Try to build a debug build if you didnt do it yet. –  Maik Semder Jun 13 '11 at 14:00
    
Can you write the call stack?, this window can be shown in Debug->Windows->Call Stack –  momboco Jun 13 '11 at 14:03
    
This is probably an error inside the Q3VM, which is a byte code interpreter/JIT. Can you rebuild the game code as DLL:s instead of Q3VM and run that? vm_cgame 0, vm_game 0 and vm_ui 0 in your config to use native DLL:s instead of byte code. –  void Jun 13 '11 at 14:32
1  
@void Ah, I figured out, I have to add another parameter +set sv_pure 0. It was inspired from some comments in unix\ChangeLog. Thank all the people here. –  Jimmy Ji Jun 13 '11 at 16:02

1 Answer 1

up vote 7 down vote accepted

Add +set sv_pure 0 +set vm_game 0 +set vm_cgame 0 +set vm_ui 0 in the command line argument.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.