Jump to content

[0.23.5] KerbCam v0.13 (camera pathing tool for videos)


huin

Feature/priorities wishlist - where should I spend my (limited) time next on KerbCam?  

53 members have voted

  1. 1. Feature/priorities wishlist - where should I spend my (limited) time next on KerbCam?

    • Tutorial video (volunteer creators welcome)
      49
    • Control camera on IVA
      119
    • Control camera on map
      18
    • Refactor GUI (the GUI is painfully arranged and needs to be rearranged)
      55
    • Experiment with ideas
      22
    • Clean up bugs/papercuts
      38
    • Other, post below.
      11


Recommended Posts

Hello, I have a bug to report with version 0.9. It is causing "[Exception]: InvalidOperationException: Collection was modified; enumeration operation may not execute." whenever you try to reload your flight or starting another flight. This causes your engines to not work anymore and being unable to stage.

Link to comment
Share on other sites

Hello, I have a bug to report with version 0.9. It is causing "[Exception]: InvalidOperationException: Collection was modified; enumeration operation may not execute." whenever you try to reload your flight or starting another flight. This causes your engines to not work anymore and being unable to stage.

I noticed something similar, though I didn't get an exception. My staging got reset so everything was on the same stage, which wouldn't fire, and when I used my action group to turn the engines on they came on but nothing happened, as if they were out of fuel. They did eventually start up though and were controllable. It also caused some graphic glitches i the UI, like some of the readouts being covered up by their background. Apparently the screenshots I thought I took didn't work. I even restarted the game to see if that would help but it didn't. I'm going to try putting it back in again and see if it still happens. Then maybe take all the mods except kerbcam out. Unless of course there's a fix before I get a chance to do that.

Update: I added kerbcam back to my gamedata folder, went to launch something and the staging was all reset to one stage again. Removed all the other mods, same thing. Took kerbcam back out, so no mods, started up the game and the staging was back to normal. Sort of strange that something that has nothing to do with staging would cause this to happen.

Edited by Sma
Link to comment
Share on other sites

Hello, I have a bug to report with version 0.9. It is causing "[Exception]: InvalidOperationException: Collection was modified; enumeration operation may not execute." whenever you try to reload your flight or starting another flight. This causes your engines to not work anymore and being unable to stage.
I noticed something similar, though I didn't get an exception. My staging got reset so everything was on the same stage, which wouldn't fire, and when I used my action group to turn the engines on they came on but nothing happened, as if they were out of fuel. They did eventually start up though and were controllable. It also caused some graphic glitches i the UI, like some of the readouts being covered up by their background. Apparently the screenshots I thought I took didn't work. I even restarted the game to see if that would help but it didn't. I'm going to try putting it back in again and see if it still happens. Then maybe take all the mods except kerbcam out. Unless of course there's a fix before I get a chance to do that.

Update: I added kerbcam back to my gamedata folder, went to launch something and the staging was all reset to one stage again. Removed all the other mods, same thing. Took kerbcam back out, so no mods, started up the game and the staging was back to normal. Sort of strange that something that has nothing to do with staging would cause this to happen.

Ugh, that sounds pretty bad. I'll try to take a look at that this evening after work. Thanks for the reports!

Link to comment
Share on other sites

Ugh, that sounds pretty bad. I'll try to take a look at that this evening after work. Thanks for the reports!

I haven't looked really looked for any logs or anything, but I can if that would help.

Update: Ok I just tried it again, and for the moment it's not breaking anything. It could just be some sort of fluke, or maybe its a resource issue. I don't usually shut down my computer but I do hibernate it. Though it is possible something else was running last night using up computer resources that isn't running now. I'll let you know if it happens again though and I'll look in the log file.

Update 2: The bug is back again. Originally I checked with kerbal x and the staging and UI was fine. Then I started testing a design for a kethane miner and the UI was messed up again. I'll see if I can get a screenshot if I can duplicate the problem again.

Debug Stuff: Ok, I believe the line from the KSP.log below is the gui glitch, though it doesn't seem too helpful to me:

[ERR 12:19:30.275] DrawGUITexture: texture is null

Just before this it was doing some things with kethane, though last night I removed all of the mods except kerbcam, though I didn't check the log that time, so I don't know if maybe there was something else that was causing the problem.

When the launch pad is loading there are some generic null reference exceptions, with a few saying not set to instance of an object, though it doesn't say exactly what it releates too. One is right after stage manager resumes, another is after focus is set on the vessel, but then I noticed the first sign of what maybe the problem. In the game the button for the, or landing gear lost its icon but the background color was there, so I got a screenshot, which showed up in the log, and right after that was this:

[LOG 12:17:08.499] SCREENSHOT!!
[ERR 12:17:25.812] System.NullReferenceException:
at (wrapper managed-to-native) UnityEngine.Component:InternalGetTransform ()
at UnityEngine.Component.get_transform () [0x00000] in <filename unknown>:0
at KerbCam.CameraController.AcquireFlightCamera () [0x00000] in <filename unknown>:0
at KerbCam.CameraController.StartControlling (Client client) [0x00000] in <filename unknown>:0
at KerbCam.ManualCameraControl.TakeControl () [0x00000] in <filename unknown>:0
at KerbCam.ManualCameraControlGUI.DoGUI () [0x00000] in <filename unknown>:0
at KerbCam.MainWindow.DoGUI (Int32 windowID) [0x00000] in <filename unknown>:0

I didn't have any stages setup on this one, but when physics loaded, it wouldn't release the clamps or fire the engines. THe landing gear could be activated, as well as anything that would have been assigned to an action group. After, maybe 30 seconds to a minute of mashing on buttons the stage was able to be activated and soon after was when this, one of the more noticeable gui glitches, happened. It comes and goes, almost at random as things are happening on screen. It also happens with or with out the kerbcam window hidden.

screenshot272.png

After this, there really wasn't much else left in the log other than different events triggering, and those same generic null ref exceps.

Kerbcam itself seems to work so far as I can tell, at least I was able to control the camera.

It seems like the staging is fixed (being able to activate the stage with your staging button) when going into map mode and hitting the button that toggles docking mode. On my laptop its when the numlock is either off/on and I hit the delete/. key which may or may not be bound to the key that plays the camera path from kerbcam.

Hope this helps. :)

Edited by Sma
Link to comment
Share on other sites

Hello, I have some strange bugs too.

I had the same problem than Sma, but everything went back to normal, I don't know why...

My real problem is, when I change stage, the camera won't work anymore :/ I set the keys, and when I press "play" the camera switch to the Pod and don't move, I dunno why, it worked well in 0.20 :o

Link to comment
Share on other sites

I haven't looked really looked for any logs or anything, but I can if that would help.

<snip>...

Excellent, thanks for making the effort to writing down your experience, and bringing in the stack trace. That will be *very* helpful in tracking this down!

Hello, I have some strange bugs too.

I had the same problem than Sma, but everything went back to normal, I don't know why...

My real problem is, when I change stage, the camera won't work anymore :/ I set the keys, and when I press "play" the camera switch to the Pod and don't move, I dunno why, it worked well in 0.20 :o

Thanks also for the report.

I'm more hopeful that I'll be able to track this down, but am only just about to start! I'm rather confused about some of the other effects that are mentioned, but I'm pretty sure I'll be able to track down some of the oddness, if nothing else.

Link to comment
Share on other sites

First bit of good news, I've figured out the weirdest part, that being the staging breaking. I had attached to an event handler that fires when a vessel is switched to, and an error in my code seems to have broken that event handling following a scene change (e.g reverting the flight). More to work out before I can say that I've root caused it, but it's a start.

Link to comment
Share on other sites

First bit of good news, I've figured out the weirdest part, that being the staging breaking. I had attached to an event handler that fires when a vessel is switched to, and an error in my code seems to have broken that event handling following a scene change (e.g reverting the flight). More to work out before I can say that I've root caused it, but it's a start.

It's amazing how complicated things like this can become. I mean just all the interactions in the game itself, not to mention mods. I do website programming (mostly PHP, but also asp.net and javascript) so I can apperciate how complicated things like this can become. :) And with the mods/plugins in particular, it's cool that we can sort of be a part of it, as far as bug reports, and quick feedback goes.

Link to comment
Share on other sites

Hurrah! Nailed the problem down and fixed it. Now I've got to do some tidyup work, but things are looking good.

Edit: Oh, and lots of testing before I release, I think!

Edit 2: Ugh, subtle bug, not as bad as the one I've just fixed, but annoying nonetheless. If I can't fix it soon I'll release 0.10 with the major fix, and state the workaround.

Edit 3: Done. Tried to fix one last annoying thing with camera behaviour when the focused/active vessel is destroyed, but seems non-trivial, and is probably an existing and less serious problem. Released 0.10 with the important fix. Thanks for all the reports!

Edited by huin
Link to comment
Share on other sites

So far so good. Just checked it real quick and so far no problems. No strange gui glitches, and staging worked fine. I don't really have any paths setup as I'm just using it for angles I couldn't normally get for screenshots, but the few I do have work.

In the list of features "Keyframed linearly interpolated time slowdown/pausing. (bullet time effect)" How does that work?

Link to comment
Share on other sites

So far so good. Just checked it real quick and so far no problems. No strange gui glitches, and staging worked fine. I don't really have any paths setup as I'm just using it for angles I couldn't normally get for screenshots, but the few I do have work.

In the list of features "Keyframed linearly interpolated time slowdown/pausing. (bullet time effect)" How does that work?

When enabled for a path, and values other than 1 are set on keys for the "timescale" it should slow down/speed up down game time as the path is played. (In theory at least, I haven't tested it extensively)

Link to comment
Share on other sites

Thanks for the fix ! But I still have the same problem. I totally deleted the plugin and I reinstalled it, but it still bug :s

If you press Alt-F2 to bring open the debug log window, does it show any exceptions before or during the time when you experience problems, especially any log entries containing "KerbCam" in them? If so, can you copy the log message(s) out from KSP.log and show them here for me? Thanks.

Link to comment
Share on other sites

Ok, there is nothing on the log when I experience the problem, BUT just before the launch, a red message appear, and this is what it says :

System.NullReferenceException:

at (wrapper managed-to-native) UnityEngine.Component:InternalGetTransform ()

at UnityEngine.Component.get_transform () [0x00000] in <filename unknown>:0

at KerbCam.CameraController.ReleaseFlightCamera () [0x00000] in <filename unknown>:0

at KerbCam.CameraController.StopControlling () [0x00000] in <filename unknown>:0

at KerbCam.State.Stop () [0x00000] in <filename unknown>:0

at KerbCam.KerbCam.OnLevelWasLoaded (Int32 level) [0x00000] in <filename unknown>:0

(Filename: C:/BuildAgent/work/7535de4ca26c26ac/Runtime/ExportGenerated/StandalonePlayer/UnityEngineDebug.cpp Line: 54)

and :

File 'kerbcam-paths.cfg' does not exist

(Filename: C:/BuildAgent/work/7535de4ca26c26ac/Runtime/ExportGenerated/StandalonePlayer/UnityEngineDebug.cpp Line: 54)

KerbCam could not load paths. This is okay if they have not been saved yet.

(Filename: C:/BuildAgent/work/7535de4ca26c26ac/Runtime/ExportGenerated/StandalonePlayer/UnityEngineDebug.cpp Line: 54)

File 'kerbcam-paths.cfg' does not exist

(Filename: C:/BuildAgent/work/7535de4ca26c26ac/Runtime/ExportGenerated/StandalonePlayer/UnityEngineDebug.cpp Line: 54)

KerbCam could not load paths. This is okay if they have not been saved yet.

(Filename: C:/BuildAgent/work/7535de4ca26c26ac/Runtime/ExportGenerated/StandalonePlayer/UnityEngineDebug.cpp Line: 54)

File 'kerbcam-paths.cfg' does not exist

(Filename: C:/BuildAgent/work/7535de4ca26c26ac/Runtime/ExportGenerated/StandalonePlayer/UnityEngineDebug.cpp Line: 54)

KerbCam could not load paths. This is okay if they have not been saved yet.

(Filename: C:/BuildAgent/work/7535de4ca26c26ac/Runtime/ExportGenerated/StandalonePlayer/UnityEngineDebug.cpp Line: 54)

File 'kerbcam-paths.cfg' does not exist

(Filename: C:/BuildAgent/work/7535de4ca26c26ac/Runtime/ExportGenerated/StandalonePlayer/UnityEngineDebug.cpp Line: 54)

KerbCam could not load paths. This is okay if they have not been saved yet.

Link to comment
Share on other sites

Ok, there is nothing on the log when I experience the problem, BUT just before the launch, a red message appear, and this is what it says :

and :

Thanks for that. I've just now experienced some weirdness myself with the plugin. Clearly something is still very broken >_< (the stacktraces in your first quote are the trouble. the latter stuff about the config file is okay)

Link to comment
Share on other sites

Ok, there is nothing on the log when I experience the problem, BUT just before the launch, a red message appear, and this is what it says :

and :

Can you reliably trigger the bug (i.e what steps do you take?), and what happens when it is triggered?

I've managed to isolate the problem causing the stack trace that you pasted, but I'm not convinced that that was the only thing going wrong. I managed to get that stack trace also, but it didn't seem to lead to anything very bad.

(I experienced weirdness on the map screen - but I'm not having much luck trying to reproduce it)

Edit: I've treated the symptom that I can find in this cut of KerbCam (not an actual release as yet): https://googledrive.com/host/0B8pOEbkBskJGRDAzMGZYYjdDY0E/KerbCam.dll however, I've got lingering suspicions of remaining troubles.

Edited by huin
Link to comment
Share on other sites

Here is a video showing the problem ...

Thankyou for that video, it was very helpful! I've just managed to reproduce that specific problem, and extract useful debugging information. Found some very silly and fragile code that I'm surprised wasn't broken before.

Basically the code that works out where it thinks the camera is and is pointing was using the "main" camera, and its root. I think it was the switching to the map view changed the "main" camera, even when returning the the flight view. The fix is simple, I should be using the FlightCamera instead (seems kinda obvious, right?).

Edit: ...and fixed! Hopefully that's all the show-stoppers fixed. Let me know of any more trouble, and thanks again!

Edited by huin
Link to comment
Share on other sites

This mod is great, however, I have noticed an FPS drop when using it with 0.21.1. In the main menu it drops from 180 to 40, in the VAB it drops from 60 to 25, and out at the launch pad it drops from 30 to 10.

This issue is only present if you directly extract the mod into gamedata, so that you have gamedata/KerbCam/plugins/KerbCam.dll, gamedata/KerbCam/source/, and gamedata/KerbCam/KerbCam.dll

You must only have the plugins directory in gamedata/KerbCam in order to avoid the FPS drop. Just an FYI.

Link to comment
Share on other sites

This mod is great, however, I have noticed an FPS drop when using it with 0.21.1. In the main menu it drops from 180 to 40, in the VAB it drops from 60 to 25, and out at the launch pad it drops from 30 to 10.

This issue is only present if you directly extract the mod into gamedata, so that you have gamedata/KerbCam/plugins/KerbCam.dll, gamedata/KerbCam/source/, and gamedata/KerbCam/KerbCam.dll

You must only have the plugins directory in gamedata/KerbCam in order to avoid the FPS drop. Just an FYI.

Huh, that's rather curious. I guess I'll repackage next time without the source. There's links to the source on github in the program. Thanks for finding that out!

Link to comment
Share on other sites

Huh, that's rather curious. I guess I'll repackage next time without the source. There's links to the source on github in the program. Thanks for finding that out!

Yeah NP. I also found another bug, but my suspicion is that it's a deeper rooted issue in KSP that has simply never been found due to the lack of innate camera controls in the game that could cause this.

Described here, with video:Thread

Link to comment
Share on other sites

Yeah NP. I also found another bug, but my suspicion is that it's a deeper rooted issue in KSP that has simply never been found due to the lack of innate camera controls in the game that could cause this.

Described here, with video:Thread

Pretty sure that's my fault, and I suspected this bug, but there was a bigger more common bug I wanted to fix in the last release, so I didn't delay it.

In Unity3d (and therefore KSP) there is a hierarchy of objects, with transformations tracking child/parent relationship. One thing that KerbCam does when changing the camera to be relative-to an object is reparent the flight camera to that object. If that object gets destroyed, I believe it destroys all of its descendents (children, children of children, etc.) - thus destroying the flight camera - which has a number of wonky effects.

I was attempting to test for this prior to the last release, but couldn't quite figure out which event hook to attach to, and what was to happen then.

(One could argue it as being a KSP bug, but I think that would be unfair, as I'm moving objects around in a way that breaks their assumptions about how objects interact)

One question I'd have to users of KerbCam is: what should be the correct behaviour of the camera when the object it is tracking is destroyed?

My initial answer would be to pin the camera in place relative to where the object was last, at the instant when it is destroyed. Thoughts?

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...