View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0001485 | Spring engine | General | public | 2009-07-01 22:24 | 2009-10-09 22:06 | ||||
Reporter | Societal | ||||||||
Assigned To | hoijui | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | resolved | Resolution | no change required | ||||||
Product Version | 0.79.1.0+git | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0001485: Start Scripts - Erroneous Hosts Entry Causes MSVCRT Error and Spring Fails to Load | ||||||||
Description | This is a minor problem but due to the complete lack of error information provided to the user, they will likely have no clue as to what is responsible. Proper syntax should be encouraged but mistakes will occur and should be accounted for. The infolog is written but ends abruptly with no mention of the actual problem. http://pastebin.com/m6e53fed This occurs after the Spring window is already initialized so it is rather ugly having to clear the Microsoft message to get Spring's window to close as well. | ||||||||
Steps To Reproduce | Take any valid start script with an AI bot and change the Host=x; value to a number other than the correct [PLAYERx] value for the host. Passing this script to Spring will give you a Microsoft Visual C++ Runtime Error message. Clicking okay spits out nothing useful: Program received signal SIGSEGV, Segmentation fault. 0x007b7d1c in SpringApp::SigAbrtHandler (unused=22) at E:/Data/Spring-RTS/spring/rts/System/SpringApp.cpp:94 94 *((int*)(0)) = 0; | ||||||||
Additional Information | Expected Results: More graceful handling with the error reason and the relevant start script line number written to the infolog. Assume the Host=x; entry should be modified internally to the first valid [PLAYER=x] entry. In this case Spring runs normally as far as the user is concerned, they are just warned to fix their script. Other incorrect entries are already handled this way: [ 0] Warning: 1 players in GameSetup script (NumPlayers says 5) [ 0] Warning: 8 teams in GameSetup script (NumTeams: 14) [ 0] Warning: incorrect number of allyteams in GameSetup script [ 0] Starting demo recording [ 0] Warning: 1 players in GameSetup script (NumPlayers says 5) [ 0] Warning: 8 teams in GameSetup script (NumTeams: 14) [ 0] Warning: incorrect number of allyteams in GameSetup script NumUsers=x; Does not seem to generate errors whatever value I try. | ||||||||
Tags | No tags attached. | ||||||||
Checked infolog.txt for Errors | |||||||||
Attached Files |
|
![]() |
|
Auswaschbar (reporter) 2009-07-02 01:17 |
There is no Host=x; field in script.txt. Only HostIP, HostPort or IsHost. |
Societal (reporter) 2009-07-02 06:06 |
In [AI0] {} ? Is the SpringStartScript.txt found in the /Documentation folder outdated then? SpringLobby generated script.txt files have this: [AI0] { Name=Bot1; ShortName=AAI; Version=0.9; Team=1; Host=1; [Options] { } } |
hoijui (reporter) 2009-10-09 22:06 |
There is not really a way to gracefully fix this and continuing. eg, if there are multiple hosts, eg 0 and 1, and AI has host set to 2, then you can not just choose host 0, neither 1, cause one of them may have the AI, and the other one not. Therefore we throw an exception, which ends up in an error message in infolog when caught, and in a crash when uncaught. It gets caught when NO_CATCH_EXCEPTIONS is not defined, which (with CMake), is the case for non-debug builds. or more easy: debug builds crash, release builds die gracefully with error message in infolog. The reasoning behind this is, is that it is nicer when working with GDB, to have them uncaught, and crash. |
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2009-07-01 22:24 | Societal | New Issue | |
2009-07-02 01:17 | Auswaschbar | Note Added: 0003705 | |
2009-07-02 01:17 | Auswaschbar | Status | new => feedback |
2009-07-02 06:06 | Societal | Note Added: 0003708 | |
2009-10-09 22:06 | hoijui | Note Added: 0004202 | |
2009-10-09 22:06 | hoijui | Status | feedback => resolved |
2009-10-09 22:06 | hoijui | Resolution | open => no change required |
2009-10-09 22:06 | hoijui | Assigned To | => hoijui |