PDA

View Full Version : Problems running JKA code in .NET and debug


RenegadeOfPhunk
11-27-2003, 05:15 PM
Hi,

Anybody tried running the JKA code in debug in .NET yet?

I can get the code to start running, and I can put in breakpoints etc, but it's crashing before it get's to displaying the main menu.

The crash is in ui_shared.c line 7598. The function is:

qboolean ItemParse_asset_model_go

, and the name being passed in is:

models/players/jedi_tf/model.glm...

Anybody got any ideas?

RenegadeOfPhunk
11-27-2003, 08:37 PM
Don't worry -I've worked it out...

...I haden't downloaded the 1.01 patch yet - LOL!

MasterSidious
11-27-2003, 09:43 PM
lol;)

razorace
11-28-2003, 06:38 PM
n00b :D

RenegadeOfPhunk
11-28-2003, 06:47 PM
..heh -harsh but fair! ;)

..gotta stop playing JO!

recombinant
12-14-2003, 12:33 AM
Out of curiosity, Renegade, what happens when you run the game in debug mode and you hit a breakpoint?

Does it just bounce you out of the game into the IDE, at which point you can inspect your variables, etc.?

I've not tried any debugging yet... I don't even have JKA, but it should be arriving soon. I just wanted to know what I should expect...

Thanks!

:D

razorace
12-14-2003, 02:09 AM
That's how it works on my copy of VS 7.0.

But I'm a total VS debug n00b, what do I do to check what the current varible values are?

RenegadeOfPhunk
12-14-2003, 08:47 AM
Does it just bounce you out of the game into the IDE, at which point you can inspect your variables, etc.?


Yeap, you can do exactly this...

To put the breakpoint in any any line, just move your cursor to it and hit f9. (You'll see a red dot appear to the left of the line. TO get rid of it again, hit f9 again).

THen, if that code line get's run, execution will stop at that point, and you can do a lot of things including - yes - inspect variables.

A lot of 'simple' variables can just be inspected by hovering the cursor over them in the code itself. More compex data structures can be looked at by dragging them from the code into the 'watch' window. (If your watch window isn't present, go to Debug -> Windows and you can bring it up from there, along with lots of other helpful stuff)

Also something worth looking at sometimes is the Call Stack - very handy :) Shows you exactly which functions have been called to get to the code line your currently at...
...and if you double-click on entries in the call stack, it will jump to that function and point out the code line where it called the function lower in the stack.

recombinant
12-14-2003, 02:46 PM
Wow... lots of nice detail there.

I'm a seasoned VB/VS debugger user, but have never used it in the context of a game, though... so I didn't quite know what to expect when it hit a breakpoint.

I see that it behaves pretty much like I was hoping it would.

Thanks, Renegade!

:holosid:

recombinant
12-14-2003, 02:48 PM
As a follow-up question, does anyone here know if it's possible to run a dual-monitor setup and run the IDE on one monitor while running the game on another?

Just musing over the possibilities here...

:D

RenegadeOfPhunk
12-14-2003, 06:22 PM
does anyone here know if it's possible to run a dual-monitor setup and run the IDE on one monitor while running the game on another?


...yeap - that is possible.
...I know because that's exactly what I do :D

recombinant
12-14-2003, 09:40 PM
cool. how tricky is it to set up?

I've got a dual-monitor setup that I can use with (1) my laptop display connected to (2) a crt monitor. I'd like to try out the multiple-display development/debugging at some point.

Thanks!

:D

RenegadeOfPhunk
12-14-2003, 09:45 PM
Not tricky at all.

Just set up dual monitors as normal (standard Windows display properties), and display the IDE on your secondary monitor ...the game will probably only run on your primary monitor. (At least this is how it is for me...)
And then, just make sure the game doesn't run in fullscreen - otherwise the screen resolution on your second monitor will probably go a bit barmy...

As long as you do that - dual monitor debugging goodness ;)

recombinant
12-14-2003, 09:57 PM
Originally posted by RenegadeOfPhunk
Not tricky at all.
Oh good...

Just set up dual monitors as normal (standard Windows display properties), and display the IDE on your secondary monitor ...the game will probably only run on your primary monitor. (At least this is how it is for me...)
OK. I'll give it a shot. I don't currently have JKA yet, but when it arrives I'll try it out.

And then, just make sure the game doesn't run in fullscreen - otherwise the screen resolution on your second monitor will probably go a bit barmy...
So don't run the game in fullscreen. Gotcha.

As long as you know that - dual monitor debugging goodness ;)
w00t!!!!

Thanks!

:D

RenegadeOfPhunk
12-15-2003, 09:02 AM
No probs mate :cool:

recombinant
12-19-2003, 08:51 PM
OK... I just tried this out today and it is awesome - I've got the main game running on my primary display of my laptop, and the IDE is maximized on my secondary display...

I'm also quite impressed at the performance of the game in its windowed state - barely any lag at all!

This is going to help immensely. On my last round of modding for JKII, I found myself doing a multitude of debug messages to the console to track the goings-on under the hood, but now I can debug properly.

I'm sure I probably could have debugged the DLLs under VC6, but I really didn't know how to go about doing it, and for some reason I was not able to successfully run DLLs (only QVMs). Now, with the instructions Raven gives in the "MakeAMod_readme.txt" file, coupled the dual-monitor setup, it should go much smoother this time... ;)

Thanks again for the excellent tip! I'm getting excited about coding again! w00t!!!

:D

Fracman
12-20-2003, 08:34 AM
Hehe... WELCOME BACK, Recombinant :D

RenegadeOfPhunk
12-21-2003, 11:40 PM
:) Glad your liking your setup Recom.

It's handy as hell isn't it. No more Com_Printf 's all over the place :D

recombinant
12-22-2003, 01:18 AM
Originally posted by Fracman
Hehe... WELCOME BACK, Recombinant :D

Thanks, Fracman! Nice to be back...

:D

Wudan
12-22-2003, 03:41 AM
Good, good - now let's churn out some uber-Leet goodness.