Error Strange WTF problem with Orb:Connect 2.1 @ KSC

STS

Well-known member
Joined
Feb 1, 2009
Messages
532
Reaction score
274
Points
78
Location
Vigo
Website
orbisondas.es
Hello, I am developing a upgrade for the Mission Control telemetry systems on my Sim Group. For the moment, we have been using a script in PHP. But now I want to use a desktop application in Java because that allows me (with my knowledge and experimentation) to receive data every 0.5 seconds in slow and fast connections.

Well, the problem is that I was testing today a remote connection via Hamachi to a member´s orbiter who was running DG-IV on Cold & Dark config at runway 33 on KSC, with default scenery. I insert the Hamachi IP adress of the member and hit the Connect button. The program starts receiving data, and I say "Great, It´s working!" but he says "Nope, I got a CTD Here".

I try the same on my local machine and the same nuclear weapon explodes at KSC causing me a CTD, too...

So I start investigating. And discovered that the problem is in this class, in the line that I will signal.

Code:
//Note this code is half in Spanish :P
package ObtencionDatos;

import GUI.Ventanas;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.net.Socket;
import java.net.UnknownHostException;

/**
 *
 * @author TurryBoeing
 */
public class ObtenerFuel extends Thread {

    public static Socket socket1;
//    ObtenerFuelMasa masafuel = new ObtenerFuelMasa();

    @Override
    public void run() {
        try {
            socket1 = new Socket(Ventanas.ipNave.getText(), 37777);

            //Esto lee: El buffered reader obtiene datos del Orbiter. El DataOutputStream manda los comandos al Orbiter            

            BufferedReader entrada = new BufferedReader(new InputStreamReader(socket1.getInputStream()));
            PrintStream salida = new PrintStream(socket1.getOutputStream());
            Splitear splitear = new Splitear();
            System.out.println(this.getName() + "Conexión. Enviando mensaje.");
            while (socket1.isConnected()) {
                if (socket1.isClosed()) {
                    break;
                }
                salida.println("[B]SHIP:FOCUS:Status2:1:0:0[/B]");
                String valorobtenido[];
                valorobtenido = splitear.Splitea(entrada.readLine());
                Thread.sleep(500);
                valorobtenido=splitear.SpliteaPuntoComa(valorobtenido[1]);
                String fuels[];
                fuels=splitear.SpliteaComas(valorobtenido[1]);
                
//                String fuelmax = valorobtenido[1];
                int fuel = (int)(Double.valueOf(fuels[1])*100);
                
                GUI.Ventanas.ProgressFuel.setValue(Integer.valueOf(fuel));
            }
            //socket1.close();
        } catch (UnknownHostException ex) {
            System.out.println("Host desconocido: " + ex.getMessage());
        } catch (IOException ex) {
            System.out.println("Error I/O " + ex.getMessage());
        } catch (InterruptedException ex) {
            System.out.println("Proceso interrumpido " + ex.getMessage());
        }
    }
}

So this is the thread that when launched on KSC rwy 33 on any ship (no failure when on other base or flying) makes orbiter CTD

So I think this is problem of my code, but I test this command on the OrbConnect test client (on Doc folder in Orbiter) SHIP:FOCUS:Status2:1:0:0 and Orbiter also CTD´s so...

Has anybody else got this problem when testing this command with a ship landed in that location? (rwy 33 KSC with default scenery). This can cause several problems to me.

Using Orb:Connect 2.1 .

The algorithm in the PHP Version was different to obtain the fuel level, but was unable to implement it in Java. Will try retrying if nobody has this problem.
 
Last edited:

yagni01

Addon Developer
Addon Developer
Donator
Joined
Feb 8, 2008
Messages
463
Reaction score
0
Points
16
Location
Atlanta, GA
Real Life is in my way right now, but I'll try and take a look when I can. Is there anything in the orbiter log? Does the client get a response before the CTD?

It only happens with the updated (for P10) DG-IV only? And KSC rwy 33? Very strainge.
 

STS

Well-known member
Joined
Feb 1, 2009
Messages
532
Reaction score
274
Points
78
Location
Vigo
Website
orbisondas.es
Nothing in the Orbiter.log, iĺl edit this post when I get home and upload it.

The CTD Occurs as soon as I send the SHIP:FOCUS:Status2:1:0:0 or SHIP:FOCUS:Status2, or SHIP:GL-01:Status2, or SHIP:GL-01:Status2:1:0:0

I would say that it happens in the Shuttle Landing Facility, not in the rwy 33, and yes, with any ship. Of course, we are using Orbiter 2010-P1.

I solved this problem because I changed the algorithm to obtain the fuel quantity using Fuel Mass and MaxFuelMass, but itś a :facepalm:that i cant use Status2.

Code:
**** Orbiter.log
Build Aug 30 2010 [v.100830]
Timer precision: 3.31069e-007 sec
Found 0 joystick(s)
Devices enumerated: 6
Devices accepted: 5
==> RGB Emulation
==> Direct3D HAL
==> Direct3D T&L HAL
==> Direct3D HAL (NVIDIA GeForce GT 240)
==> Direct3D T&L HAL (NVIDIA GeForce GT 240)
Module AtlantisConfig.dll .... [Build 100830, API 100830]
Module AtmConfig.dll ......... [Build 100830, API 100830]
Module DGConfigurator.dll .... [Build 100830, API 100830]
Module OrbConnect.dll ........ [Build 120804, API 100830]
Module OrbiterSound.dll ...... [Build 121120, API 100830]
Module ScnEditor.dll ......... [Build 100830, API 100830]

**** Creating simulation session
DirectDraw interface OK
Direct3D interface OK
Graphics: Viewport: Window 1274 x 996 x 32
Graphics: Hardware T&L capability: Yes
Graphics: Z-buffer depth: 32 bit
Graphics: Active lights supported: 8
Loading 15382 records from star database
Module Sun.dll ............... [Build 100830, API 100830]
VSOP87(E) Sun: Precision 1e-006, Terms 554/6634
Module Mercury.dll ........... [Build 100830, API 100830]
VSOP87(B) Mercury: Precision 1e-005, Terms 167/7123
Module Venus.dll ............. [Build 100830, API 100830]
Module VenusAtm2006.dll ...... [Build 100830, API 100830]
VSOP87(B) Venus: Precision 1e-005, Terms 79/1710
Module Earth.dll ............. [Build 100830, API 100830]
Module EarthAtmJ71G.dll ...... [Build 100830, API 100830]
VSOP87(B) Earth: Precision 1e-008, Terms 2564/2564
Module Moon.dll .............. [Build 100830, API 100830]
ELP82: Precision 1e-005, Terms 116/829
Module Mars.dll .............. [Build 100830, API 100830]
Module MarsAtm2006.dll ....... [Build 100830, API 100830]
VSOP87(B) Mars: Precision 1e-005, Terms 405/6400
Module Phobos.dll ............ [Build ******, API 060425]
Module Deimos.dll ............ [Build ******, API 060425]
Module Galsat.dll ............ [Build 100217, API 100215]
Module Jupiter.dll ........... [Build 100830, API 100830]
VSOP87(B) Jupiter: Precision 1e-006, Terms 1624/3625
Module Io.dll ................ [Build 100217, API 100215]
Module Europa.dll ............ [Build 100217, API 100215]
Module Ganymede.dll .......... [Build 100217, API 100215]
Module Callisto.dll .......... [Build 100217, API 100215]
Module Satsat.dll ............ [Build 100215, API 100212]
Module Saturn.dll ............ [Build 100830, API 100830]
VSOP87(B) Saturn: Precision 1e-006, Terms 2904/6365
Module Mimas.dll ............. [Build 100215, API 100212]
SATSAT Mimas: Terms 113
Module Enceladus.dll ......... [Build 100215, API 100212]
SATSAT Enceladus: Terms 33
Module Tethys.dll ............ [Build 100215, API 100212]
SATSAT Tethys: Terms 101
Module Dione.dll ............. [Build 100215, API 100212]
SATSAT Dione: Terms 59
Module Rhea.dll .............. [Build 100215, API 100212]
SATSAT Rhea: Terms 68
Module Titan.dll ............. [Build 100215, API 100212]
SATSAT Titan: Terms 100
Module Iapetus.dll ........... [Build 100215, API 100212]
SATSAT Iapetus: Terms 605
Module Uranus.dll ............ [Build 100830, API 100830]
VSOP87(B) Uranus: Precision 1e-006, Terms 1827/5269
Module Miranda.dll ........... [Build ******, API 060425]
Module Ariel.dll ............. [Build ******, API 060425]
Module Umbriel.dll ........... [Build ******, API 060425]
Module Titania.dll ........... [Build ******, API 060425]
Module Oberon.dll ............ [Build ******, API 060425]
Module Neptune.dll ........... [Build 100830, API 100830]
VSOP87(B) Neptune: Precision 1e-006, Terms 391/2024
Finished initialising world
Module DeltaGliderIV.dll ..... [Build ******, API 060425]
Finished initialising status
Finished initialising camera
Finished initialising panels
OrbConnect::Initializing solar system with 32 bodies
OrbConnect::Found Config File
OrbConnect::Module Initialized
Finished setting up render state
 
Last edited:
Top