The Help Thread

Programmers discuss here anything related to FreeOrion programming. Primarily for the developers to discuss.

Moderator: Committer

Message
Author
SlicerDicer
Krill Swarm
Posts: 10
Joined: Sun Mar 12, 2006 7:40 am

#181 Post by SlicerDicer »

I dont know if any of this is what you have been looking for but this is the information I got out of gdb like I said I am not very good with it.

Code: Select all

1142215636 ERROR  : ClientNetworkCore::ConnectToInternetServer : Call to NET2_TCPConnectTo() failed with server= "localhost"; SDL_net2 error: "NET2: can't open a socket"
1142215636 ERROR  : ClientNetworkCore::ConnectToInternetServer : Call to NET2_TCPConnectTo() failed with server= "localhost"; SDL_net2 error: "NET2: can't open a socket"
1142215636 ERROR  : ClientNetworkCore::ConnectToInternetServer : Call to NET2_TCPConnectTo() failed with server= "localhost"; SDL_net2 error: "NET2: can't open a socket"
1142215636 ERROR  : ClientNetworkCore::ConnectToInternetServer : Call to NET2_TCPConnectTo() failed with server= "localhost"; SDL_net2 error: "NET2: can't open a socket"

Code: Select all

Program received signal SIGINT, Interrupt.
0x00002aaaabbbbeff in write () from /lib/libpthread.so.0
(gdb) bt
#0  0x00002aaaabbbbeff in write () from /lib/libpthread.so.0
#1  0x00002aaaaca399b4 in log4cpp::FileAppender::_append (this=0x9ab2c0,
    event=@0x7fffffefa900) at basic_string.h:1465
#2  0x00002aaaaca429ed in log4cpp::Category::callAppenders (this=0x9ab220,
    event=@0x7fffffefa900) at stl_tree.h:244
#3  0x00002aaaaca42456 in log4cpp::Category::_logUnconditionally2 (
    this=0x9ab220, priority=300, message=@0x7fffffefa9a0) at Category.cpp:260
#4  0x00002aaaaca41869 in log4cpp::Category::log (this=0x9ab220, priority=300,
    message=@0x7fffffefa9a0) at Category.cpp:280
#5  0x00002aaaaca43c62 in log4cpp::CategoryStream::flush (this=0x7fffffefa9e0)
    at CategoryStream.hh:55
#6  0x00000000005f99e8 in ClientNetworkCore::ConnectToServer ()
#7  0x00000000005f9c88 in ClientNetworkCore::ConnectToLocalhostServer ()
#8  0x00000000006a1a37 in IntroScreen::OnSinglePlayer ()
#9  0x00000000006a921d in boost::detail::function::void_function_obj_invoker0<boost::_bi::bind_t<void, boost::_mfi::mf0<void, IntroScreen>, boost::_bi::list1<boost::_bi::value<IntroScreen*> > >, void>::invoke ()
#10 0x0000000000458e58 in boost::function0<void, std::allocator<void> >::operator() ()
#11 0x000000000045905d in boost::operator++<boost::signals::detail::slot_call_iterator<boost::signals::detail::call_bound0<void>::caller<boost::function<void ()(), std::allocator<void> > >, boost::signals::detail::named_slot_map_iterator>, boost::signals::detail::unusable, boost::single_pass_traversal_tag, boost::signa---Type <return> to continue, or q <return> to quit---
ls::detail::unusable const&, long> ()
#12 0x0000000000459597 in boost::signal0<void, boost::last_value<void>, int, std::less<int>, boost::function<void ()(), std::allocator<void> > >::operator() ()
#13 0x00002aaaab49f1da in GG::Wnd::HandleEvent ()
   from /usr/local/lib/libGiGi.so
#14 0x00002aaaab443393 in GG::GUI::HandleGGEvent ()
   from /usr/local/lib/libGiGi.so
#15 0x00002aaaaabc5771 in SDLGUI::HandleSystemEvents ()
   from /usr/local/lib/libGiGiSDL.so
#16 0x00002aaaab42aeb0 in GG::EventPump::operator() ()
   from /usr/local/lib/libGiGi.so
#17 0x00002aaaaabc5a0e in SDLGUI::Run () from /usr/local/lib/libGiGiSDL.so
#18 0x00000000005f6d74 in main ()

Code: Select all

Catchpoint 1 (exception thrown)
0x00002aaaacc07ed0 in __cxa_throw () from /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/libstdc++.so.6
(gdb) WARNING: You are using the SDL dummy video driver!
WARNING: You are using the SDL dummy video driver!
WARNING: You are using the SDL dummy video driver!
terminate called after throwing an instance of 'std::out_of_range'
  what():  basic_string::substr
1142215979 FATAL  : Initiating Exit (code 1 - error termination)
1142215979 FATAL  : Initiating Exit (code 1 - error termination)
1142215979 FATAL  : Initiating Exit (code 1 - error termination)
1142215979 FATAL  : Initiating Exit (code 1 - error termination)
Quit
(gdb) bt
#0  0x00002aaaacc07ed0 in __cxa_throw () from /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/libstdc++.so.6
#1  0x00002aaaacbaa690 in std::__throw_out_of_range () from /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/libstdc++.so.6
#2  0x00000000004683ef in NetworkCore::ReceiveData ()
#3  0x00000000005fadc8 in ClientNetworkCore::HandleNetEvent ()
#4  0x00002aaaaabc5710 in SDLGUI::HandleSystemEvents () from /usr/local/lib/libGiGiSDL.so
#5  0x00002aaaab42aeb0 in GG::EventPump::operator() () from /usr/local/lib/libGiGi.so
#6  0x00002aaaaabc5a0e in SDLGUI::Run () from /usr/local/lib/libGiGiSDL.so
#7  0x00000000005f6d74 in main ()
        

tzlaine
Programming Lead Emeritus
Posts: 1092
Joined: Thu Jun 26, 2003 1:33 pm

#182 Post by tzlaine »

I'm lost. Why are there two stack traces?

SlicerDicer
Krill Swarm
Posts: 10
Joined: Sun Mar 12, 2006 7:40 am

#183 Post by SlicerDicer »

cause I dont know what you needed hehe.

tzlaine
Programming Lead Emeritus
Posts: 1092
Joined: Thu Jun 26, 2003 1:33 pm

#184 Post by tzlaine »

I thought it would be clear from my question that I don't know what these are stack traces of. What are these stack traces of? In other wirds, tell me what you did to get each output.

Yoghurt
Programmer
Posts: 376
Joined: Sat Jun 28, 2003 8:17 pm
Location: Heidelberg, Germany

#185 Post by Yoghurt »

I think the first bt is after he pressed Ctrl+C (SIGINT), the second one is the one you are looking for.
NetworkCore::RecieveData throws an out_of_range exception.

SlicerDicer
Krill Swarm
Posts: 10
Joined: Sun Mar 12, 2006 7:40 am

#186 Post by SlicerDicer »

the last peice is right before it barfed and I backtraced or whatever like you said after it puked. if that makes sense


1142332207 FATAL : ServerNetworkCore::ServerNetworkCore : failed to open port 12347 for TCP connections. SDL_net2 error: NET2: can't open a socket
1142332207 FATAL : Initiating Exit (code 1 - error termination)

When I select single player it does this... once I hit OK it dies and I have to killall it or it wont go away. I dont know what to do about this or how to fix it. I migrated it to a 32bit machine hoping to have better luck but its not happening :cry: :cry:

SlicerDicer
Krill Swarm
Posts: 10
Joined: Sun Mar 12, 2006 7:40 am

#187 Post by SlicerDicer »

Well I found out a bit more.

Code: Select all

netstat -anp | grep freeorion
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0 0.0.0.0:12347           0.0.0.0:*               LISTEN     7423/freeoriond
tcp        0      1 192.168.1.190:47045     127.0.0.1:12347         SYN_SENT   7386/freeorion
udp        0      0 0.0.0.0:32902           0.0.0.0:*                          7386/freeorion
udp        0      0 0.0.0.0:12345           0.0.0.0:*                          7423/freeoriond
unix  3      [ ]         STREAM     CONNECTED     232434   7386/freeorion
unix  3      [ ]         STREAM     CONNECTED     232432   7386/freeorion
unix  3      [ ]         STREAM     CONNECTED     232430   7386/freeorion

Code: Select all

lsof |grep 12347
freeorion  7386       user   15u     IPv4     232814                TCP 192.168.1.190:47045->localhost:12347 (SYN_SENT)
freeorion  7423       user   15u     IPv4     232812                TCP *:12347 (LISTEN)

Code: Select all

1142383852 ERROR  : ClientNetworkCore::ConnectToInternetServer : Call to NET2_TCPConnectTo() failed with server= "localhost"; SDL_net2 error: "NET2: can't open a socket"
I get a error in the screen that says "Connection timed out while trying to connect to server" or something similar. I dont know what to do or how to get this working.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

#188 Post by Geoff the Medio »

Do you have a firewall? Is it configured to let FO access the internet? (which is needs to do to do local networking... or somesuch... I'm not too sure of the technical details... though ZoneAlarm re-asks about FO every time I compile or install a new point release)

SlicerDicer
Krill Swarm
Posts: 10
Joined: Sun Mar 12, 2006 7:40 am

#189 Post by SlicerDicer »

so the port needs to be open on the firewall to play a local game? I dont mind messing with it just wondering.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

#190 Post by Geoff the Medio »

SlicerDicer wrote:so the port needs to be open on the firewall to play a local game? I dont mind messing with it just wondering.
As far as I know...

I guess it's easier to write just one player/network interface and use it for both local and networked client connections.

SlicerDicer
Krill Swarm
Posts: 10
Joined: Sun Mar 12, 2006 7:40 am

#191 Post by SlicerDicer »

will give it a shot here and report back once I test it.

Not working still the same issue :/

Interesting find. I launched the .2 version server on my mac. I loaded up the .3 version client on linux and connected to that computer by IP and it launched the game but instantly the server crashed. I am thinking if I create a server on a differnet computer of mine.... I might just be able to play! We shall see if I can ever get it to compile on my system setting next to me. GiGi barfs out on

Code: Select all

g++ -pthread -D_REENTRANT -Wall -O2 -fPIC -I/usr/include/SDL -I/usr/include/freetype2 -I. -Ilibltdl -c -o src/StyleFactory.os src/StyleFactory.cpp
In file included from src/StyleFactory.cpp:38:
GG/Spin.h: In member function `virtual void
   GG::Spin<T>::DefineAttributes(GG::WndEditor*)':
GG/Spin.h:503: error: parse error before `>' token
GG/Spin.h:504: error: parse error before `>' token
GG/Spin.h:506: error: parse error before `>' token
GG/Spin.h:508: error: parse error before `>' token
GG/Spin.h:511: error: parse error before `>' token
scons: *** [src/StyleFactory.os] Error 1
scons: building terminated because of errors.
Anyway I am figuring this is a problem with networking on localhost I dont know how to fix it I am a absolute twit when it comes to networking. Anyway I am getting excited now :)


[edit]

viewtopic.php?t=1297&highlight=stylefactory

Did not notice that thread I will try that :)

renihs
Space Floater
Posts: 35
Joined: Fri Feb 10, 2006 12:14 pm

#192 Post by renihs »

GG/Spin.h:503: error: parse error before `>' token

this is a gcc issue, you are most likely using 3.3.x, upgrade to 3.4.x or higher

User avatar
Sheldar
Space Floater
Posts: 38
Joined: Mon Jul 24, 2006 9:28 pm

Where to start?

#193 Post by Sheldar »

Sorry if this has already been covered somewhere. I am looking for a starting point. I have downloaded a bunch of source and started to look through it. I have downloaded scons and boost but can't get them to work together (configuration error on my part I am sure.) I am looking into which version of GNU to use and such.

This is all to say is there a page that specifies the version of each of the toolsets to use and give the compilation instructions? If not let me know and I will continue stumbling around but thought if the data exists already there is no reason to recreate it.

Posting a link to a previous discussion on this would be great :D

User avatar
pd
Graphics Lead Emeritus
Posts: 1924
Joined: Mon Mar 08, 2004 6:17 pm
Location: 52°16'N 10°31'E

#194 Post by pd »

Something like this?

User avatar
Sheldar
Space Floater
Posts: 38
Joined: Mon Jul 24, 2006 9:28 pm

#195 Post by Sheldar »

Exactly what I am looking for. I could have sworn that the last time I looked at that it was trashed. Someone has said that the project was canceled because of too many anonymous edits. Ugh.

Post Reply