Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Problems running JKA code in .NET and debug

Page: 1 of 1
 RenegadeOfPhunk
11-27-2003, 6:15 PM
#1
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, 9:37 PM
#2
Don't worry -I've worked it out...

...I haden't downloaded the 1.01 patch yet - LOL!
 MasterSidious
11-27-2003, 10:43 PM
#3
lol;)
 razorace
11-28-2003, 7:38 PM
#4
n00b :D
 RenegadeOfPhunk
11-28-2003, 7:47 PM
#5
..heh -harsh but fair! ;)

..gotta stop playing JO!
 recombinant
12-14-2003, 1:33 AM
#6
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, 3:09 AM
#7
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, 9:47 AM
#8
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, 3:46 PM
#9
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, 3:48 PM
#10
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, 7:22 PM
#11
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, 10:40 PM
#12
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, 10:45 PM
#13
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, 10:57 PM
#14
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, 10:02 AM
#15
No probs mate :cool:
 recombinant
12-19-2003, 9:51 PM
#16
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, 9:34 AM
#17
Hehe... WELCOME BACK, Recombinant :D
 RenegadeOfPhunk
12-22-2003, 12:40 AM
#18
:) 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, 2:18 AM
#19
Originally posted by Fracman
Hehe... WELCOME BACK, Recombinant :D

Thanks, Fracman! Nice to be back...

:D
 Wudan
12-22-2003, 4:41 AM
#20
Good, good - now let's churn out some uber-Leet goodness.
Page: 1 of 1