View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0003840 | Spring engine | General | public | 2013-06-10 05:42 | 2013-08-02 05:06 | ||||
Reporter | zwzsg | ||||||||
Assigned To | abma | ||||||||
Priority | normal | Severity | major | Reproducibility | always | ||||
Status | resolved | Resolution | fixed | ||||||
Product Version | 94.1.1+git | ||||||||
Target Version | 95.0 | Fixed in Version | 95.0 | ||||||
Summary | 0003840: Old instance of Spring remains after a Spring.Restart (windows only) | ||||||||
Description | When a Lua gadget or widget performs a Spring.Restart, a new Spring instance is correctly created, but the old Spring instance remains as a zombie. Tested under WinXP. (I suppose the behavior is OS dependent.) Tested with Spring lastest stable (94.1) and latest test build (spring_{develop}94.1.1-594-g8f53c96) | ||||||||
Steps To Reproduce | - Set Fullscreen=0 in springsettings.cfg to make it easier to see the different instances of Spring in the task bar. - Download the game "Spring Tanks": http://springfiles.com/spring/games/spring-tanks - Download the map "Eye Of Horus v2": http://springfiles.com/spring/spring-maps/eye-horus-v2 - Run Spring with the game "Spring Tanks" and an unsupported map (so as to bring the menu, menu can also be brought by pressing esc ingame). - In the ingame Spring Tanks menu, select "Tank TV" and click "Start selected game" - Notice how the old Spring instance remains after a new Spring instance is created. - Quit the new Spring instance - Notice how the old Spring instance remains and is unresponsive. | ||||||||
Tags | No tags attached. | ||||||||
Checked infolog.txt for Errors | |||||||||
Attached Files |
|
![]() |
|||||||||||
|
![]() |
|
2013-06-12 02:38 |
Same on 32bit Windows Vista. The "first" spring remains as white unresponsive window. I tested: spring 87.0 works spring 91.0 works spring 93 same problem as 94.1 |
Deadnight Warrior (reporter) 2013-06-21 00:50 |
I can confirm this on Win7 Pro SP1 x64 Though I didn't play Spring Tanks, but used XTA's mission mode. It works fine on 91.0, but not on newer versions Haven't tried with older tham 91.0 |
abma (administrator) 2013-07-07 20:12 Last edited: 2013-07-07 20:13 |
https://github.com/spring/spring/blob/develop/rts/Lua/LuaUnsyncedCtrl.cpp#L2131 https://github.com/spring/spring/blob/develop/rts/System/Platform/Misc.cpp#L418 problem is: Spring.Restart is blocking, it just halts the old process. imo there are two solutions: 1. reload the engine with changed parameters without executing a new process 2. shutdown the engine and then execute the new process when everything is shut down. wait for the new process to exit and return the new code imo 1. should be prefered as spring shouldn't create new processes... |
cleanrock (reporter) 2013-07-08 07:41 Last edited: 2013-07-08 07:42 |
execvp replaces the current process and only returns if it fails. I guess the first spring process is not ready to disappear, perhaps some resources must be released prior to launching new spring. I read this in _execvp docs: You must explicitly flush (using fflush or _flushall) or close any stream before the _exec function call. See http://msdn.microsoft.com/en-us/library/431x4c1w%28v=vs.80%29.aspx |
abma (administrator) 2013-07-22 18:09 |
run cmd.exe set OMP_NUM_THREADS=1 spring.exe -> works! (for me) Deadnight Warrior or Knorke, can you confirm this? |
2013-07-23 13:13 |
@abma worked for me, too! (with 94.1) |
abma (administrator) 2013-07-23 15:30 |
ok, thx. now we have some possible solutions: 1. fix the bug in omp / win32-pthreads 2. install mingw64 on the buildslave 3. wait for jk's threadpool implementation atm 2. is the prefered solution as it won't create extra work. |
abma (administrator) 2013-07-23 15:32 Last edited: 2013-07-23 15:33 |
4. try to restored default signal handlers before execvp() 5. test pthreads-win32 2.9.1 (2.8.0 is used atm) |
abma (administrator) 2013-07-28 04:07 |
fixed by switching to mingw64 / win32-pthreads-2.9.1. not sure what fixed it. |
abma (administrator) 2013-07-28 04:08 |
works for me: http://springrts.com/dl/buildbot/default/develop/94.1.1-746-ga6bcd97/ |
abma (administrator) 2013-07-28 04:40 |
aw, fail, sorry.: still doesn't work, i've tested in a xp-vm which had only one enabled core, with 4 cores enabled it fails again... :-| |
abma (administrator) 2013-08-02 05:06 |
fixed in current development version by merging of the branch "threadpool" |
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2013-06-10 05:42 | zwzsg | New Issue | |
2013-06-12 02:38 |
|
Note Added: 0010854 | |
2013-06-21 00:50 | Deadnight Warrior | Note Added: 0010891 | |
2013-06-21 01:09 | abma | Target Version | => 95.0 |
2013-07-07 20:12 | abma | Note Added: 0010985 | |
2013-07-07 20:13 | abma | Note Edited: 0010985 | View Revisions |
2013-07-08 07:41 | cleanrock | Note Added: 0010989 | |
2013-07-08 07:42 | cleanrock | Note Edited: 0010989 | View Revisions |
2013-07-22 18:09 | abma | Note Added: 0011046 | |
2013-07-22 18:09 | abma | Assigned To | => abma |
2013-07-22 18:09 | abma | Status | new => feedback |
2013-07-23 01:46 | abma | Summary | Old instance of Spring remains after a Spring.Restart => Old instance of Spring remains after a Spring.Restart (windows only) |
2013-07-23 05:55 | abma | Product Version | 94.1 => 94.1.1+git |
2013-07-23 13:13 |
|
Note Added: 0011049 | |
2013-07-23 15:30 | abma | Note Added: 0011053 | |
2013-07-23 15:30 | abma | Assigned To | abma => |
2013-07-23 15:30 | abma | Status | feedback => new |
2013-07-23 15:32 | abma | Note Added: 0011054 | |
2013-07-23 15:33 | abma | Note Edited: 0011054 | View Revisions |
2013-07-28 03:25 | abma | Relationship added | related to 0003899 |
2013-07-28 04:07 | abma | Note Added: 0011094 | |
2013-07-28 04:07 | abma | Status | new => resolved |
2013-07-28 04:07 | abma | Resolution | open => fixed |
2013-07-28 04:07 | abma | Assigned To | => abma |
2013-07-28 04:08 | abma | Note Added: 0011095 | |
2013-07-28 04:40 | abma | Note Added: 0011096 | |
2013-07-28 04:40 | abma | Assigned To | abma => |
2013-07-28 04:40 | abma | Status | resolved => new |
2013-07-28 15:28 | abma | Relationship added | related to 0003902 |
2013-08-02 05:06 | abma | Note Added: 0011138 | |
2013-08-02 05:06 | abma | Status | new => resolved |
2013-08-02 05:06 | abma | Fixed in Version | => 95.0 |
2013-08-02 05:06 | abma | Assigned To | => abma |