This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
High memory usage resolving scenarios with drophips, warships etc
#1
MekHQ 0.3.5

With only 1024mb of memory used to run MekHQ, I used to be able to resolve scenarios automatically involving multiple dropships and warships automatically. But after the upgrade, I can't due to memory shortage, not even when there is only a single dropship for OpsFor. What are the changes that causes the huge memory usage during the automative resolve scenario?
Reply
#2
I don't think there have been any changes to spacecraft recently.

That said, I am guessing your issue has to do with your other post; prisoners. I'm not sure the system for generating prisoners has been tested with large spacecraft.
Reply
#3
I already posted a bug report on this. Fighters resolve fine but once you get a DS in there... even doing a manual resolve doesn't handle right, though it doesn't crash at least.
Reply
#4
Having a heap dump could also help.  It would tell us what classes are retaining so much memory and could help pinpoint what's causing the issue.

Getting a heap dump will require the ability to transfer large files (the dump will be about the same size as the memory being used, although it compresses well).  To get a heap dump, you'll have to be able to run jmap, which is a binary that comes with Java, however in Windows you'll need to make sure the Java bin directory is on your path.  From there you just need to run this command:

Code:
jmap -dump:format=b,file="<heap.bin>" <pid>


Where [tt]<heap.bin>[/tt] is the name of the heap file that will be created, and [tt]<pid>[/tt] is the process id of the JVM running Megamek.  You can get the pid by running [tt]jps[/tt] which also comes with Java and will list the pids for each running JVM. 
Reply
#5
Would love to help but I'm not a programmer... I can only report bugs...

Something off topic here, but related to dropships and warships... I noticed that sometime the time counter (in minutes) for repairing dropships and warships do not reduce after progressing a day, and I had to remove certain crews then it works again. But I can't replicate that using a fresh campaign. Maybe my save files are corrupted. Will make an official report when I can duplicate the problem using a fresh campaign.
Reply
#6
thats another bug I posted about.
Reply
#7
Hi pheonixstorm. I did some testing and noticed something regarding the repair time not reducing that might help (or you might already know).

Warship Vigilant Corvette, monthly maintenance done by main technician failed (sub-lieutenant), white shark was damaged as reported. It was also reported at the same time that my gunner (lieutenant, highest ranking officer) doesn't have enough time to repair it. At the repair tab, the white shark is already scheduled (to my gunner lieutenant) before I click any repairs. Clicking advance day doesn't reduce the repair time (most likely because it was assigned to my gunner instead of my technician). Unassign gunner lieutenant from the Vigilany Corvette then press advance day and it becomes ok. Tried salvaging the white shark, save game, load game, advance day, reinstall white shark, but still having the same problem.

White shark love my gunner lieutenant.....
Reply
#8
Yeah, anything longer than 480 just wont repair. Nasty trick to do the work in a day... repair, save, reload. Repeat until complete. Beware though it can cause an NPE if you have too many things in the mix though exactly HOW that happens I know not.
Reply
#9
I'm not sure how right am I, but I noticed that the repair assignment was done automatically to the highest ranking officer in the vessel. If the highest ranking officer happened to be a crewmemeber then the repair time will operate normally. If its not, the repair time will be stuck.

To temporarily fix it, and not repair with save and load and save and load until complete Tongue , make sure that the highest ranking officer is a crewmember, I think it will be OK. Will be trying it out today.
Reply
#10
Yeah I was thinking that would work but haven't felt like reassigning any of my crews.
Reply
#11
(05-25-2014, 10:56 PM)SirMegaV link Wrote:I'm not sure how right am I, but I noticed that the repair assignment was done automatically to the highest ranking officer in the vessel. If the highest ranking officer happened to be a crewmemeber then the repair time will operate normally. If its not, the repair time will be stuck.

To temporarily fix it, and not repair with save and load and save and load until complete Tongue , make sure that the highest ranking officer is a crewmember, I think it will be OK. Will be trying it out today.

For reporting purposes it will report the ship's commander, however, it shouldn't make a difference if they are a tech or not. Repairs for large vessels are conducted by the tech/vessel (crewmembers) team assigned to the ship as a whole and as a result, their skill level is an average.
Reply
#12
Back to the original posting, anyway that I can resolve battles that involve salvaging dropships and warships without hitting memory issue?
Reply
#13
Not until that particular bug is fixed. For the moment just GM add the DS/JS and edit the damage to something close to what you would have salvaged. Just don't forget to airlock the crew
Reply
#14
(07-05-2014, 06:25 PM)SirMegaV link Wrote:Back to the original posting, anyway that I can resolve battles that involve salvaging dropships and warships without hitting memory issue?

Arlith already told you how to make us a heap dump. You don't need to be a developer to do it. Without it we don't have any easy way to figure out what is wrong.
Reply
#15
Bug [#505] is now fixed. I was able to create my own heap dump. It was caused by a silly error on 1 line on my part in the crew generation. I'd like to thank Arlith for helping me find it since I looked right at it for over an hour and couldn't see it... yet passing it to him to look at took all of 30 seconds to pick it out.  :o  :Smile
Reply
#16
I think both of you need a standing ovation and a 6 pack of whatever legal beverage you can drink Wink
Reply
#17
(07-06-2014, 12:44 AM)pheonixstorm link Wrote:I think both of you need a standing ovation and a 6 pack of whatever legal beverage you can drink Wink

Coca-Cola if you're buying Wink
Reply
#18
Don't mind buying but I'm most likely half world away. How do u create a heap dump?
Reply
#19
(07-06-2014, 06:13 AM)SirMegaV link Wrote:Don't mind buying but I'm most likely half world away. How do u create a heap dump?

Wink

(05-22-2014, 09:32 AM)Arlith link Wrote:Having a heap dump could also help.  It would tell us what classes are retaining so much memory and could help pinpoint what's causing the issue.

Getting a heap dump will require the ability to transfer large files (the dump will be about the same size as the memory being used, although it compresses well).  To get a heap dump, you'll have to be able to run jmap, which is a binary that comes with Java, however in Windows you'll need to make sure the Java bin directory is on your path.  From there you just need to run this command:

Code:
jmap -dump:format=b,file="<heap.bin>" <pid>


Where [tt]<heap.bin>[/tt] is the name of the heap file that will be created, and [tt]<pid>[/tt] is the process id of the JVM running Megamek.  You can get the pid by running [tt]jps[/tt] which also comes with Java and will list the pids for each running JVM.
Reply
#20
Thanks ralgith.. but i seriously do not understand...

1. Java bin directory is on your path?
2. <pid> = process name found in task manager?
3. running jps?

I'm lost, I will stick with the testing... Smile
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Suggestion - confirming kill list when resolving manually MagnusEffect 12 5,040 07-09-2014, 12:09 AM
Last Post: pheonixstorm
  Memory usage pheonixstorm 10 4,537 04-29-2014, 12:04 PM
Last Post: ralgith
  Usage for remote players sshagent 9 5,233 09-21-2012, 05:19 AM
Last Post: sshagent
  When resolving my scenario the salvage file causes an NPE. ralgith 5 3,085 01-14-2012, 11:33 AM
Last Post: ralgith
  Adjusting Memory Usage in Megamek called by MekHQ Alemnyr 5 3,201 12-31-2011, 06:20 AM
Last Post: Alemnyr

Forum Jump:


Users browsing this thread: 1 Guest(s)