Jump to content

[1.4.0] GCMonitor 1.4.8.0 - A graphic Memory monitor (Marsh 9th 2018)


sarbian

Recommended Posts

Working in 64bit :) I get the RAM and FPS info in-game now.

But... from the log I see this:

[LOG 14:34:34.245] Load(Assembly): GCMonitor/GCMonitor
[LOG 14:34:34.245] AssemblyLoader: Loading assembly at D:\Games\KSP v1.0.2 64bit\GameData\GCMonitor\GCMonitor.dll
[LOG 14:34:34.246] Load(Assembly): GCMonitor/getRSS_x64
[LOG 14:34:34.246] AssemblyLoader: Loading assembly at D:\Games\KSP v1.0.2 64bit\GameData\GCMonitor\getRSS_x64.dll
[ERR 14:34:34.248] Failed to load assembly D:\Games\KSP v1.0.2 64bit\GameData\GCMonitor\getRSS_x64.dll:
System.BadImageFormatException: Format of the executable (.exe) or library (.dll) is invalid.
at Mono.Cecil.PE.ImageReader.ReadOptionalHeaders (System.UInt16& subsystem, System.UInt16& dll_characteristics) [0x00000] in <filename unknown>:0
at Mono.Cecil.PE.ImageReader.ReadImage () [0x00000] in <filename unknown>:0
at Mono.Cecil.PE.ImageReader.ReadImageFrom (System.IO.Stream stream) [0x00000] in <filename unknown>:0
at Mono.Cecil.ModuleDefinition.ReadModule (System.IO.Stream stream, Mono.Cecil.ReaderParameters parameters) [0x00000] in <filename unknown>:0
at Mono.Cecil.ModuleDefinition.ReadModule (System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x00000] in <filename unknown>:0
at Mono.Cecil.ModuleDefinition.ReadModule (System.String fileName) [0x00000] in <filename unknown>:0
at AssemblyLoader.ScanForBadTypeRefs (System.String file) [0x00000] in <filename unknown>:0
at AssemblyLoader.LoadExternalAssembly (System.String file) [0x00000] in <filename unknown>:0

[LOG 14:34:34.248] Load(Assembly): GCMonitor/getRSS_x86
[LOG 14:34:34.248] AssemblyLoader: Loading assembly at D:\Games\KSP v1.0.2 64bit\GameData\GCMonitor\getRSS_x86.dll
[ERR 14:34:34.248] Failed to load assembly D:\Games\KSP v1.0.2 64bit\GameData\GCMonitor\getRSS_x86.dll:
System.BadImageFormatException: Format of the executable (.exe) or library (.dll) is invalid.
at Mono.Cecil.PE.ImageReader.ReadOptionalHeaders (System.UInt16& subsystem, System.UInt16& dll_characteristics) [0x00000] in <filename unknown>:0
at Mono.Cecil.PE.ImageReader.ReadImage () [0x00000] in <filename unknown>:0
at Mono.Cecil.PE.ImageReader.ReadImageFrom (System.IO.Stream stream) [0x00000] in <filename unknown>:0
at Mono.Cecil.ModuleDefinition.ReadModule (System.IO.Stream stream, Mono.Cecil.ReaderParameters parameters) [0x00000] in <filename unknown>:0
at Mono.Cecil.ModuleDefinition.ReadModule (System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x00000] in <filename unknown>:0
at Mono.Cecil.ModuleDefinition.ReadModule (System.String fileName) [0x00000] in <filename unknown>:0
at AssemblyLoader.ScanForBadTypeRefs (System.String file) [0x00000] in <filename unknown>:0
at AssemblyLoader.LoadExternalAssembly (System.String file) [0x00000] in <filename unknown>:0

Something I need to worry about?

Link to comment
Share on other sites

Lumaan : it's normal. KSP thinks those are mods and it generate an error message.

1.2.5

- On Windows uses the Virtual Memory size instead of the RSS for the KSP memory use. You will get larger numbers but they are more relevant to the 4GB limit.

Something like that should be done for Linux but I don't have a working Linux on may game PC anymore. Can someone check for me if the first number in /proc/<KSPPID>/statm is more relevant than the second (From a few test on my NAS it is) ?

No idea for OSX and I have even less way of testing a code change.

Download : GCMonitor-1.2.6.0.zip

Link to comment
Share on other sites

I don'tknow what these Numbers are for so here the contents of the file, it's from xubuntu 15.04 64bit

hans@lama:~/Kerbal Space Game/KSP_linux max mods$ pgrep KSP
11163
hans@lama:~/Kerbal Space Game/KSP_linux max mods$ cat /proc/11163/statm
3127139 1392446 19809 4483 0 3059475 0

The new 1.2.6 gives me on my 64bit install a blinking Icon, but im only at 5.6Gb so no worry before hitting 12Gb (with 16Gb installed)

Maybe you could turn the Red blinking on 64 bit Systems off, or maybe a configurable warning threshold.

Thanks for all the work you put into KSP

Link to comment
Share on other sites

Strange, it should not blink until a few EB of memory is used. I'll install a clean Linux to my test soon and I ll have a look.

Also some testing code sneaked its way into the release. If you press ALT M the game will use 200MB each time. Hopefully no mods use that.

I recompiled a version without it here

Link to comment
Share on other sites

  • 3 weeks later...
Strange, it should not blink until a few EB of memory is used. I'll install a clean Linux to my test soon and I ll have a look.

Confirmed blinking here, on Debian x86_64.

Maybe best to simply disable this if on x64?

Link to comment
Share on other sites

yes absolutely agreed it dose work fine and I am finding it invaluable.

In fact its a godsend would not be able to run my 27 odd mods without it :D

But I just was trying to let you guys know that I think its ksp version checker keeps warning me that it was designed for ksp 1.0.2 and may not be compatible

sorry for the edit but I see that ksp version checker is currently undergoing a re wright of its code by the author so my point may be invalid and moot but hey you might want to drop that author a mail regarding this I....I...I well just....wanted.... to.... let.... you.... know .....I keep quiet now and go away

Edited by hawk_za
Link to comment
Share on other sites

yay an update ................wait ckan are you misbehaving again

hi all was just wondering if there was a specific setting I needed to change on my side to get ckan to see the new update or should I just manually download it ...but then how do I get ckan to not mess with it

Link to comment
Share on other sites

  • 4 weeks later...

Hmm, this tool looks really helpful. I used the old memoryusage but that isn't being updated anymore.

Except, for me it always displays 0 MB used, both in the upper left screen display and the graph screen. The FPS counter seems to be working fine, though. Could it perhaps be the fact that I'm playing on Windows Vista x64 (using x86 KSP, though)? Or did I screw something up?

From the log, it looks like it fails to load both of the GCMonitor .dll's. Log info below, if helpful.

Stats:

Windows Vista x64

KSP x86

Clean KSP install (Steam Verify disk cache), with only GCMonitor installed via CKAN.

Log started: Sat, Aug 08, 2015 20:59:11

[LOG 20:59:13.539] PhysicsGlobals: Loading database

[LOG 20:59:14.709] Load(Assembly): GCMonitor/GCMonitor

[LOG 20:59:14.712] AssemblyLoader: Loading assembly at C:\steam\steamapps\common\Kerbal Space Program\GameData\GCMonitor\GCMonitor.dll

[LOG 20:59:14.748] Load(Assembly): GCMonitor/getRSS_x64

[LOG 20:59:14.749] AssemblyLoader: Loading assembly at C:\steam\steamapps\common\Kerbal Space Program\GameData\GCMonitor\getRSS_x64.dll

[ERR 20:59:14.888] Failed to load assembly C:\steam\steamapps\common\Kerbal Space Program\GameData\GCMonitor\getRSS_x64.dll:

System.BadImageFormatException: Format of the executable (.exe) or library (.dll) is invalid.

at Mono.Cecil.PE.ImageReader.ReadOptionalHeaders (System.UInt16& subsystem, System.UInt16& dll_characteristics) [0x00000] in <filename unknown>:0

at Mono.Cecil.PE.ImageReader.ReadImage () [0x00000] in <filename unknown>:0

at Mono.Cecil.PE.ImageReader.ReadImageFrom (System.IO.Stream stream) [0x00000] in <filename unknown>:0

at Mono.Cecil.ModuleDefinition.ReadModule (System.IO.Stream stream, Mono.Cecil.ReaderParameters parameters) [0x00000] in <filename unknown>:0

at Mono.Cecil.ModuleDefinition.ReadModule (System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x00000] in <filename unknown>:0

at Mono.Cecil.ModuleDefinition.ReadModule (System.String fileName) [0x00000] in <filename unknown>:0

at AssemblyLoader.ScanForBadTypeRefs (System.String file) [0x00000] in <filename unknown>:0

at AssemblyLoader.LoadExternalAssembly (System.String file) [0x00000] in <filename unknown>:0

[LOG 20:59:14.895] Load(Assembly): GCMonitor/getRSS_x86

[LOG 20:59:14.896] AssemblyLoader: Loading assembly at C:\steam\steamapps\common\Kerbal Space Program\GameData\GCMonitor\getRSS_x86.dll

[ERR 20:59:15.000] Failed to load assembly C:\steam\steamapps\common\Kerbal Space Program\GameData\GCMonitor\getRSS_x86.dll:

System.BadImageFormatException: Format of the executable (.exe) or library (.dll) is invalid.

at Mono.Cecil.PE.ImageReader.ReadOptionalHeaders (System.UInt16& subsystem, System.UInt16& dll_characteristics) [0x00000] in <filename unknown>:0

at Mono.Cecil.PE.ImageReader.ReadImage () [0x00000] in <filename unknown>:0

at Mono.Cecil.PE.ImageReader.ReadImageFrom (System.IO.Stream stream) [0x00000] in <filename unknown>:0

at Mono.Cecil.ModuleDefinition.ReadModule (System.IO.Stream stream, Mono.Cecil.ReaderParameters parameters) [0x00000] in <filename unknown>:0

at Mono.Cecil.ModuleDefinition.ReadModule (System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x00000] in <filename unknown>:0

at Mono.Cecil.ModuleDefinition.ReadModule (System.String fileName) [0x00000] in <filename unknown>:0

at AssemblyLoader.ScanForBadTypeRefs (System.String file) [0x00000] in <filename unknown>:0

at AssemblyLoader.LoadExternalAssembly (System.String file) [0x00000] in <filename unknown>:0

Full KSP.log

Link to comment
Share on other sites


[LOG 20:59:15.129] [GCMonitor] Unable to find getRSS implementation
System.DllNotFoundException: GameData/GCMonitor/getRSS_x86.dll
at (wrapper managed-to-native) GCMonitor.GCMonitor:getCurrentVM_Win_x86 ()
at GCMonitor.GCMonitor.Awake () [0x00000] in <filename unknown>:0

Since you have your KSP inside Program Files it is most likely an anti virus problem. Try to copy the game somewhere else (C:\Games or something like that)

Link to comment
Share on other sites


[LOG 20:59:15.129] [GCMonitor] Unable to find getRSS implementation
System.DllNotFoundException: GameData/GCMonitor/getRSS_x86.dll
at (wrapper managed-to-native) GCMonitor.GCMonitor:getCurrentVM_Win_x86 ()
at GCMonitor.GCMonitor.Awake () [0x00000] in <filename unknown>:0

Since you have your KSP inside Program Files it is most likely an anti virus problem. Try to copy the game somewhere else (C:\Games or something like that)

Thanks for the quick response. I finally decided to take the plunge and switch over to linux and do some hardware changes at the same time, which put my system out of commission for a few days.

So, I bet that'll remove the problem once I get things fully ready to go.

Though it's no longer relevant, I actually wasn't running it from Program Files, it was in the steam directory. That doesn't mean an AV program wasn't still at fault though. Good to know to check those kinds of things.

Link to comment
Share on other sites

Thanks for the quick response. I finally decided to take the plunge and switch over to linux and do some hardware changes at the same time, which put my system out of commission for a few days.

So, I bet that'll remove the problem once I get things fully ready to go.

Though it's no longer relevant, I actually wasn't running it from Program Files, it was in the steam directory. That doesn't mean an AV program wasn't still at fault though. Good to know to check those kinds of things.

Ok, my linux install failed due to ATI not providing linux support for my GPU, and the open source drivers just couldn't get the job done.

As a result, I'm back to Windows Vista and this is still showing 0 MB at all times. In output.txt, I notice the it seems to be trying to find getRSS_x86.dll in the KSP_Data directory, like someone earlier mentioned for linux. Could that be the problem?

Specs: Windows Vista

Vanilla KSP x86

GCMonitor 1.2.7 (not from CKAN)

Full output.txt

[GCMonitor] Setting up getRSS delegates

(Filename: C:/buildslave/unity/build/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 56)

C:\steam\steamapps\common\Kerbal Space Program

(Filename: C:/buildslave/unity/build/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 56)

Fallback handler could not load library C:/steam/steamapps/common/Kerbal Space Program/KSP_Data/Mono/GameData/GCMonitor/getRSS_x86.dll
Fallback handler could not load library C:/steam/steamapps/common/Kerbal Space Program/KSP_Data/Mono/.\GameData/GCMonitor/getRSS_x86.dll
Fallback handler could not load library C:/steam/steamapps/common/Kerbal Space Program/KSP_Data/Mono/GameData/GCMonitor/getRSS_x86.dll
Fallback handler could not load library C:/steam/steamapps/common/Kerbal Space Program/KSP_Data/Mono/GameData/GCMonitor/getRSS_x86
Fallback handler could not load library C:/steam/steamapps/common/Kerbal Space Program/KSP_Data/Mono/.\GameData/GCMonitor/getRSS_x86
Fallback handler could not load library C:/steam/steamapps/common/Kerbal Space Program/KSP_Data/Mono/GameData/GCMonitor/getRSS_x86
Fallback handler could not load library C:/steam/steamapps/common/Kerbal Space Program/KSP_Data/Mono/libGameData/GCMonitor/getRSS_x86.dll
Fallback handler could not load library C:/steam/steamapps/common/Kerbal Space Program/KSP_Data/Mono/.\libGameData/GCMonitor/getRSS_x86.dll
Fallback handler could not load library C:/steam/steamapps/common/Kerbal Space Program/KSP_Data/Mono/libGameData/GCMonitor/getRSS_x86.dll
Fallback handler could not load library C:/steam/steamapps/common/Kerbal Space Program/KSP_Data/Mono/GameData/GCMonitor/getRSS_x86.dll
Fallback handler could not load library C:/steam/steamapps/common/Kerbal Space Program/KSP_Data/Mono/.\GameData/GCMonitor/getRSS_x86.dll
Fallback handler could not load library C:/steam/steamapps/common/Kerbal Space Program/KSP_Data/Mono/GameData/GCMonitor/getRSS_x86.dll
Fallback handler could not load library C:/steam/steamapps/common/Kerbal Space Program/KSP_Data/Mono/GameData/GCMonitor/getRSS_x86
Fallback handler could not load library C:/steam/steamapps/common/Kerbal Space Program/KSP_Data/Mono/.\GameData/GCMonitor/getRSS_x86
Fallback handler could not load library C:/steam/steamapps/common/Kerbal Space Program/KSP_Data/Mono/GameData/GCMonitor/getRSS_x86
Fallback handler could not load library C:/steam/steamapps/common/Kerbal Space Program/KSP_Data/Mono/libGameData/GCMonitor/getRSS_x86.dll
Fallback handler could not load library C:/steam/steamapps/common/Kerbal Space Program/KSP_Data/Mono/.\libGameData/GCMonitor/getRSS_x86.dll
Fallback handler could not load library C:/steam/steamapps/common/Kerbal Space Program/KSP_Data/Mono/libGameData/GCMonitor/getRSS_x86.dll
[GCMonitor] Unable to find getRSS implementation
System.DllNotFoundException: GameData/GCMonitor/getRSS_x86.dll

at (wrapper managed-to-native) GCMonitor.GCMonitor:getCurrentVM_Win_x86 ()

at GCMonitor.GCMonitor.Awake () [0x00000] in <filename unknown>:0

Link to comment
Share on other sites

It does list those path whenever it fails to load the dll for any problems. Hard to tell what is going on. It may be an Anti-Virus blocking the dll (try to disable it if you have one), the dll itself not working for Vista or some other strange problem...

Try to copy the dll in one of the path it tries to make sure but I doubt it will change anything.

I ll see if I can think of something in the weekend but I doubt it :(

Link to comment
Share on other sites

It does list those path whenever it fails to load the dll for any problems. Hard to tell what is going on. It may be an Anti-Virus blocking the dll (try to disable it if you have one), the dll itself not working for Vista or some other strange problem...

Try to copy the dll in one of the path it tries to make sure but I doubt it will change anything.

I ll see if I can think of something in the weekend but I doubt it :(

I've tried both of those things. (disabled AV, copied dll to new path)

Still got the same message. Given the way things change between versions of Windows sometimes, it could just be something not working with Vista and I imagine that being very hard for you to fix if you don't have Vista. I'm not even close to knowing about memory stuff. I wish I could be of more help. Thanks for making such great tools for KSP.

Link to comment
Share on other sites

I need a Mac player to test a new version : https://www.dropbox.com/s/8ilzgukga2ztg0x/GCMonitor_OSXTest.zip?dl=0

Launch the game, toggle the memory counter (ALT F on Win, so something like that on OSX) and tell me if the memory counter show a number different than 0.

Wercho : that version may fix your problem too.

Edit : Source

Edited by sarbian
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...