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

Segfault when loading saved game [Linux] #356

Open
pnomolos opened this issue Sep 23, 2019 · 3 comments
Open

Segfault when loading saved game [Linux] #356

pnomolos opened this issue Sep 23, 2019 · 3 comments

Comments

@pnomolos
Copy link

I left citybound running while I went and had lunch. When I came back I noticed that the interface seemed stuck. I checked the terminal process and saw that citybound had segfaulted. Tried restarting and now get a segfault before it can finish launching. Trace from gdb below. I can upload the savegame somewhere if that would help.

This is on nightly build citybound-v0.1.2-790-g7c076e3. Ubuntu 19.04.

warning: Missing auto-load script at offset 0 in section .debug_gdb_scripts
of file /home/pnomolos/Downloads/citybound-v0.1.2-790-g7c076e3.
Use `info auto-load python-scripts [REGEXP]' to list them.
(gdb) run
Starting program: /home/pnomolos/Downloads/citybound-v0.1.2-790-g7c076e3 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
        Citybound v0.1.2-790-g7c076e3        

       This is the simulation server.        
  To connect and start playing, please open  
   this address in Chrome/Firefox/Safari:    
╭───────────────────────────────────────────╮
│           http://localhost:1234           │
╰───────────────────────────────────────────╯
[New Thread 0x7ffff79ff700 (LWP 711751)]
[New Thread 0x7ffff77fe700 (LWP 711752)]
Loading from savegame ./city...
[New Thread 0x7ffff75fd700 (LWP 711753)]
[New Thread 0x7ffff73fc700 (LWP 711754)]
[New Thread 0x7ffff6312700 (LWP 711755)]
[New Thread 0x7ffff5ef5700 (LWP 711756)]
[New Thread 0x7ffff5442700 (LWP 711757)]
Simulation running.
(You can stop this process at any point and the savegame should be fine)

Thread 1 "citybound-v0.1." received signal SIGSEGV, Segmentation fault.
compact::compact_vec::CompactVec<T,A>::double_buf (self=0x7ffe28000018)
    at /home/travis/.cargo/registry/src/github.com-1ecc6299db9ec823/compact-0.2.13/src/compact_vec.rs:78
78	/home/travis/.cargo/registry/src/github.com-1ecc6299db9ec823/compact-0.2.13/src/compact_vec.rs: No such file or directory.
@aeplay
Copy link
Member

aeplay commented Oct 5, 2019

Thanks for the detailed report. The stacktrace already gives me a good idea what's involved.

If you still have it, the save game would be great. Is it Ubuntu on an x64 processor?

@pnomolos
Copy link
Author

@aeplay I'm so sorry it took so long to respond to you - yes, I am on x64 Ubuntu. I've grabbed the latest build and am going to see if it'll segfault over time. If you'd still like me to upload the old save file I can.

@thk123
Copy link

thk123 commented Aug 8, 2021

As far as I can tell on Linux, starting a game, immediately stopping and then restarting is sufficient to reproduce this error.

The last line of code is self.state.is_none() in cb_util/src/config_manager/mod.rs. I think it is the self.state that is invalid, but beyond that would just be guessing.

I guess I should also note, given that this is in the ConfigFileWatcher I should note that I got this crash after applying #381.

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