View topic - Spring-dedicated crashes in windows 7


All times are UTC + 1 hour


Post new topic Reply to topic  [ 20 posts ] 
Author Message
PostPosted: 29 Nov 2009, 23:48 
User avatar

Joined: 23 Feb 2009, 16:29
Location: Finland
I have a problem with spring-decicated, which crashes when launched through spads in windows 7 64-bit, but works when launched the same way in windows xp.

Windows 7 displays a message (visual C++) that the runtime has requested to terminate the application in an unusual way.

Details:
Code:
Problem signature:
  Problem Event Name:   APPCRASH
  Application Name:   spring-dedicated.exe
  Application Version:   0.0.0.0
  Application Timestamp:   4ae20e62
  Fault Module Name:   springserver.dll
  Fault Module Version:   0.0.0.0
  Fault Module Timestamp:   4ae20e63
  Exception Code:   40000015
  Exception Offset:   000e0569
  OS Version:   6.1.7100.2.0.0.256.1
  Locale ID:   2057
  Additional Information 1:   b436
  Additional Information 2:   b436e38637e3c3bbe8bdc5f24e74756f
  Additional Information 3:   004c
  Additional Information 4:   004c67ed26dc3d94a9eceeddab9ba840


Contents of infolog.txt:
Code:
LogOutput initialized.
Spring 0.80.5.1 (0.80.5.1-0-g57e49c6{@}-cmake-mingw32)
Available log subsystems: VFS-detail, VFS, ArchiveScanner,
Enabled log subsystems:
Enable or disable log subsystems using the LogSubsystems configuration key
  or the SPRING_LOG_SUBSYSTEMS environment variable (both comma separated).
default config file: C:\Users\<user>\AppData\Local\springsettings.cfg
Using read-write data directory: E:\Program Files\Spring\
Using read-only  data directory: C:\Users\<user>\Documents\My Games\Spring\
Scanning: C:\Users\<user>\Documents\My Games\Spring\maps
Scanning: C:\Users\<user>\Documents\My Games\Spring\base
Scanning: C:\Users\<user>\Documents\My Games\Spring\mods
Scanning: C:\Users\<user>\Documents\My Games\Spring\packages
Scanning: E:\Program Files\Spring\maps
Scanning: E:\Program Files\Spring\base
Scanning: E:\Program Files\Spring\mods
Scanning: E:\Program Files\Spring\packages


Hmm, it says spring v. 0.80.5.1, and I know the latest one is 0.80.5.2. However, I can't find any copy of the dedicated for 0.80.5.2 right now.
Top
 Offline Profile  
 
PostPosted: 02 Dec 2009, 00:30 

Joined: 17 Sep 2006, 18:29
Would you happen to be running SpringLobby version 0.39?

I had the exact same error message occur when I manually updated SpringLobby from 0.35 to 0.39. Reverting back to 0.35 solved that error. Alternatively, 0.40 doesn't cause that error either. However, 0.36 will cause SpringLobby.exe to lock up and fail to properly terminate when you close the window.

Additionally, make sure the SpringLobby.exe file in your Spring install is unblocked (right-click > Properties > Unblock > Apply > OK).
Top
 Offline Profile  
 
PostPosted: 02 Dec 2009, 11:43 
User avatar

Joined: 23 Feb 2009, 16:29
Location: Finland
No, I run it with the spads autohost, but the error is in spring-dedicated.exe, because if I lauch it from the command line like this:

Code:
spring-dedicated.exe F:\games\spads\var\startscript.txt


Then I get the same error. I even tried compatibility mode for windows xp sp2, still same error.

Here is the startscript: http://pastebin.com/m45a1e6e7
Top
 Offline Profile  
 
PostPosted: 15 Dec 2009, 15:34 
Lobby Developer
User avatar

Joined: 06 Dec 2007, 11:12
Jools wrote:
if I lauch it from the command line like this:
Code:
spring-dedicated.exe F:\games\spads\var\startscript.txt
Then I get the same error.
Where did you launch it from, SPADS installation directory or Spring installation directory ?

If you tried from SPADS installation directory only, can you try copying spring-dedicated.exe and springserver.dll files from your SPADS directory to your Spring directory, and launch spring-dedicated from your Spring directory ?

I guess there is some DLL dependency scanner such as this one on Windows 7 ? Can you check spring-dedicated.exe and springserver.dll dependencies with such a tool (from your Spring installation directory) ?
Top
 Offline Profile  
 
PostPosted: 15 Dec 2009, 15:44 
Spring Developer

Joined: 24 Jun 2007, 07:34
Location: 50┬░ 56' N, 11┬░ 35' O
"terminated in an unusual way" is windows speak for uncaught exception.
The stdout from spring-dedicated would help to identify this error, as the exception message is printed there.
Top
 Offline Profile  
 
PostPosted: 15 Dec 2009, 16:04 
Lobby Developer
User avatar

Joined: 06 Dec 2007, 11:12
Auswaschbar wrote:
"terminated in an unusual way" is windows speak for uncaught exception.
Yes, however I remember having the exact same behaviour when launching spring-dedicated.exe with a missing dependency, and nothing was printed in stdout.
Auswaschbar wrote:
The stdout from spring-dedicated would help to identify this error, as the exception message is printed there.
Actually I had already asked Jools to check the spring-dedicated.log file in which SPADS redirects spring-dedicated.exe output, and IIRC it was empty. However, now you speak about it I don't think I had asked him to check the stdout.txt and stderr.txt files, which are now used by spring-dedicated.exe instead of STDOUT and STDERR streams.
Top
 Offline Profile  
 
PostPosted: 15 Dec 2009, 16:07 
Spring Developer

Joined: 24 Jun 2007, 07:34
Location: 50┬░ 56' N, 11┬░ 35' O
bibim wrote:
stdout.txt and stderr.txt files, which are now used by spring-dedicated.exe instead of STDOUT and STDERR streams.

Wait, what?
Top
 Offline Profile  
 
PostPosted: 15 Dec 2009, 16:12 
Lobby Developer
User avatar

Joined: 06 Dec 2007, 11:12
On Windows, it seems spring-dedicated no longer writes its outputs in STDOUT/STDERR streams (even if it is redirected with '>' and '2>'). Instead, it writes the stdout.txt and stderr.txt files in current directory. I think it is related to commit ec3e525a (possible explanation ?)
Top
 Offline Profile  
 
PostPosted: 15 Dec 2009, 21:32 
Malcontent
User avatar

Joined: 27 Feb 2006, 22:04
Location: ¯\_(ツ)_/¯
I have noticed that with my own SDL programs as well..it's pretty irritating. #undef main at the start of the file with main() in it fixed it for me; I also believe that the current unstable version of SDL no longer has that irritating iostream-redirecting behaviour.
Top
 Offline Profile  
 
PostPosted: 01 Jan 2010, 04:44 
User avatar

Joined: 23 Feb 2009, 16:29
Location: Finland
bibim wrote:
Actually I had already asked Jools to check the spring-dedicated.log file in which SPADS redirects spring-dedicated.exe output, and IIRC it was empty. However, now you speak about it I don't think I had asked him to check the stdout.txt and stderr.txt files, which are now used by spring-dedicated.exe instead of STDOUT and STDERR streams.


Bibim is correct, that file is empty. However, the stderr.txt in the spads directory contains the following:
Code:
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::system::system_error> >'
  what():  An existing connection was forcibly closed by the remote host


The stdout.txt doesnt contain anything useful to me, but here it is too:
Code:
If you find any errors, report them to mantis or the forums.

default config file: C:\Users\<user>\AppData\Local\springsettings.cfg
LogOutput initialized.
Spring 0.80.5.1 (0.80.5.1-0-g57e49c6{@}-cmake-mingw32)
Available log subsystems: VFS-detail, VFS, ArchiveScanner,
Enabled log subsystems:
Enable or disable log subsystems using the LogSubsystems configuration key
  or the SPRING_LOG_SUBSYSTEMS environment variable (both comma separated).
Using read-write data directory: E:\Program Files\Spring\
Using read-only  data directory: F:\Games\spads\
Using read-only  data directory: C:\Users\<user>\Documents\My Games\Spring\
Scanning: C:\Users\<user>\Documents\My Games\Spring\maps
Scanning: C:\Users\<user>\Documents\My Games\Spring\base
Scanning: C:\Users\<user>\Documents\My Games\Spring\mods
Scanning: C:\Users\<user>\Documents\My Games\Spring\packages
Scanning: F:\Games\spads\maps
Scanning: F:\Games\spads\base
Scanning: F:\Games\spads\mods
Scanning: F:\Games\spads\packages
Scanning: E:\Program Files\Spring\maps
Scanning: E:\Program Files\Spring\base
Scanning: E:\Program Files\Spring\mods
Scanning: E:\Program Files\Spring\packages
Loading script from file: F:\Games\spads\var/startscript.txt
Starting server...
Connecting to autohost on port 8454
Server started on port 8452



I will try tomorrow with the dependency thing too...
Top
 Offline Profile  
 
PostPosted: 01 Jan 2010, 19:38 
Lobby Developer
User avatar

Joined: 06 Dec 2007, 11:12
Jools wrote:
the stderr.txt in the spads directory contains the following:
Code:
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::system::system_error> >'
  what():  An existing connection was forcibly closed by the remote host
Can you try to remove the "AutohostPort=xxxx;" line from your start script and relaunch spring-dedicated to see if it works ?

Jools wrote:
I will try tomorrow with the dependency thing too...
Actually I don't think you need to check the dependencies, since the problem is very likely due to this connection problem.
Top
 Offline Profile  
 
PostPosted: 04 Jan 2010, 20:01 
User avatar

Joined: 23 Feb 2009, 16:29
Location: Finland
Just to write that this issue is fixed now, bibim has made a new version of the autohost that disables ipv6, if I understood it correctly, and this works on windows 7. There was also one more issue in widnows 7, it was set to resolve to localhost name by dns, whereas this should be set in a hosts file in windows to resolve manually.
Top
 Offline Profile  
 
PostPosted: 13 Feb 2010, 15:38 
Lobby Developer
User avatar

Joined: 06 Dec 2007, 11:12
Jools wrote:
bibim has made a new version of the autohost that disables ipv6
Actually I patched spring-dedicated to disable ipv6, not SPADS.
Top
 Offline Profile  
 
PostPosted: 05 Jan 2011, 19:14 
User avatar

Joined: 06 Sep 2010, 21:59
Hi all,

I am not sure to really understand the solution to this problem but I installed spads now and I am still having this problem when I launch the hosted game:

Quote:
Starting server...
Binding UDP socket to IP (v6) :: Port 8452
[UDPListener] succesfully bound socket on port 8452
Connecting to autohost on port 8454
Server started on port 8452
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::system::system_error> >'
what(): An existing connection was forcibly closed by the remote host


Someone can help me plz?
Top
 Offline Profile  
 
PostPosted: 05 Jan 2011, 19:23 
Spring Developer

Joined: 31 May 2009, 23:08
try to set

hostIP=0.0.0.0
Top
 Offline Profile  
 
PostPosted: 05 Jan 2011, 19:31 
User avatar

Joined: 06 Sep 2010, 21:59
abma wrote:
try to set

hostIP=0.0.0.0


In my spads.conf? You mean localLanIp:?
Top
 Offline Profile  
 
PostPosted: 05 Jan 2011, 19:55 
Spring Developer

Joined: 31 May 2009, 23:08
damn, found that:

viewtopic.php?t=23884&p=450796

maybe disable ipv6?
Top
 Offline Profile  
 
PostPosted: 05 Jan 2011, 20:06 
Spring Developer
User avatar

Joined: 22 Sep 2007, 08:51
as it is now, IPv4 is used if you specify an IPv4 address, which includes 0.0.0.0 (IPv6 equivalent is ::) and 127.0.0.1.
Top
 Offline Profile  
 
PostPosted: 05 Jan 2011, 21:15 
Lobby Developer
User avatar

Joined: 06 Dec 2007, 11:12
hoijui wrote:
as it is now, IPv4 is used if you specify an IPv4 address, which includes 0.0.0.0 (IPv6 equivalent is ::) and 127.0.0.1.
It doesn't seem to be so for the AutoHost interface (AutohostIP parameter in startscript).

Sample of rts/System/AutohostInterface.cpp:
Code:
using namespace boost::asio;
AutohostInterface::AutohostInterface(const std::string& autohostip, int remoteport) : autohost(netcode::netservice)
{
   boost::system::error_code err;
   autohost.open(ip::udp::v6(), err); // test v6

   if (!err) {
      autohost.bind(ip::udp::endpoint(ip::address_v6::any(), 0));
   } else {
      LogObject() << "[AutohostInterface] IPv6 not supported, falling back to v4";
      autohost.open(ip::udp::v4());
      autohost.bind(ip::udp::endpoint(ip::address_v4::any(), 0));
   }

   boost::asio::socket_base::non_blocking_io command(true);
   autohost.io_control(command);

   std::string connectErrorMsg;

   try {
      boost::system::error_code connectError;
      autohost.connect(netcode::ResolveAddr(autohostip, remoteport), connectError);

      if (connectError) {
         connectErrorMsg = connectError.message();
         autohost.close();
      }
   } catch (boost::system::system_error& e) {
      connectErrorMsg = e.what();
      autohost.close();
   }

   if (!autohost.is_open()) {
      LogObject() << "could not open autohost socket: " << connectErrorMsg;
   }
}
Top
 Offline Profile  
 
PostPosted: 06 Jan 2011, 12:18 
Spring Developer
User avatar

Joined: 22 Sep 2007, 08:51
true that... thanks bibim, nice reference :-)
having a look at that code.
Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Site layout created by Roflcopter et al.