RemoteTechnologiesGroup / RemoteTech

Community developed continuation of Kerbal Space Program's RemoteTech mod.
http://remotetechnologiesgroup.github.io/RemoteTech
GNU General Public License v2.0
233 stars 102 forks source link

Antennas don't transmit science in 1.1.2 #667

Closed Kyoyashi closed 7 years ago

Kyoyashi commented 8 years ago

I have an unmanned spacecraft, with connection to the ground station. Whenever I start trasmitting science, the percentage goes on, reaches 100%, the prompt say "Done", but no science is trasmitted.

The issue was discussed here.

I don't have Science Alert installed, only RO.

dcolclazier commented 8 years ago

I can confirm this is still an issue, at least with ScanSat , RP/RP-0 realism overhaul. The exact same thing happens with the RADAR Altimeter scanner.

AnghusMcleod commented 8 years ago

After upgrading physical memory in the computer from 8GB to 24GB, and transmitting data several times in a row, it was finally complete and science was removed from the vessel and registered at the space center.

If physical RAM can affect the game in this way, and without an error, something fundamental is broken.

AnghusMcleod commented 7 years ago

So, this is actually still happening with all scanners at all bodies.

It takes MANY retransmit attempts to finally get a confirmation of the science being transferred - I lost track after 30+ transmission attempts for biome scanner from Earth orbit.

Each attempt ends with "Done!" at 100% as if everything was fine - data is still on board the craft and not lost, just not transmitted either.

keyspace commented 7 years ago

I have only experienced this when there is insufficient ElectricCharge to operate the antenna continuously - that is, as expected.

keyspace commented 7 years ago

@AnghusMcleod, the log file you've posted in #511 has 3217 warnings and 3324 errors, which is a tad too much for a half-hour session. Many seem unrelated, but haven't checked all.

Only thing I found relevant - it has the likes of this for every body:

[LOG 18:51:41.887] [SCANsat] SCANsat resource celestial body config: [Earth] is empty; something probably went wrong here
[LOG 18:51:41.888] [SCANsat] No resources found assigned for Celestial Body: Earth, skipping...
neitsa commented 7 years ago

Hard to tell but just looking at the log file :( I'll take a look (i.e debug the issue) as soon as RT & ScanSat will be available on 1.2.

keyspace commented 7 years ago

After ... transmitting data several times in a row, it was finally complete and ... registered at the space center.

@AnghusMcleod - just watched a video where someone seems to be experiencing this; need clarification:

Were you initially transmitting all the science in a batch?

@neitsa, could it be that RT is overwriting the some "data currently in transmission" variable, or otherwise failing to schedule if several experiments were being transmitted at once?

I'll probably try RO in the near future, so might also test in combination with that.

neitsa commented 7 years ago

@keyspace:

@neitsa, could it be that RT is overwriting the some "data currently in transmission" variable, or otherwise failing to schedule if several experiments were being transmitted at once?

For the overwrite I'd say no, but it might be possible that there's a problem when multiple experiments, (under some conditions) are transmitted.

I just closed an old bug (#632) where the science data was not transmitted at all, and it now works without any known fix... (it might be possible that the RT code changed since then and the bug wasn't closed.)

So, without precise conditions on how to trigger the bug, it's probably not reproducible at all... I'm still leaving the bug open and will wait to test with ScanSat and/or RO when they will be available for 1.2.

ctiberious commented 7 years ago

This appears to be the same issue I'm experiencing. I've uploaded a quicksave and output_log.txt to https://www.dropbox.com/sh/dnfvzjv6d9i6dxr/AAAzQu-R1-TLfQfjgmqz266Fa?dl=0 in hopes they might help resolve the issue.

The save should focus in on a satellite named "Transit 1 - DeltaA" which is currently over the south pole. If you press 2, that'll pull a Telemetry Analysis (which is already fully researched) and an Orbital Perturbations (which is not researched). Select to transmit the Orbital Perturbation data. It'll count up to 100%, then after a second or two it'll report as "Done" but if you look at the total research, it hasn't changed (it's at 90.9 before transmission and after) and if you hit 2 again, you'll find that Orbital Perturbation still isn't researched. You'll get the same results if you actually right click on the Orbital Perturbation part (currently on the "bottom" of the satellite) and select the "Record Perturbation Data" option.

The one thing I notice in the output log is: RemoteTech: [Transmitter]: Uploading Data... (Gravity Scan from space just above Earth's Poles) - 1.33 Mits/sec. Packets to go: 24 - Files to Go: 0

There are several lines similar to that, just with the "Packets to go" getting smaller. But all the lines list "Files to Go: 0". Not sure if that should be 1 since the research is still being transmitted or not, but it's the only thing that popped out at me.

neitsa commented 7 years ago

@ctiberious : Thanks for your report. Took me a while to install all required mods and dependencies but I was able to repro the issue.

Problem is, everything seems to work correctly on RT side (I debugged the incriminated part of the code responsible for transmitting science)... I can't see anything wrong, but I'll keep checking.

edit

"Files to Go: 0". Not sure if that should be 1 since the research is still being transmitted or not, but it's the only thing that popped out at me.

Nop, the Files to Go is in fact misleading, it simply indicates the number of other science experiments waiting to be transmitted and in this case there is none.

neitsa commented 7 years ago

RT devs note (cc @KSP-TaxiService ):

Mods list:

Use this save file (only one ship); press '2' and transmit the orbital science. Save file starts with 90.9 science points but no science is added after transmission.

neitsa commented 7 years ago

We were finally able to chase the bug down after a whole day of debugging the issue: it's a KSP stock bug, still present in 1.2.1.

Technically this is a float rounding error: in your case (@ctiberious) your antennas transmit the science data by 0.4 increments (the total packet amount is 10). The science data is only registered has having been successfully transmitted when the total packet amount is reached (10). In this case, due to floating point errors, the total amount - after transmitting all packets - has a total of 9.999999, so we never reach 10 and the science is never registered by the KSP research & development center.

We are gonna reach the KSP team to report the bug.

cc @YamoriYuki , @KSP-TaxiService

ctiberious commented 7 years ago

That's so weird. Especially since if I remove RemoteTech (not just disable, but completely remove) and retransmit the research, it works every time. But at least we know what the bug is all about.

neitsa commented 7 years ago

Yep I agree it's weird, probably because RT is transmitting the science packet piece by piece (other mods are transmitting science packets in bulk), but in the end, the problem is not on our end but in stock as we can't control the KSP rounding error on our side.

ctiberious commented 7 years ago

Is there any way for RT to transmit an extra fractional packet (say, 0.01) at the end of a transmission to at least work around the stock issue for now? Not really sure how this all works, or if something like this is even possible, but would get around the rounding problem.

neitsa commented 7 years ago

@ctiberious : this is what the patch (17b2b85) does, it calculates the amount (to transmit) left by reading a private field in KSP and then transmit that (ridiculous) amount in a final pass. Should be out in RT 1.8.1.

As an example, here's your save file with the patch:

[... snip up to last packet ...]
[LOG 18:21:58.694] RemoteTech: [Transmitter]: Uploading Data... (Gravity Scan from space just above Earth's Poles) - 1.33 Mits/sec. Packets to go: 0 - Files to Go: 0
[LOG 18:21:58.696] RemoteTech: [Transmitter]: [DEBUG] PacketSize: 0.4; Transmitted size (frame): 0.4; Data left to transmit (dataAmount): 0; Packets left (packets): 0
[LOG 18:21:58.699] RemoteTech: [Transmitter]: dataIn (before StreamData): 9.599999
[LOG 18:21:58.701] RemoteTech: [Transmitter]: dataIn (after StreamData): 9.999999
[LOG 18:21:58.703] RemoteTech: [Transmitter]: delta: 9.536743E-07
[LOG 18:21:58.708] [Research & Development]: +10 data on Gravity Scan from space just above Earth's Poles. 2 Science added. Subject value is 0.00
ctiberious commented 7 years ago

Very cool. I know I'll be upgrading to 1.2 once RO and RP-0 (and all of their requirements) have been updated so I can wait till then for this fix. :)

ctiberious commented 7 years ago

It's been over a month and it looks like RO still has a ways to go before it will be ready for 1.2. Is there any chance of getting a patch to fix this issue in RT 1.7.1?

neitsa commented 7 years ago

@ctiberious : 1.7.2 release is planned for this Sunday (2016-12-11) alongside 1.8.3 and will integrate this fix.

paladin17 commented 7 years ago

I still have the same problem. KSP 1.2.1, both Remote Tech 1.8.2 and 1.8.1 still have this issue for me. Is there a solution?

YamoriYuki commented 7 years ago

@paladin17 Please use the latest versions of both KSP and RT. This issue has been fixed since 1.8.3 and the current version is 1.8.6. KSP also has a newer version 1.2.2

paladin17 commented 7 years ago

@YamoriYuki alright, thanks for the advice. I though it was mentioned before that the fix was implemented around 1.8.1. Guess I'll go for the newer versions now.