Forum

Problem with BengtQuake

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

Problem with BengtQuake

Postby hondobondo » Tue Jun 15, 2010 6:08 pm

stack overflow error. Can this be blindly increased?
hondobondo
 
Posts: 207
Joined: Tue Sep 26, 2006 2:48 am

Postby revelator » Tue Jun 15, 2010 8:21 pm

not blindly but yes it can be increased :)

tenebrae used a rather hefty stack 1 gig if memory serves me correctly, it does make load times a bit of a bitch though especially with loads of data.

look in sys_win.c from tenebrae and compare to standard quake source i dont remember all the changes but it was rather easy (about 5-6 lines of code) one being MAXIMUM_WIN_MEMORY value i think.
User avatar
revelator
 
Posts: 2567
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Postby Spike » Tue Jun 15, 2010 9:28 pm

@reckless:
1gb stack... wtf?...
I think you mean heap... which isn't the same as stack. :)

@hondobondo:
if its windows/operating system reporting the stack overflow then you probably have a bug.
windows gives you a default stack limit of 1mb.
if its a software renderer crash, then yeah, you can prolly just blindly increase the respective limit. From what I remember there was a check in the software renderer to detect if the stack grew too much. Which is fair enough if your stack overflowing will stomp on other stuff. On a real operating system, your operating system will 'safely' kill your program if it overflows.
Last edited by Spike on Tue Jun 15, 2010 9:57 pm, edited 1 time in total.
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby mh » Tue Jun 15, 2010 9:33 pm

Generally you can increase the stack size in your project properties, but I'd recommend running it in the debugger and finding out what's causing the overflow before doing this.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Postby Sajt » Wed Jun 16, 2010 12:29 am

I remember a comment in the Quake source saying that you should be careful what you put on the stack because they put a whole water-warp buffer (320*200=64000 bytes) on the stack in the renderer. I guess you could just increase the stack to 1MB or something. I haven't thought about that stuff since the DOS days...
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
Sajt
 
Posts: 1215
Joined: Sat Oct 16, 2004 3:39 am

Postby revelator » Wed Jun 16, 2010 10:25 am

my bad yes was heap been a while :)
User avatar
revelator
 
Posts: 2567
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

whoops

Postby hondobondo » Wed Jun 16, 2010 8:01 pm

sorry guys should've been more specific. it's crash to the quake console with "stack overflow" something like stack > 2000. i'll redo it and post the message later.
hondobondo
 
Posts: 207
Joined: Tue Sep 26, 2006 2:48 am


Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 1 guest