View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002157 | Spring engine | Linux | public | 2010-10-01 15:33 | 2012-06-03 20:42 |
| Reporter | Mitmat | Assigned To | abma | ||
| Priority | normal | Severity | major | Reproducibility | sometimes |
| Status | resolved | Resolution | fixed | ||
| Product Version | 0.82.5 | ||||
| Summary | 0002157: Bug with game restart functionality | ||||
| Description | Steps to reproduce: Linux (Kubuntu 10.04), Spring 0.82.5.1, KP 4.1. Load a mission and restart it several times until the bug appears. After several restarts (5 on average), display is bugged (see picture and log files in attachment) and/or loading is very slow. I suggest this is due to the "LuaUnsyncedCtrl::Restart(lua_State*)" function that uses the "execlp" function. I'm not sure but I suspect that the new game find old data of the previous game's instance... I propose you a solution that is functional in my case: just use a "fork()" and call the "execlp" function only in the child's process and let the parent's process ended cleanly. Then the game restarts with a new PID and a clean execution context. You will find in attachment my modified "rts/Lua/LuaUnsyncedCtrl.cpp" file. Note: In the parent's process the "LuaUnsyncedCtrl::Restart(lua_State*)" function now returns. | ||||
| Tags | No tags attached. | ||||
| Attached Files | |||||
| Checked infolog.txt for Errors | |||||
|
|
i would say, a better solution would be: instead of calling execvp() right away, we should store the arguments for the restart, set globalQuit = true (as you do), wait till spring is ready stop its process, and at that moment, check if there is a restart request pending, and execute if so. with this, we would probably not have to rely on fork(), which means the solution is platform independent. in the future, the restart could probably be executed by the launcher executable, by using a temp file to store the restart arguments, if that has any advantages. comments? |
|
|
I tested to call execvp() between Shutdown() and return 0 of the SpringApp::Run function but the bug is always the same. The second solution should be settle the matter... |
|
|
Hmm... SDL (which also manages OpenGL stuff, if i remember correctly) shuts down after that. it redefines the main function, to be always the first and last thing in control. which means.. yeah.. i guess we can not use the first solution. :/ |
|
|
is this still a problem in spring 88? i cannot reproduce it... |
|
|
seems to be fixed, reopen report if not... |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2010-10-01 15:33 | Mitmat | New Issue | |
| 2010-10-01 15:33 | Mitmat | File Added: attachment.tar.gz | |
| 2010-10-02 12:54 | hoijui | Note Added: 0005684 | |
| 2010-10-05 15:45 | Mitmat | Note Added: 0005695 | |
| 2010-12-06 21:01 | abma | Relationship added | related to 0002246 |
| 2010-12-07 10:13 | abma | Relationship added | related to 0002253 |
| 2010-12-27 01:35 | abma | File Added: infolog.bak.txt | |
| 2010-12-27 01:36 | abma | File Added: infolog.txt | |
| 2010-12-27 01:36 | abma | File Added: LuaUnsyncedCtrl.cpp | |
| 2010-12-27 01:36 | abma | File Added: snapshot1.png | |
| 2010-12-27 01:36 | abma | File Deleted: attachment.tar.gz | |
| 2010-12-27 23:38 | hoijui | Note Added: 0006159 | |
| 2012-05-23 10:51 | abma | Note Added: 0008701 | |
| 2012-05-23 10:51 | abma | Status | new => feedback |
| 2012-05-23 10:51 | abma | Note Edited: 0008701 | |
| 2012-06-03 20:42 | abma | Note Added: 0008733 | |
| 2012-06-03 20:42 | abma | Status | feedback => resolved |
| 2012-06-03 20:42 | abma | Resolution | open => fixed |
| 2012-06-03 20:42 | abma | Assigned To | => abma |