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
When resolving my scenario the salvage file causes an NPE.
#1
I've attached the salvage file, and the log. If needed I'll provide a complete zip of the whole MekHQ I'm using for this (with all custom units and everything).


Attached Files
.zip   salvage.mul.zip (Size: 7.64 KB / Downloads: 1)
.zip   mekhqlog.txt.zip (Size: 70.66 KB / Downloads: 0)
Reply
#2
I figured out why this was happening.

I'm using MekHQ to track both sides' forces. And this boils down to an externalID conflict.

Solution?
When reading the "externalID" from the salvage file, MekHQ needs to verify that the unit is the same based on externalID, and probably chassis, model, & type as well. I say chassis, model, and type... because what if I have a Centurion Mech, and a Centurion ASF? And I've got both models set to my unit name or something? So it needs to be verified against all three.

Bug: https://sourceforge.net/tracker/?func=de..._id=269041
Reply
#3
Yes, you are right, we should be checking against all three. I should also probably use randomly assigned rather than sequential IDs to reduce the odds of a match as well. In the meantime, you can remove the external IDs from the salvage file, but you probably already figured that out.
Reply
#4
(01-12-2012, 01:18 PM)Taharqa link Wrote: Yes, you are right, we should be checking against all three. I should also probably use randomly assigned rather than sequential IDs to reduce the odds of a match as well. In the meantime, you can remove the external IDs from the salvage file, but you probably already figured that out.

Actually, I wrote an addendum on the tracker for this already. It wont work. Jayof9s made the point:
What if you have the same mech, with the same model, with the same external ID? Everything would still match. So I made the suggestion of using some form of unique campaign id... possibly a uuid or guid instead of the above method.
Reply
#5
Yes, its not a perfect solution, but it would catch most cases. But I probably should just go ahead and implement a uuid.
Reply
#6
(01-14-2012, 11:12 AM)Taharqa link Wrote: Yes, its not a perfect solution, but it would catch most cases. But I probably should just go ahead and implement a uuid.

Smile

Just make sure you add support for loading saves from previous versions when you do.. as in make it add the uuid to them on load.

Are we driving you nuts yet with all the bugs & feature requests? lol
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Stop nuking my salvage! kipstafoo 4 1,864 09-12-2016, 03:21 PM
Last Post: Netzilla
  Confused about salvage and repair rax 9 4,467 03-21-2015, 02:09 AM
Last Post: pheonixstorm
  High memory usage resolving scenarios with drophips, warships etc SirMegaV 28 9,583 07-14-2014, 09:58 AM
Last Post: Netzilla
  Suggestion - confirming kill list when resolving manually MagnusEffect 12 4,241 07-09-2014, 12:09 AM
Last Post: pheonixstorm
  salvage and other things. pheonixstorm 5 2,224 12-19-2013, 04:56 PM
Last Post: Sidewinder
  Salvage / repair vettie 19 10,035 08-30-2012, 11:38 AM
Last Post: vettie
  How to Salvage Armor meatstack 3 2,162 03-05-2012, 10:45 AM
Last Post: meatstack
  Salvage and surrender silmeril 1 1,548 02-16-2012, 02:42 AM
Last Post: ralgith

Forum Jump:


Users browsing this thread: 1 Guest(s)