Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows stack overflow #116

Open
Buom01 opened this issue Oct 16, 2020 · 3 comments
Open

Windows stack overflow #116

Buom01 opened this issue Oct 16, 2020 · 3 comments

Comments

@Buom01
Copy link
Member

Buom01 commented Oct 16, 2020

Hi,
I found why master branch binary doesn't run with a Stack Overflow error. There aren't recursions error, but two BIG tables.

Both in cl_console.ccp, there are

	char		text[CON_TEXTSIZE];
	vec4_t	text_color[CON_TEXTSIZE]; // New attribute of console_t

with #define CON_TEXTSIZE 163840

Particularly, in Con_CheckResize: You can comment everything separatly, but the binary will not work until you comment variables definitions:

	char		tbuf[CON_TEXTSIZE];
	vec4_t	tcbuf[CON_TEXTSIZE];

A simple solution is to reduce CON_TEXTSIZE to a reasonnable value. I suppose that it size were defined some time ago. The commit 38cbdc8 didn't touch CON_TEXTSIZE as seen in 38cbdc8#diff-fc5df3123cde35afd39dc251740cfdde6869b0349bc2124bcbfe9eb56b70df90

From there I have two suggestions:

  • Reducing CON_TEXTSIZE < 163840 / 4
  • Making console great again non verbose with useless information about pk3 loading and others, it's mostly a waste for most player, and there are already wrote into terminal (and maybe logs?)

Unfortunately, I will not create separate a pull request (as it's a time consuming pain to create a new branch not from my master and rebasing all my code not from it)

I will simply add a patch to #115

@dGr8LookinSparky
Copy link

* Making console ~great again~ non verbose with useless information about pk3 loading and others, it's mostly a waste for most player, and there are already wrote into terminal (and maybe logs?)

Very good idea! Perhaps there should be a cvar for enabling the ton of extra verbose info? It definitely would be nice to not lose the recent chat behind a ton of spam every time the map changes.

@Buom01 Buom01 changed the title Windows stack overflow (self resolving) Windows stack overflow Oct 16, 2020
@Buom01
Copy link
Member Author

Buom01 commented Oct 16, 2020

Yes, but I think I will read about it later. It doesn't sound complicated to make it in place.

I also realize that the new color color system use a lot of memory, mainly becausethe console (if I understand) allocate all the line even empty char, and colors are also allocated for theses char with a vec4_t per color which is really big ?

@dGr8LookinSparky
Copy link

I'd have to review again what I did before, but definitely more chars would be needed for the new custom hexadecimal color format I've added. Try out the command /colors .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants