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

reset accumulated profiler samples causes an access violation error #296

Closed
in-league-with-satan opened this issue Aug 10, 2023 · 5 comments

Comments

@in-league-with-satan
Copy link

starting from commit 8048868 game crashes with exception 0xc0000005

tried self builds and a few artifacts from github-actions. for example this one

Q2RTX_CrashReport01.txt

@in-league-with-satan
Copy link
Author

looks like the same error
#293

@res2k
Copy link
Contributor

res2k commented Aug 10, 2023

Unfortunately, I'm struggling to reproduce the error.

Could you either
(a) try the build here?: https://github.com/res2k/Q2RTX/actions/runs/5822525998
It does not fix the error, but should hopefully produce a more expressive crash report.
or,
(b) provide the complete callstack from your own build? (I presume that's why you could tell it's in the profiler sample reset.)

Thanks!

@in-league-with-satan
Copy link
Author

https://github.com/res2k/Q2RTX/actions/runs/5822525998 - runs without problems
and my build with pdb start works too

i don't use debugger, just iterated back from master all the commits until it worked on 480f3ec, looks what changed, and then disabled function reset_samples in master and master start works to. for me this way is easier because i can't use IDE and debugging in command line is too hard for me x_x

@in-league-with-satan
Copy link
Author

in-league-with-satan commented Aug 10, 2023

hm...

in reset_samples

we get pointer by idx index
profiler_entry_samples_t *entry_samples = &profiler_data.samples[idx];

and index enumrates in vkpt_profiler_next_frame through
for (int idx = 0; idx < NUM_PROFILER_QUERIES_PER_FRAME; idx++)

#define NUM_PROFILER_QUERIES_PER_FRAME (NUM_PROFILER_ENTRIES * 2)

and size of samples is
profiler_entry_samples_t samples[NUM_PROFILER_ENTRIES];

index out of range of samples size

@apanteleev
Copy link
Collaborator

Thanks for the investigation @in-league-with-satan - I fixed the indexing issue in 63cc413

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

3 participants