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 - MP2 Ground Zero crash when loading rlava1 #277

Closed
abalfoort opened this issue Apr 26, 2023 · 6 comments
Closed

Windows - MP2 Ground Zero crash when loading rlava1 #277

abalfoort opened this issue Apr 26, 2023 · 6 comments

Comments

@abalfoort
Copy link

Assertion failure in vertex_buffer.c:

src/refresh/vkpt/vertex_buffer.c:659: vkpt_light_buffer_upload_to_staging: Assertion `bsp_mesh->num_light_polys + num_model_lights < MAX_LIGHT_POLYS' failed.

MAX_LIGHT_POLYS is set to 4096.

Values on assertion failure:

		bsp_mesh->num_light_polys	5332	int
		num_model_lights	0	int
@abalfoort
Copy link
Author

This only happens in Windows, not in Linux (Debian).

Originally posted here: abalfoort#7

@abalfoort abalfoort changed the title MP2 Rogue crash when loading rlava1 Windows - MP2 Ground Zero crash when loading rlava1 Apr 26, 2023
@abalfoort
Copy link
Author

Fixed this by increasing the MAX_LIGHT_POLYS value to 8912: commit 0eaca60

I don't know if this a preferred solution or not, but for now it seems to have solved this issue.

I'm open for better suggestions.

@apanteleev
Copy link
Collaborator

Thanks for reporting the issue - I just fixed it in 562d151

@abalfoort
Copy link
Author

You chose not to increase the MAX_LIGHT_POLYS value. Is there a reason to keep the value low at 4096?

@apanteleev
Copy link
Collaborator

The high light count was actually a bug, the map needs 764 lights with that bug fixed. And I added a warning message if the 4k limit is ever exceeded, so the game should not crash but provide actionable info.

@abalfoort
Copy link
Author

Tested over the past two weeks and works perfectly. Thanks!

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