Jump to content

TruePikachu

Members
  • Posts

    26
  • Joined

  • Last visited

Everything posted by TruePikachu

  1. I was referring to that specific log because your description that accompanied the log implied the log was showing that the spam wasn't related to the persistentId, whereas I was indicating that conclusion is...errr...inconclusive. Also, the only 1.12.x log from your link that has any match for the regex /FlowGraph/ is the one from this comment, and it doesn't seem to have persistentId writes instrumented. Just to note, looking at that log excerpt, something funky looks to be going on on behalf of whatever is setting the persistentId of four different parts all to the same value. While I'd probably call it a potentially-invalid test, I don't know enough about the actual trigger for the FlowGraph message to say for sure (e.g. I don't know if it's keying a set based on identity or by persistentId, nor if it's silently discarding duplicates by the key when added to the set). The big problem is that the spam hasn't been reliably triggered by everybody for a yet-unknown reason; for instance, @zer0Kerbal doesn't appear to have had it much if at all while I've had it happen reliably. As such, the lack of FlowGraph errors in a test session isn't conclusive evidence for the change being tested being an actual fix for FlowGraph errors, but the presence of FlowGraph errors indicates that something is still wrong. This is probably my least favorite thing about the bug altogether: I'm able to reliably reproduce it, but I have neither the experience with KSP's internals nor the time to put together and learn a modding environment in order to experiment with it, all for a mod I haven't been able to use (and therefore personally gauge how valuable fixing the bug would be) because of the bug creating issues in my installs. All I can really help with is philosophical views from my own experience with bug testing, and even that's starting to stretch my patience pretty thin. Also a testing environment for already-compiled instrumented plugins, though with the rising aggression I'm not sure I can offer that anymore for my own safety.
  2. I've only ever seen this log spam happen with SYD installed, which heavily implies SYD is doing something it shouldn't be doing. Note that even if the game is exposing a bug to the API, the mod using the API can still be considered to have a bug if it's not accounting for the game's bug in its handling of the particular API. Also note the thing SYD is doing doesn't appear to be a documented feature of the KSP API, technically making it unspecified behavior at best; it might have been convenient in older versions that it worked, but there was no guarantee it would continue to work in future versions. Your own log indicates the value was changed and there was log spam after it was changed. The fact the log spam didn't happen on the very next line after the change is inconsequential, as is the facet that it appears to have had the value written twice. Note that the following example snippet of C (which is not from KSP itself, but rather only exists to highlight the flaw in your argument) exhibits the same events that your log implies are happening, but still indicates that manually changing the persistent ID is probably not a good idea. long you_dont_see_this = 1590504603; /* Later... */ long persistentId = you_dont_see_this; /* Set the initial value */ persistentId = 3513538705; /* BUG! You shouldn't change the value */ /* Output from KSP log when the above "happens": [WRN 17:47:23.471] [ScrapYard] Part mk1pod.v2:FFF8C676 has persistentId=1590504603 and it's being changed to 3513538705. The ClassID is 49675735 and the CraftId (cid) is 4294504548. */ long some_other_memory = persistentId; /* Copy it elsewhere */ persistentId = some_other_memory; /* Copy it back, this is nop */ /* Output from KSP log when the above "happens": [WRN 17:47:24.219] [ScrapYard] Part mk1pod.v2:FFF8C676 has persistentId=3513538705 and the value (3513538705) is being written back. The ClassID is 49675735 and the CraftId (cid) is 4294504548. */ assert(persistentId == you_dont_see_this); /* Check is false because of the BUG! line above */ /* Output from KSP log when the above "happens": [ERR 17:47:24.464] [FlowGraph]: Graph already contains item! Part mk1pod.v2 with id 4294504548 [ERR 17:47:24.464] [FlowGraph]: Graph already contains item! Part mk1pod.v2 with id 4294504548 [ERR 17:47:24.522] [FlowGraph]: Graph already contains item! Part mk1pod.v2 with id 4294504548 [ERR 17:47:24.522] [FlowGraph]: Graph already contains item! Part mk1pod.v2 with id 4294504548 */ It looks like you're only looking for a bug in KSP so you can try to fix it in Recall, versus considering that SYD might be the one with the bug and KSP is working as best as it can after SYD changes something it shouldn't have.
  3. IMO this can be accomplished solely with the PartModule that exists on instantiated parts in conjunction with the record keeping that's already being made in the mod's scenario(?) node. What purpose does maintaining the exact same persistent ID accomplish that just doing part module copies from recordkeeping doesn't? The ID is already being saved in SYD's PartModule, by the way, so write hijacking the vanilla version of it shouldn't even be necessary, exempting a state where the PartModule is strictly unavailable. Thinking about it, if the ID itself isn't the problem, maybe it changing part modules around could be? This is just a wild guess which I haven't tested in any manner (and probably can't since I don't have a dev environment nor the API experience), but considering that the state of the fully-loaded craft on the pad depends both on the vanilla .craft file mechanics and the modded SYD mechanics (or, in the editor case, vanilla part instantiation with a defaulted module versus SYD logic with modified modules coming from the savegame)... when does restoration of the PartModule state happen anyway? Right now, I'd probably experiment with removing requirements to write to the vanilla ID field; if they're not needed, we might have improved compatibility with some other mods, but if they are needed, the reason would show itself in testing. But if the same exact issue happens when the writes are removed, the writes clearly aren't the entire problem (though they could still be part of the issue). EDIT: This suggests that changing the ID is the issue; it gets changed to something new, the new value gets written back again (nop), and then spam on the part that had the ID changed. You can only say this if you provide an example where a part's ID doesn't get changed at all but it still contributes to the spam. Right now, for all we know, logic the flowgraph depends on is still referring to the older ID because it never expected the ID to change.
  4. Just to clarify this a little bit, while you don't need standard synchronization primitives to control objects shared between coroutines (assuming this is a standard single-thread implementation), there's still a requirement for synchronization at a higher level under specific circumstances. While you only have one task interacting with a data structure at a time, and (under the context of user code execution) task execution can only be interrupted at certain points of time, certain actions performed in one context can still break an invariant or other assumption imposed by the current thing the other is doing. Using C++ as an example (mainly because I know many standard library requirements offhand), an `std::set<>::iterator` remains valid only while the original `std::set<>` is unmodified. If a task is iterating through the particular object and yields every, say, 200 iterations, but during a yield another task modifies the object, the iterator is no longer considered valid and access is undefined behavior. This is irrelevant (except in matters of execution timing) unless you have an external process or something that's modifying your program structures behind your back; all bets are off if that's the case. I agree with this assessment; while SYD's changing of the ID to something already recorded seems well-intentioned (especially considering that mods that affect parts in such a way as to give them a sort of history might be using a non-partmodule mapping keyed by ID to maintain some state), actually doing the change "might" (read: if I wrote KSP it probably would) break a class invariant. It's probably enough that the ID remains strictly constant for a part's singular journey through flight mode, without needing it to still remain the same value once the part has been recovered and built into a new craft. Under my testing procedure, at least, log spam under the editor is triggered by instantiation of a part in SYD's part inventory. You made sure you didn't run out of stored parts, right?
  5. My reproduction steps don't even need to touch flight mode, FWIW; I can repro from strictly inside the editor, though the current repro steps use SYD's part list. I don't know if this changes your analysis, but I felt I should mention it just in case you're running under the assumption it's something that only happens when the vessel is loaded into flight mode. I've had this same personal experience, but clearly something not strictly deterministic is going on if some people can repro it but others can't using the same steps and basically the same code in play (we'll assume it's not a bug introduced by an external library to KSP's distribution) Assuming this is the problem, shouldn't SYD just wipe the cache when it changes the ID?
  6. KSP supports coroutines, though, which while not strictly multithreading still require care to be taken in some cases. If memory serves, the vanilla ∆V calculation takes a bit of time to process, which implies it's being scheduled as a coroutine and awaited upon by the UI code to update the readout (or something similar). My current suspicion is that a data structure that the vanilla ∆V calculation transverses is being modified after the calculation coroutine starts execution but before it finishes, resulting in it reaching some nodes multiple times and then complaining about it. Normally, this can happen when editing the ship, but that seems to be smart enough to cancel the coroutine. It shouldn't be a stretch to say that differences in execution time will affect the actual ordering of coroutine execution, especially considering that coroutines that have yielded might even have the ability to work multiple times per frame, which would imply that a faster CPU could be less likely to hit the issue and a more complex craft (or slower coroutine because of decorations) could widen the window of opportunity.
  7. Just to confirm, the Unity+KSP mod environment doesn't provide functionality to break on object variable write? I know that if this were native code, I'd be reaching for that right now, and I believe that .NET under Windows provides such support via WinDbg, but Unity is running its own VM so WinDbg can't access the C# level of things. I still have my isolated install which is getting a reliable repro, but due to neither having a debugger capable of attaching at the C# level nor being familiar with KSP's internal structure I unfortunately can't help chip away at finding the underlying culprit, beyond saying it's something between KSP and SYD. EDIT: Or wait, can't Harmony decorate KSP's methods that write the ID? Barring a debugger, I'd probably try using that to log call stacks at write, and see if anything curious shows up.
  8. I just tested v2.2.99.1-prerelease in my isolated install and the FlowGraph issue is still present. EDIT: For completion, my reproduction steps are (with reference to this gist): Manually apply the three patches listed in the diff output in the gist Run KSP with absolutely no mods other than ScrapYard installed (no ModuleManager, no DLC) Load the savegame from the gist (the notable feature of the savegame is that it has some parts in the inventory already) Enter VAB Open logging console page Expand the parts list, switch to ScrapYard inventory Construct a rocket from the stored command pod, fuel tank, and rocket engine (don't touch the fins or parachute, the patch isn't applied for those and you'll get other log spam) Once the rocket engine is added to the rocket, a number of FlowGraph errors will come up in the log.
  9. I'm trying to write a ModuleManager patch that removes one of the runways from "defaultRunways.cfg". However, since this otherwise-static data is being stored in `PluginData`, MM can't touch it. Additionally, the Making History runways aren't being loaded; I don't know if this has a similar cause (being in `PluginData` and not getting loaded by the game's module loader). KSP.log, Player.log
  10. Sometimes I prefer the scientific method of driving around KSC. Anyway, direct shell launch (w/o any implied parameters) still hits flowgraph. EDIT: For the record, I'll keep that particular copy of the KSP install around (w/ the edits I made) until this issue gets worked out, so it doesn't impact my actual game (though I might symlink a bunch of identical directories in order to save space).
  11. Steam version still (just copied somewhere else), I'll check direct shell launch in a while (not at computer right this moment, and it'll be a pain to test over phone remote desktop).
  12. I don't think I can get pure stock to duplicate flowgraph, in that I've only gotten flowgraph when SYD is installed. I can see if removing the DLCs from the gamedata affect anything, though, as well as see what sorts of problems crop up removing MM and CC (which are listed as deps in the OP). The KSP itself is from Steam, and I've generally been launching it recently via CKAN (which I believe just invokes the x64 executable with a normal environment and no parameters; I'll verify this later, but I'm avoiding having Steam launch it because then I have to mess with the launcher etc). EDIT 1: CKAN launches KSP with just the `-single-instance` flag EDIT 2: I don't get flowgraph with just KSP+SYD, but I do get other errors because the MM patches aren't applied. I might try to manually apply them and see what happens. EDIT 3: Your Config/PartBlacklist.cfg looks like it has some extra junk from Git present in it, so you might want to make sure it has what you want EDIT 4: Yes, I very much still get flowgraph when it's just base KSP, SYD from SpaceDock, and four manually-applied part patches. E4.1: Log
  13. I've been thinking about this a bit, and my current thoughts are: Is the FlowGraph error specifically from the unmodded game (i.e. present in the assembly), or does a mod provide it? I'd think the former, but want to be 100% sure. Unfortunately, I can't check the game right now, and GitHub doesn't support searching forks, so I can't check that SYD is providing it or not. But under the assumption SYD isn't providing it, my earlier experiment would indicate SYD is doing something weird (but we know something along these lines already). What are the specifics of your own environment @zer0Kerbal ? I'm assuming the game itself is up to date, but do you have the expansions? What OS? Have you tested with specifically the release version of SYD on GitHub, or only on development versions? In both the serialized .craft and .sfs, the persistent IDs for the parts (provided both on part root and SYD's module) match up with each other and not with those of other parts; this reflects in that loading the affected save and testing without a relaunch of the craft seems not to be triggering the issue. But, when the craft is loaded into the game onto the pad, SYD is clearly modifying the structure of the craft to handle persistent IDs (as is intended), but the full state of the craft at this point of time isn't being reflected in the serialized savegame, as a reload doesn't trigger the issue. Is the structure of the craft actually somewhat invalid as a result of SYD modifying it, but getting corrected by the serialization code?
  14. I haven't watched it yet, and certainly won't be able to within the next 9 hours (honest this time), but: I was having difficulty with repro inside the VAB, even using what I thought was reliable repro from my earlier attempts at getting KCT going, but when I launched the log lit up and that happened to be reliable. When assembling the craft, I used alt-click duplication a lot; the upper """stage""" in my screenshots is just a flipped copy of the lower one. While I don't know if it's required, some parts are "reused" from a previous test. I don't believe I started with any reused parts when I brought it out to the pad the first time (the thing previously there at first didn't have any parts in common), but all subsequent tests on the pad used parts freshly placed in the scrapyard. I have no idea how serialization plays into it, since I don't believe the errors cropped up after a save/quit/reconfigure/reload cycle, but rather after a recover/relaunch. I can probably test repro again in my save quickly and, assuming repro, I can drop it in another gist so you can check for repro. EDIT: persistent.sfs available here. Modlist is the same as the first screenshot, and all the mods (except the particular SYD version) are on CKAN, though not all of them are listed as "compatible" with 1.12.5 (however, the worst one is compatible with 1.12.2, and their own functionality is...err...functional). Of note, there's probably a craft that uses KAS nearby the pad. EDIT 2: Just did a repro both on-pad and in-VAB with just SYD, CC, and MM installed. Uploading footage to YouTube right now, hang tight. EDIT 3: Video, log.
  15. KSPCF deps Harmony, and I think the only thing the mod can do without it is the part manufacturer changes (which are akin to modulemanager patches). I checked the list of patches on the forum post earlier, but none stood out significantly. That said, it should be possible to do a baseline test by disabling all the patches (via config) and, assuming the FlowGraph issue doesn't recur, determine which patches are responsible. I might be able to mess around with this about 18 hours from now, if you want. EDIT: I lied. Tested around instead of going to sleep. Still got FlowGraph errors even without Harmony+KSPCF installed. Errors went away upon removing SYD. Screenshots from workflow in spoiler.
  16. I'm not Morphyum but the log says 0Harmony v2.2.1.0 KSPCommunityFixes v1.0.0.0 / v1.24.6.0 I might note that I was also getting FlowGraph errors on the same sort of configuration (KSPCF+Harmony). EDIT: And the FlowGraph errors completely break vanilla delta-v calculation.
  17. As another member of Bay12, I should probably reassure you that it is usually just the most gruesome things which are posted. The kind things (of which I do, BTW) don't get as much attention as the horrible things. What do you think the average person would be more interested in seeing, a discussion of raising children alongside their parents, or where children are raised in a tiny room and constantly attacked by dogs? ...ahem... I remember reading from someone on the Reddit that there is a lot of overlap between this and the DF communities, possibly because of the high bar of entry both games have. I might just be a "recent" member to join the community here (and only started playing this game at the beginning of the year), but this is one of the better communities. I've lurked for about 6-8 months. KSP has the most time on my Steam account, which I've had for quite some time. EDIT: You misspelled ‼SCIENCE‼
  18. Pic with the checkmark is correct orientation. Look at the radial attachment node part for a reason for the "+" being there.
  19. I can confirm that parachute contracts do, in fact, work correctly. You just need to make sure that all the conditions are being met when you deploy the parachutes, preferrably through the staging. When going up, when going down, or when going sideways (e.g. with a plane), all three work. Generally, the biggest issue is the odd contract where the required speed is far greater than terminal velocity.
  20. There are the Reddit challenges, those might give you a challenge. Especially if you try to do multiple at a time. You can also try to play through Career again, with harder difficulty settings than before. Have you managed to lift a full orange tank of fuel from Kerbin to orbit? What about from Eve? How about flying a full tank from outside Jool to sea level, and back to orbit? (There are tons of challenges regarding moving a full orange tank from point A to B without using fuel from it) Have you messed around with things like Danny2462 does? Have you discovered a new glitch doing so? Have you tried a 100% Reusable Space Program like Scott did quite some time ago? Have you tried to combine a Reusable Space Program with an Eve landing? (DISCLAIMER: I'm not sure this is possible without mods) Have you brought a D-class to solar escape velocity? There are tons of things which one can do, and you might not have even scratched the surface.
  21. I know this bug, I've been doing research on it; it is related to the Klaw. See http://bugs.kerbalspaceprogram.com/issues/3107 . Delete the craft (if it exists in the tracking station), and restart the game. If it still persists, please upload the persistance file, I'd be very interested at looking at it. Chances are you had tried to, at one point in the past, attach to a Klaw in reverse; controlling a ship into another ship's Klaw. This is known to cause issues, and this is one of them. Make sure to ALWAYS control the ship with a Klaw when using said Klaw.
  22. For Gilly, that 8km figure for invisible terrain coincides with the minimum altitude for 5x time, and Bop has 5x at 24.5km. LGO is below 6km, and LBO is below 25km. I believe that ships which reach the 1x time limit are assumed to crash, which would suggest that it is impossible to achieve "stable" LGO, but LBO should be possible inside the 500m window. As for the Gilly base destruction, I don't tend to leave things unattended on Gilly, but if you manage to 5x time accelerate, that pretty much guarentees that you are on the surface, and switching away might leave the base intact. You might want to look into using a grappling hook from KAS to "dock" with Gilly.
  23. It is possible to go even further if you have Karbonite installed; don't even spend funds on the ore. (This doesn't apply to Kethane as much because resources aren't unlimited there). Another "exploit" for EL is to make parts from RocketParts (which you can further refine), and recover those. I have built huge rovers for mining materials in the past, it should be trivial to equip such a rover with a means of producing smaller expensive rovers which can be driven onto the runway and recovered for funds. As has been said, however, there is still a logical in-universe explanation for the gains. IRL mining/refining is expensive, but Kethane/Karbonite put pretty much all the expense as power, which can be generated for no resource expense with stock parts. As a result, if you can afford the initial investment, you are pretty much set for life.
×
×
  • Create New...