View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0004262 | Spring engine | Lua | public | 2014-01-11 02:04 | 2014-01-14 02:29 |
| Reporter | zwzsg | Assigned To | jK | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | resolved | Resolution | fixed | ||
| Product Version | 96.0 | ||||
| Summary | 0004262: Spring.Restart with startscript content as second argument | ||||
| Description | kp_spring_direct_launch.lua line 465 is: Spring.Restart("",trimmed) where trimmed is a fairly large string containing the content of the startscript that I wish to restart Spring with. It used to work in Spring 95. In Spring 96, the infolog reads: [f=0000000] Spring Direct Launch 2: Ok, calling Spring.Restart("","[GAME]{..}") now! [f=0000000] [Sound] [~CSound][1] soundThread=027629E8 [f=0000000] [Sound] [~CSound][2] [f=0000000] [Sound] [~CSound][3] [f=0000000] Error: [Spring.Restart] error Invalid argument [f=0000000] Spring Direct Launch 2: Just called Spring.Restart("","[GAME]{..}") [f=0000000] Spring Direct Launch 2: Wait, we shouldn't be here, should have restarted or crashed or quitted by now. And then, Spring.exe crashes for reasons that may or may not be related (to me it looks likes something about CSound having being half reintialised by Spring.Restart and then causing a crash next frame, but ianad. Anyway, it'll become irrelevant once Spring.Restart works again.) https://github.com/spring/spring/blob/master/rts/Game/Game.cpp#L1115 spring.exe 0x0042ABAB rts/Game/Game.cpp:1115 spring.exe 0x0042AEFA rts/Game/Game.cpp:1173 spring.exe 0x008900A3 rts/System/SpringApp.cpp:968 spring.exe 0x008968A4 rts/System/SpringApp.cpp:1034 spring.exe 0x00872956 rts/System/Main.cpp:65 spring.exe 0x0087376C rts/System/Main.cpp:125 spring.exe 0x0087398D rts/System/Main.cpp:134 spring.exe 0x00401402 crtexe.c:0 kernel32.dll 0x7C817077 ??:0 So, what exactly is invalid in my Spring.Restart arguments? | ||||
| Steps To Reproduce | - Get a WinXP machine - Download Spring 96 portable for windows, unzip - Download Kernel Panic 4.6, unzip in same folder - Run Spring.exe directly, run Kernel Panic game to get Kernel Panic menu - Once in KP ingame menu, click mission, Challenge 1 - Bug Squashing - Wait a few seconds for crash to occur - Read infolog.txt | ||||
| Additional Information | Spring.Restart fails the same with http://springrts.com/dl/buildbot/default/develop/96.0.1-141-g059f13c/win32/ | ||||
| Tags | No tags attached. | ||||
| Attached Files | |||||
| Checked infolog.txt for Errors | |||||
|
|
I modified my widget to: - Write the string trimmed into the file Kernel_Panic_script.txt - Use Spring.Restart("Kernel_Panic_script.txt","") And it failed the same: - Error: [Spring.Restart] error Invalid argument |
|
|
knorke's Spring Tank uses: local file=VFS.LoadFile(startscriptfilename) Spring.Restart("-s", file) And fails the same: [f=0000644] Error: [Spring.Restart] error Invalid argument [f=0000645] Error: Spring 96.0 has crashed. |
|
|
I believe jk have tried to fix this: https://github.com/spring/spring/commit/059f13c Have you tried latest develop ? |
|
|
See "Additional Information" |
|
|
looks like kloot also tried to fix this now, dunno why they dont want to ref this bug report https://github.com/spring/spring/commit/f501cb4 |
|
|
when testing f501cb4, *also* check your space-in-path case (4161) because the behavior between Windows and Linux seems to be different |
|
|
I tested http://springrts.com/dl/buildbot/default/develop/96.0.1-144-ge0802a4/win32/ Spring.Restart works correctly with this build. Then I added some space in my folder name. This time Spring crashed during restart. |
|
|
did someone take into account that length of command line args on windows are limited? http://stackoverflow.com/questions/3205027/maximum-length-of-command-line-string is the parameter written to a script.txt or is it called directly? |
|
|
Yeah, I hit this limit years ago, it was 32k. But this is not the problem now. - With the build f501cb4, and no space in path, I can pass a 1558 char long string as parameter and Spring restarts fine. - With 96 and no space in path, it crashes even if I write the script to a txt (so with a short command line). - With space in path and f501cb4, it crashes. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2014-01-11 02:04 | zwzsg | New Issue | |
| 2014-01-11 02:04 | zwzsg | File Added: infolog.txt | |
| 2014-01-11 02:22 | zwzsg | Note Added: 0012670 | |
| 2014-01-11 17:27 | zwzsg | Note Added: 0012674 | |
| 2014-01-11 17:30 | cleanrock | Note Added: 0012675 | |
| 2014-01-11 17:30 | cleanrock | Assigned To | => jK |
| 2014-01-11 17:30 | cleanrock | Status | new => feedback |
| 2014-01-11 18:36 | zwzsg | Note Added: 0012676 | |
| 2014-01-11 18:36 | zwzsg | Status | feedback => assigned |
| 2014-01-11 19:41 | cleanrock | Note Added: 0012679 | |
| 2014-01-11 19:41 | cleanrock | Assigned To | jK => |
| 2014-01-11 19:41 | cleanrock | Status | assigned => new |
| 2014-01-11 20:57 | Kloot | Note Added: 0012680 | |
| 2014-01-12 16:47 | zwzsg | Note Added: 0012684 | |
| 2014-01-13 09:13 | abma | Note Added: 0012686 | |
| 2014-01-13 09:15 | abma | Note Edited: 0012686 | |
| 2014-01-13 09:15 | abma | Note Edited: 0012686 | |
| 2014-01-14 00:32 | zwzsg | Note Added: 0012691 | |
| 2014-01-14 02:29 | jK | Changeset attached | => spring develop 65a9d0b7 |
| 2014-01-14 02:29 | jK | Assigned To | => jK |
| 2014-01-14 02:29 | jK | Status | new => resolved |
| 2014-01-14 02:29 | jK | Resolution | open => fixed |
| 2014-10-07 19:14 | abma | Relationship added | has duplicate 0004329 |