Inside3D!
     

Problem with BengtQuake

 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> Engine Programming
View previous topic :: View next topic  
Author Message
hondobondo



Joined: 26 Sep 2006
Posts: 102

PostPosted: Tue Jun 15, 2010 6:08 pm    Post subject: Problem with BengtQuake Reply with quote

stack overflow error. Can this be blindly increased?
Back to top
View user's profile Send private message
reckless



Joined: 24 Jan 2008
Posts: 390
Location: inside tha debugger

PostPosted: Tue Jun 15, 2010 8:21 pm    Post subject: Reply with quote

not blindly but yes it can be increased Smile

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.
Back to top
View user's profile Send private message
Spike



Joined: 05 Nov 2004
Posts: 944
Location: UK

PostPosted: Tue Jun 15, 2010 9:28 pm    Post subject: Reply with quote

@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.
_________________
What's a signature?


Last edited by Spike on Tue Jun 15, 2010 9:57 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
mh



Joined: 12 Jan 2008
Posts: 910

PostPosted: Tue Jun 15, 2010 9:33 pm    Post subject: Reply with quote

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.
_________________
DirectQ Engine - New release 1.8.666a, 9th August 2010
MHQuake Blog (General)
Direct3D 8 Quake Engines
Back to top
View user's profile Send private message Visit poster's website
Sajt



Joined: 16 Oct 2004
Posts: 1026

PostPosted: Wed Jun 16, 2010 12:29 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
reckless



Joined: 24 Jan 2008
Posts: 390
Location: inside tha debugger

PostPosted: Wed Jun 16, 2010 10:25 am    Post subject: Reply with quote

my bad yes was heap been a while Smile
Back to top
View user's profile Send private message
hondobondo



Joined: 26 Sep 2006
Posts: 102

PostPosted: Wed Jun 16, 2010 8:01 pm    Post subject: whoops Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> Engine Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2004 phpBB Group