-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
Hello Team,
Since I've been using RustAllegro, I never used allegro_main!. Today in order to troubleshoot an issue, I decided to use allegro_main!.
Then I got this:
thread '' has overflowed its stack
fatal runtime error: stack overflow
Aborted (core dumped)
I was able to get an workaround increasing the stack:
const STACK_SIZE: usize = 4 * 1024 * 1024;
allegro_main! {
// Spawn thread with explicit stack size
let child = thread::Builder::new()
.stack_size(STACK_SIZE)
.spawn(run)
.unwrap();
// Wait for thread to join
child.join().unwrap();
}
fn run() {
// game code
}
Nevertheless, I was able to solve my issue and got back using main() again without issues.
My question relates with allegro_main!. What does it do, why do we need it and do we really need to use it.
Thanks.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels