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

Crash bug in time trial #15

Closed
djcouchycouch opened this issue Sep 7, 2015 · 6 comments
Closed

Crash bug in time trial #15

djcouchycouch opened this issue Sep 7, 2015 · 6 comments

Comments

@djcouchycouch
Copy link

Hi,

After building on Win32 x86, if I run the game and go straight into time trial mode, it crashes.

The crash is located in outs.cpp, line 206.

converted[2] = ostats.lap_ms[ms_lookup];

It occurs because lap_ms hasn't been setup yet. It's null. OStats::clear_stage_times() hasn't been called yet. But if I go into the game first (which calls the function) and then go back to time trail, it works.

Thanks,
djcc

@djcouchycouch
Copy link
Author

Spent some more time on it. If I skip that line and keep going, it'll eventually call OInitEngine::setup_state1() which will properly set it up. A fix is just to give lap_ms a default value in OStats's constructor. I used LAP_MS_64 but I don't think it really make a difference because it gets set properly as soon as the engine gets initialized.

@Thesch28
Copy link

Time Trial crashes on my 32 bits windows 7 pc too.

@Thesch28
Copy link

I tried to play Time Trial in a 64 bits system and the game still crashes.

@beh68030
Copy link

beh68030 commented Aug 3, 2018

Will this ever get patched? I was able to fix it by following djcouchycouch's advice, but it's odd this issue was never resolved after almost 3 years

@Thesch28
Before you compile, open "ostats.cpp" in a text editor and make the following changes:
OStats::OStats(void) { lap_ms = config.engine.fix_timer ? LAP_MS_60 : LAP_MS_64; }

@djyt
Copy link
Owner

djyt commented Mar 2, 2021

Hello everyone. Yes, I haven't read any of these comments for years. Sorry about that.
I am working on CannonBall again at the moment and have fixed this issue in the latest source. Thanks!

@djyt djyt closed this as completed Mar 2, 2021
@steviebferrari
Copy link

If you switch to original mode then back to enhanced, time trial loads

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

5 participants