Re: [Flightgear-devel] Bug in mp-visibility of planes?
Hi Mathias, Thanks! Maik Mathias Fröhlich schrieb am 22.11.2006 18:19: Hi, On Tuesday 21 November 2006 18:40, Maik Justus wrote: can someone add this patch to cvs (head and plib-branch)? It's clear how and why it works and it corrects a (at least in msvc-builds) clear visible bug. Done. It got lost within other stuff ... Thanks Mathias - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Bug in mp-visibility of planes?
Hi, anyone seeing any risk in this patch? If not, I would like to ask to put it into cvs. Maik Maik Justus schrieb am 14.11.2006 00:19: Hi, I've checked, that I still need this patch to avoid a freeze of the MP-Scenery after reset. Can someone confirm, that other users (on msvc?) do not have this problem (freezing of the other MP-aircrafts after reset)? Maik Maik Justus schrieb am 01.10.2006 15:11: Hi, this effect is caused by the globals-set_sim_time_sec( 0.0 ); call when resetting. After this the stored time offset mTimeOffset in AIMultiplayer.cxx is wrong and it needs much time this offset is corrected. I don't know, why this bug is only visible in windows (at least it is not reported for other os). Please find enclosed a patch for AIMultiplayer.cxx, which detects and corrects large time offsets. (I only tested it very shortly, but i t seems to work (at least as a workaround)). Maik Maik Justus wrote: Hi, Maik Justus wrote: Hi, Maik Justus wrote: After choosing Reset in the File menu, all multiplayer aircrafts stop moving. after some time the multiplayer aircrafts start moving again. I am not sure, but I could be, that this some time is about the duration of the last session (time since the prior reset resp. starting of flightgear to the reset). Index: AIMultiplayer.cxx === RCS file: /var/cvs/FlightGear-0.9/source/src/AIModel/AIMultiplayer.cxx,v retrieving revision 1.10 diff -u -p -r1.10 AIMultiplayer.cxx --- AIMultiplayer.cxx 8 Aug 2006 17:57:33 - 1.10 +++ AIMultiplayer.cxx 1 Oct 2006 12:47:50 - @@ -129,7 +129,7 @@ void FGAIMultiplayer::update(double dt) mTimeOffset = curentPkgTime - curtime - lag; } else { double offset = curentPkgTime - curtime - lag; -if (!mAllowExtrapolation offset + lag mTimeOffset) { +if ((!mAllowExtrapolation offset + lag mTimeOffset)||(offset - 10 mTimeOffset)) { mTimeOffset = offset; SG_LOG(SG_GENERAL, SG_DEBUG, Resetting time offset adjust system to avoid extrapolation: time offset = mTimeOffset); - SF.net email is sponsored by: A Better Job is Waiting for You - Find it Now. Check out Slashdot's new job board. Browse through tons of technical jobs posted by companies looking to hire people just like you. http://jobs.slashdot.org/ ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Bug in mp-visibility of planes?
Hi, I've checked, that I still need this patch to avoid a freeze of the MP-Scenery after reset. Can someone confirm, that other users (on msvc?) do not have this problem (freezing of the other MP-aircrafts after reset)? Maik Maik Justus schrieb am 01.10.2006 15:11: Hi, this effect is caused by the globals-set_sim_time_sec( 0.0 ); call when resetting. After this the stored time offset mTimeOffset in AIMultiplayer.cxx is wrong and it needs much time this offset is corrected. I don't know, why this bug is only visible in windows (at least it is not reported for other os). Please find enclosed a patch for AIMultiplayer.cxx, which detects and corrects large time offsets. (I only tested it very shortly, but i t seems to work (at least as a workaround)). Maik Maik Justus wrote: Hi, Maik Justus wrote: Hi, Maik Justus wrote: After choosing Reset in the File menu, all multiplayer aircrafts stop moving. after some time the multiplayer aircrafts start moving again. I am not sure, but I could be, that this some time is about the duration of the last session (time since the prior reset resp. starting of flightgear to the reset). - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel Index: AIMultiplayer.cxx === RCS file: /var/cvs/FlightGear-0.9/source/src/AIModel/AIMultiplayer.cxx,v retrieving revision 1.10 diff -u -p -r1.10 AIMultiplayer.cxx --- AIMultiplayer.cxx 8 Aug 2006 17:57:33 - 1.10 +++ AIMultiplayer.cxx 1 Oct 2006 12:47:50 - @@ -129,7 +129,7 @@ void FGAIMultiplayer::update(double dt) mTimeOffset = curentPkgTime - curtime - lag; } else { double offset = curentPkgTime - curtime - lag; -if (!mAllowExtrapolation offset + lag mTimeOffset) { +if ((!mAllowExtrapolation offset + lag mTimeOffset)||(offset - 10 mTimeOffset)) { mTimeOffset = offset; SG_LOG(SG_GENERAL, SG_DEBUG, Resetting time offset adjust system to avoid extrapolation: time offset = mTimeOffset); - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Bug in mp-visibility of planes?
Hi both, Mathias Fröhlich wrote: On Friday 06 October 2006 21:31, Maik Justus wrote: @Mathias Fr=F6hlich Did you looked on this? Can you tell me if removing the broadcast flag from the plib socket will help (attached patch)? I wonder why I never noticed, maybe I didn't fly while looking from exterior for a while. Yes, I see an effect that resembles the one already described: While sitting on the runway I see exactly one aircraft, but when it accelerates then a second aircraft becomes visible whose distance from the first aircraft appears to increase proportionally to the velocity. I did some checks with different settings of multiplay=out/=in and noticed, that the effect depends solely on the multiplay=out setting. In this case I set: --multiplay=out,10,mpserver01.flightgear.org,5002 and _no_ --multiplay=in at all !!, still I see the mentioned echo of my aircraft. Neither combination of the two patches that were posted by Maik or Mathias are able to cure this. I guess these are not really precise explanations, still I have the hope they make it at least a bit easier for you to spot the problem. Cheers, Martin. P.S.: PLIB, SimGear, FlightGear are from current CVS (yes, I know PLIB just switched over to SVN), System is Linux x86_64. -- Unix _IS_ user friendly - it's just selective about who its friends are ! -- - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Bug in mp-visibility of planes?
Martin Spott wrote: and _no_ --multiplay=in at all !!, still I see the mentioned echo of my aircraft. Neither combination of the two patches that were posted by Maik or Mathias are able to cure this. Hmmm, did I miss a patch ? My server had a severe, physical crash last weekend (it hit the bottom of the rack from 15 cm and both redundant system disks died). While re-importing the backlog I might have accidentially dropped a few EMails Could maybe someone create a collection of those patches that I should investigate ? Martin. -- Unix _IS_ user friendly - it's just selective about who its friends are ! -- - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Bug in mp-visibility of planes?
Hi. I fear I introduced a bug on the server side: (from the server logfile) 14.10.2006 18:58:59 New LOCAL Client: FG1707 84.62.155.15:5000 (Aircraft/c310u3a/Models/c310u3a.xml) 14.10.2006 18:58:59 current clients: 1 max: 1 14.10.2006 18:58:59 New REMOTE Client: FG1707 127.0.0.1:5002 (Aircraft/c310u3a/Models/c310u3a.xml) 14.10.2006 18:58:59 current clients: 2 max: 2 Looks, like the server sends packets to itself, thinking it comes from a relay. Give me some hours... - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Bug in mp-visibility of planes?
On Samstag, 14. Oktober 2006 19:07, Oliver Schroeder wrote: Hi. I fear I introduced a bug on the server side: Well, it wasn't me ;) But this bug is funny anyway. The bug is in plib (or server config, depending on your viepoint). We had mpserver03.flightgear.org configured to be a relay (server side). But: magrathea 2$ host mpserver03.flightgear.org Host mpserver03.flightgear.org not found: 3(NXDOMAIN) (mpserver03.flightgear.org is an alias for flamebunny.homelinux.net, which is currently down). As a result we get in plib here: --- cut (void netAddress::set(...) --- sin_addr = inet_addr ( host ) ; if ( sin_addr == INADDR_NONE ) { struct hostent *hp = gethostbyname ( host ) ; if ( hp != NULL ) »·memcpy ( (char *) sin_addr, hp-h_addr, hp-h_length ) ; else { perror ( netAddress::set ) ; sin_addr = INADDR_ANY ; } } --- cut --- The gethostbyname() call returns NULL, so sin_addr = INADDR_ANY ; counts... (we don't know who we should send to, so we send to all. The right one will be there ...). So, the solution is to simply remove mpserver03 from the relay list. Another would be to fix plib. I've fixed the config of mpserver01. Please give pigeon some time to fix the config on mpserver02 and mpserver04. regards, Oliver - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Bug in mp-visibility of planes?
Oliver Schroeder wrote: On Samstag, 14. Oktober 2006 19:07, Oliver Schroeder wrote: I fear I introduced a bug on the server side: Well, it wasn't me ;) Better late then never :-)) As a result we get in plib here: Even I managed to understand this code - once you pointed at the respective location. Thanks a lot for tracking this down, Martin. -- Unix _IS_ user friendly - it's just selective about who its friends are ! -- - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Bug in mp-visibility of planes?
I've fixed the config of mpserver01. Please give pigeon some time to fix the config on mpserver02 and mpserver04. Fixed, done. Thanks a lot for looking into this. Pigeon. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Bug in mp-visibility of planes?
Hi Mathias, I have noticed this bug occurring for myself. Flightgear was set to connect to fgserver03 (currently down??) and I saw the echo of my own plane. Commenting out the line deleted in your patch resolved this issue. I'd like to see this patch committed to CVS. System: OS: Linux 2.6.15 Arch: amd64 Regards George On Tue, 2006-10-10 at 07:41 +0200, Mathias Fröhlich wrote: Maik, sorry for the long delay. The weather these days was too good to stay inside :) On Friday 06 October 2006 21:31, Maik Justus wrote: @Mathias Fröhlich Did you looked on this? Yes, but I expect that the problem is something different. We have at the moment a more or less crappy port/host handling for multiplayer packets. I think that must be cleaned up anyway. At best I think that the multiplayermanager recieve code should move into Network/multiplayer.cxx. Also the configuration of the appropriate sockets can then happen in the same file. I would expect that this would help much. My guess is that your own computer will broadcast your own position packets to a network where your own computer is already attached to. So you will see the same plane twice. May be the broadcast setting is implemented somehow different in plib's win32 code. Can you tell me if removing the broadcast flag from the plib socket will help (attached patch)? Greetings Mathias - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel -- George Patterson [EMAIL PROTECTED] - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Bug in mp-visibility of planes?
Maik, sorry for the long delay. The weather these days was too good to stay inside :) On Friday 06 October 2006 21:31, Maik Justus wrote: @Mathias Fröhlich Did you looked on this? Yes, but I expect that the problem is something different. We have at the moment a more or less crappy port/host handling for multiplayer packets. I think that must be cleaned up anyway. At best I think that the multiplayermanager recieve code should move into Network/multiplayer.cxx. Also the configuration of the appropriate sockets can then happen in the same file. I would expect that this would help much. My guess is that your own computer will broadcast your own position packets to a network where your own computer is already attached to. So you will see the same plane twice. May be the broadcast setting is implemented somehow different in plib's win32 code. Can you tell me if removing the broadcast flag from the plib socket will help (attached patch)? Greetings Mathias Index: src/MultiPlayer/multiplaymgr.cxx === RCS file: /var/cvs/FlightGear-0.9/source/src/MultiPlayer/multiplaymgr.cxx,v retrieving revision 1.10 diff -u -r1.10 multiplaymgr.cxx --- src/MultiPlayer/multiplaymgr.cxx 10 Oct 2006 05:17:07 - 1.10 +++ src/MultiPlayer/multiplaymgr.cxx 10 Oct 2006 05:34:10 - @@ -201,7 +201,6 @@ return false; } mSocket-setBlocking(false); - mSocket-setBroadcast(true); if (mSocket-bind(rxAddress.c_str(), rxPort) != 0) { perror(bind); SG_LOG( SG_NETWORK, SG_ALERT, - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Bug in mp-visibility of planes?
@Mathias Fröhlich Did you looked on this? Maik Maik Justus schrieb: Hi, this effect is caused by the globals-set_sim_time_sec( 0.0 ); call when resetting. After this the stored time offset mTimeOffset in AIMultiplayer.cxx is wrong and it needs much time this offset is corrected. I don't know, why this bug is only visible in windows (at least it is not reported for other os). Please find enclosed a patch for AIMultiplayer.cxx, which detects and corrects large time offsets. (I only tested it very shortly, but i t seems to work (at least as a workaround)). Maik Maik Justus wrote: Hi, Maik Justus wrote: Hi, Maik Justus wrote: After choosing Reset in the File menu, all multiplayer aircrafts stop moving. after some time the multiplayer aircrafts start moving again. I am not sure, but I could be, that this some time is about the duration of the last session (time since the prior reset resp. starting of flightgear to the reset). - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Bug in mp-visibility of planes?
Hi, this effect is caused by the globals-set_sim_time_sec( 0.0 ); call when resetting. After this the stored time offset mTimeOffset in AIMultiplayer.cxx is wrong and it needs much time this offset is corrected. I don't know, why this bug is only visible in windows (at least it is not reported for other os). Please find enclosed a patch for AIMultiplayer.cxx, which detects and corrects large time offsets. (I only tested it very shortly, but i t seems to work (at least as a workaround)). Maik Maik Justus wrote: Hi, Maik Justus wrote: Hi, Maik Justus wrote: After choosing Reset in the File menu, all multiplayer aircrafts stop moving. after some time the multiplayer aircrafts start moving again. I am not sure, but I could be, that this some time is about the duration of the last session (time since the prior reset resp. starting of flightgear to the reset). AIMultiplayer.diff.gz Description: application/gzip - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Bug in mp-visibility of planes?
I commited a fix for this specific problem, as diagnosed by Maik. I will look at Olaf's code later. -Fred Mathias Fröhlich wrote : Hi Fred, Before I check in that. I know Olaf has an improoved timestamping implementation for win32. Did he already send that to you? Greetings Mathias On Sunday 20 August 2006 16:44, Maik Justus wrote: Hi Matthias, Mathias Fröhlich wrote: Hi Maik, On Sunday 13 August 2006 21:15, Maik Justus wrote: I still have this problem. Can you tell me, where in the source the 10 seconds timeout are tested? Then I can try, to find more detailed information. That would be great! That happens around line 420 in src/MultiPlayer/multiplaymgr.cxx. Greetings Mathias The problem is, that the elapsed time is queried in this way long stamp = timestamper.get_seconds(); but the timestamper update is calculated this way (file timestamp.cxx (simgear)): void SGTimeStamp::stamp() { #if defined( WIN32 ) !defined(__CYGWIN__) unsigned int t; t = timeGetTime(); seconds = 0;//-- comment by Maik: this is the problem usec = t * 1000; #elif defined( HAVE_GETTIMEOFDAY ) struct timeval current; struct timezone tz; // sg_timestamp currtime; gettimeofday(current, tz); seconds = current.tv_sec; usec = current.tv_usec; #elif defined( HAVE_GETLOCALTIME ) SYSTEMTIME current; GetLocalTime(current); seconds = current.wSecond; usec = current.wMilliseconds * 1000; #elif defined( HAVE_FTIME ) struct timeb current; ftime(current); seconds = current.time; usec = current.millitm * 1000; // -dw- uses time manager #elif defined( macintosh ) UnsignedWide ms; Microseconds(ms); seconds = ms.lo / 100; usec = ms.lo - ( seconds * 100 ); #else # error Port me #endif } For MSVC the seconds are allways zero, all the elapsed time is stored in usec. After splitting the elapsed time into usec and seconds and removing the #if defined( WIN32 ) !defined(__CYGWIN__) sections alls seems to work well (see enclosed diff for simgear). Please add it to CVS. Maik - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel -- Frédéric Bouvier http://frfoto.free.fr Photo gallery - album photo http://www.fotolia.fr/p/2278 Other photo gallery http://fgsd.sourceforge.net/ FlightGear Scenery Designer - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Bug in mp-visibility of planes?
Hi Fred, Before I check in that. I know Olaf has an improoved timestamping implementation for win32. Did he already send that to you? Greetings Mathias On Sunday 20 August 2006 16:44, Maik Justus wrote: Hi Matthias, Mathias Fröhlich wrote: Hi Maik, On Sunday 13 August 2006 21:15, Maik Justus wrote: I still have this problem. Can you tell me, where in the source the 10 seconds timeout are tested? Then I can try, to find more detailed information. That would be great! That happens around line 420 in src/MultiPlayer/multiplaymgr.cxx. Greetings Mathias The problem is, that the elapsed time is queried in this way long stamp = timestamper.get_seconds(); but the timestamper update is calculated this way (file timestamp.cxx (simgear)): void SGTimeStamp::stamp() { #if defined( WIN32 ) !defined(__CYGWIN__) unsigned int t; t = timeGetTime(); seconds = 0;//-- comment by Maik: this is the problem usec = t * 1000; #elif defined( HAVE_GETTIMEOFDAY ) struct timeval current; struct timezone tz; // sg_timestamp currtime; gettimeofday(current, tz); seconds = current.tv_sec; usec = current.tv_usec; #elif defined( HAVE_GETLOCALTIME ) SYSTEMTIME current; GetLocalTime(current); seconds = current.wSecond; usec = current.wMilliseconds * 1000; #elif defined( HAVE_FTIME ) struct timeb current; ftime(current); seconds = current.time; usec = current.millitm * 1000; // -dw- uses time manager #elif defined( macintosh ) UnsignedWide ms; Microseconds(ms); seconds = ms.lo / 100; usec = ms.lo - ( seconds * 100 ); #else # error Port me #endif } For MSVC the seconds are allways zero, all the elapsed time is stored in usec. After splitting the elapsed time into usec and seconds and removing the #if defined( WIN32 ) !defined(__CYGWIN__) sections alls seems to work well (see enclosed diff for simgear). Please add it to CVS. Maik - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Bug in mp-visibility of planes?
Maik, On Thursday 24 August 2006 19:23, Maik Justus wrote: Hi, to whom I have to address this patch to get it into simgear-cvs? To me is perfectly ok. I was offline for some days. Riding mountainbike in the alps ... Now catching up my mail backlog ... Will show up soon. I believe that the other problem you reported is independent of that timestamping problem. greetings Mathias - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Bug in mp-visibility of planes?
Hi, Maik Justus wrote: Hi, Maik Justus wrote: After splitting the elapsed time into usec and seconds and removing the #if defined( WIN32 ) !defined(__CYGWIN__) sections alls seems to work well (see enclosed diff for simgear). Please add it to CVS. Maik Hm, it seems, that this patch causes an other problem. After choosing Reset in the File menu, all multiplayer aircrafts stop moving. after some time the multiplayer aircrafts start moving again. I am not sure, but I could be, that this some time is about the duration of the last session (time since the prior reset resp. starting of flightgear to the reset). That's surprising, because the patch just make the functions to do with MSCV to work in the same way, as it works with all other compilers. Maik - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Bug in mp-visibility of planes?
Hi, to whom I have to address this patch to get it into simgear-cvs? Maik Maik Justus schrieb: Hi Matthias, Mathias Fröhlich wrote: Hi Maik, On Sunday 13 August 2006 21:15, Maik Justus wrote: I still have this problem. Can you tell me, where in the source the 10 seconds timeout are tested? Then I can try, to find more detailed information. That would be great! That happens around line 420 in src/MultiPlayer/multiplaymgr.cxx. Greetings Mathias The problem is, that the elapsed time is queried in this way long stamp = timestamper.get_seconds(); but the timestamper update is calculated this way (file timestamp.cxx (simgear)): void SGTimeStamp::stamp() { #if defined( WIN32 ) !defined(__CYGWIN__) unsigned int t; t = timeGetTime(); seconds = 0;//-- comment by Maik: this is the problem usec = t * 1000; #elif defined( HAVE_GETTIMEOFDAY ) struct timeval current; struct timezone tz; // sg_timestamp currtime; gettimeofday(current, tz); seconds = current.tv_sec; usec = current.tv_usec; #elif defined( HAVE_GETLOCALTIME ) SYSTEMTIME current; GetLocalTime(current); seconds = current.wSecond; usec = current.wMilliseconds * 1000; #elif defined( HAVE_FTIME ) struct timeb current; ftime(current); seconds = current.time; usec = current.millitm * 1000; // -dw- uses time manager #elif defined( macintosh ) UnsignedWide ms; Microseconds(ms); seconds = ms.lo / 100; usec = ms.lo - ( seconds * 100 ); #else # error Port me #endif } For MSVC the seconds are allways zero, all the elapsed time is stored in usec. After splitting the elapsed time into usec and seconds and removing the #if defined( WIN32 ) !defined(__CYGWIN__) sections alls seems to work well (see enclosed diff for simgear). Please add it to CVS. Maik ? timig.diff Index: timestamp.cxx === RCS file: /var/cvs/SimGear-0.3/source/simgear/timing/timestamp.cxx,v retrieving revision 1.5 diff -u -p -r1.5 timestamp.cxx --- timestamp.cxx 8 Mar 2006 18:16:10 - 1.5 +++ timestamp.cxx 20 Aug 2006 14:36:56 - @@ -72,8 +72,8 @@ void SGTimeStamp::stamp() { #if defined( WIN32 ) !defined(__CYGWIN__) unsigned int t; t = timeGetTime(); -seconds = 0; -usec = t * 1000; +seconds = t / 1000; +usec = (t - seconds * 1000) * 1000; #elif defined( HAVE_GETTIMEOFDAY ) struct timeval current; struct timezone tz; @@ -105,20 +105,12 @@ void SGTimeStamp::stamp() { // increment the time stamp by the number of microseconds (usec) SGTimeStamp operator + (const SGTimeStamp t, const long m) { -#if defined( WIN32 ) !defined(__CYGWIN__) -return SGTimeStamp( 0, t.usec + m ); -#else return SGTimeStamp( t.seconds + ( t.usec + m ) / 100, ( t.usec + m ) % 100 ); -#endif } // difference between time stamps in microseconds (usec) long operator - (const SGTimeStamp a, const SGTimeStamp b) { -#if defined( WIN32 ) !defined(__CYGWIN__) -return a.usec - b.usec; -#else return 100 * (a.seconds - b.seconds) + (a.usec - b.usec); -#endif } - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Bug in mp-visibility of planes?
Hi, Maik Justus wrote: After splitting the elapsed time into usec and seconds and removing the #if defined( WIN32 ) !defined(__CYGWIN__) sections alls seems to work well (see enclosed diff for simgear). Please add it to CVS. Maik Hm, it seems, that this patch causes an other problem. After choosing Reset in the File menu, all multiplayer aircrafts stop moving. That's surprising, because the patch just make the functions to do with MSCV to work in the same way, as it works with all other compilers. Therefore (and if the patch is really the root cause for this problem) I suppose, that there are some more #ifdef WIN32 in the multiplayer code... Maik - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Bug in mp-visibility of planes?
Hi Matthias, Mathias Fröhlich wrote: Hi Maik, On Sunday 13 August 2006 21:15, Maik Justus wrote: I still have this problem. Can you tell me, where in the source the 10 seconds timeout are tested? Then I can try, to find more detailed information. That would be great! That happens around line 420 in src/MultiPlayer/multiplaymgr.cxx. Greetings Mathias The problem is, that the elapsed time is queried in this way long stamp = timestamper.get_seconds(); but the timestamper update is calculated this way (file timestamp.cxx (simgear)): void SGTimeStamp::stamp() { #if defined( WIN32 ) !defined(__CYGWIN__) unsigned int t; t = timeGetTime(); seconds = 0;//-- comment by Maik: this is the problem usec = t * 1000; #elif defined( HAVE_GETTIMEOFDAY ) struct timeval current; struct timezone tz; // sg_timestamp currtime; gettimeofday(current, tz); seconds = current.tv_sec; usec = current.tv_usec; #elif defined( HAVE_GETLOCALTIME ) SYSTEMTIME current; GetLocalTime(current); seconds = current.wSecond; usec = current.wMilliseconds * 1000; #elif defined( HAVE_FTIME ) struct timeb current; ftime(current); seconds = current.time; usec = current.millitm * 1000; // -dw- uses time manager #elif defined( macintosh ) UnsignedWide ms; Microseconds(ms); seconds = ms.lo / 100; usec = ms.lo - ( seconds * 100 ); #else # error Port me #endif } For MSVC the seconds are allways zero, all the elapsed time is stored in usec. After splitting the elapsed time into usec and seconds and removing the #if defined( WIN32 ) !defined(__CYGWIN__) sections alls seems to work well (see enclosed diff for simgear). Please add it to CVS. Maik ? timig.diff Index: timestamp.cxx === RCS file: /var/cvs/SimGear-0.3/source/simgear/timing/timestamp.cxx,v retrieving revision 1.5 diff -u -p -r1.5 timestamp.cxx --- timestamp.cxx 8 Mar 2006 18:16:10 - 1.5 +++ timestamp.cxx 20 Aug 2006 14:36:56 - @@ -72,8 +72,8 @@ void SGTimeStamp::stamp() { #if defined( WIN32 ) !defined(__CYGWIN__) unsigned int t; t = timeGetTime(); -seconds = 0; -usec = t * 1000; +seconds = t / 1000; +usec = (t - seconds * 1000) * 1000; #elif defined( HAVE_GETTIMEOFDAY ) struct timeval current; struct timezone tz; @@ -105,20 +105,12 @@ void SGTimeStamp::stamp() { // increment the time stamp by the number of microseconds (usec) SGTimeStamp operator + (const SGTimeStamp t, const long m) { -#if defined( WIN32 ) !defined(__CYGWIN__) -return SGTimeStamp( 0, t.usec + m ); -#else return SGTimeStamp( t.seconds + ( t.usec + m ) / 100, ( t.usec + m ) % 100 ); -#endif } // difference between time stamps in microseconds (usec) long operator - (const SGTimeStamp a, const SGTimeStamp b) { -#if defined( WIN32 ) !defined(__CYGWIN__) -return a.usec - b.usec; -#else return 100 * (a.seconds - b.seconds) + (a.usec - b.usec); -#endif } - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Bug in mp-visibility of planes?
HI Matthias, Mathias Fröhlich wrote: Maik, On Monday 31 July 2006 23:49, Maik Justus wrote: And there is another bug. If someone left the game, the plane is displayed on my computer for ever. Maybe it's possible to use a time flag, when the last position update for a plane was received. If this flag is older than a threshold, the plane could be deleted? yes, I have the same problem with the cvs version. For cvs I am using msvc express while 9.10 I used the compiled windows file. We did our best to reproduce your problems with current cvs HEAD on Windows. Without luck! :) That is: - Aircraft disappeared past 10 seconds if a multiplayer left the game. - A non existent model does not stop a new existing models from being displayed. Can you provide us more information about that? Greetings Mathias I still have this problem. Can you tell me, where in the source the 10 seconds timeout are tested? Then I can try, to find more detailed information. Thank you, Maik - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Bug in mp-visibility of planes?
Hi Maik, On Sunday 13 August 2006 21:15, Maik Justus wrote: I still have this problem. Can you tell me, where in the source the 10 seconds timeout are tested? Then I can try, to find more detailed information. That would be great! That happens around line 420 in src/MultiPlayer/multiplaymgr.cxx. Greetings Mathias - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Bug in mp-visibility of planes?
Hi Maik, On Monday 31 July 2006 23:49, Maik Justus wrote: Also that should not stay that long. There is a timeout of 10 seconds that an aircraft is kept in the scene even if the network packets do no longer arrive. Can you verify if this is still the case with the cvs version? yes, I have the same problem with the cvs version. For cvs I am using msvc express while 9.10 I used the compiled windows file. I have tried to reproduce that with my local linux boxes on mpserver02.flightgear.org. But I can not reproduce any of that problems. If a MP client leaves the server it stays online for 10 seconds and then disappears. If an unknown model enters the scene it does not appear in the scene. But the next known model shows up. In this case I need some help on windows. I have somebody on my short range radar :) Greetings Mathias - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Bug in mp-visibility of planes?
Hi, Mathias Fröhlich schrieb: ... And there is another bug. If someone left the game, the plane is displayed on my computer for ever. Maybe it's possible to use a time flag, when the last position update for a plane was received. If this flag is older than a threshold, the plane could be deleted? Also that should not stay that long. There is a timeout of 10 seconds that an aircraft is kept in the scene even if the network packets do no longer arrive. Can you verify if this is still the case with the cvs version? Greetings Mathias yes, I have the same problem with the cvs version. For cvs I am using msvc express while 9.10 I used the compiled windows file. Maik - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Bug in mp-visibility of planes?
Hi, On Wednesday 05 July 2006 19:14, Maik Justus wrote: I think there is a bug in fg. I sometimes can not see the other planes (with fg0.9.10, not tested on cvs version) when using the multiplayer mode. It seems, that if there is one other player using a 3D model which can not be found on my computer, my computer do not display the planes of any player joining the game later, either if they using a 3D model installed on my pc. That should not happen. And there is another bug. If someone left the game, the plane is displayed on my computer for ever. Maybe it's possible to use a time flag, when the last position update for a plane was received. If this flag is older than a threshold, the plane could be deleted? Also that should not stay that long. There is a timeout of 10 seconds that an aircraft is kept in the scene even if the network packets do no longer arrive. Can you verify if this is still the case with the cvs version? Greetings Mathias -- Mathias Fröhlich, email: [EMAIL PROTECTED] Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
[Flightgear-devel] Bug in mp-visibility of planes?
Hi, I think there is a bug in fg. I sometimes can not see the other planes (with fg0.9.10, not tested on cvs version) when using the multiplayer mode. It seems, that if there is one other player using a 3D model which can not be found on my computer, my computer do not display the planes of any player joining the game later, either if they using a 3D model installed on my pc. Furthermore I would prefer, that, if a 3d model is not found on my computer, a default-model would be used instead. Maybe this would additionally fix the bug. And there is another bug. If someone left the game, the plane is displayed on my computer for ever. Maybe it's possible to use a time flag, when the last position update for a plane was received. If this flag is older than a threshold, the plane could be deleted? Maybe these bugs are known or already solved. Maik Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Bug in mp-visibility of planes?
On Wednesday 05 July 2006 18:14, Maik Justus wrote: Furthermore I would prefer, that, if a 3d model is not found on my computer, a default-model would be used instead. Maybe this would additionally fix the bug. This has been discussed quite a bit in the past and every time the conclusion has been that the current (intended!) behaviour is by far the best option available... Cheers, AJ Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel