Hard Light Productions Forums

General FreeSpace => FreeSpace & FreeSpace Open Support => Topic started by: Trivial Psychic on August 09, 2021, 10:38:05 pm

Title: What are MDMP Files and How do I Use Them?
Post by: Trivial Psychic on August 09, 2021, 10:38:05 pm
So I've been getting ready to play SAH, but I've found two models that cause a CTD with no message even under a debug build.  One is the inf_vidar.pof and the inf_latona.pof.  The log file ends with the attempted load of the file, then a "CRASH DETECTED!!!" line indicating that it wrote a "crash dump" file.  When I found the file and opened it in notepad, it comes up completely un-legible.  How do I use this file to figure out what the problem is?
Title: Re: What are MDMP Files and How do I Use Them?
Post by: Phantom Hoover on August 10, 2021, 08:49:16 am
It’s a memory dump file containing a copy of FSO’s memory when it crashed. You need developer debug tools to do anything with it, and given the nature of the bug it should be easy for a developer to reproduce anyway. Post your fs2_open.log though, it might have some useful info.
Title: Re: What are MDMP Files and How do I Use Them?
Post by: Trivial Psychic on August 10, 2021, 09:02:32 pm
Here's the log file.  I tried to include the mdmp file but HLP objected to the type, so if you need it I'll have to zip it or something.
Title: Re: What are MDMP Files and How do I Use Them?
Post by: Trivial Psychic on August 13, 2021, 07:16:38 pm
Any thoughts?  I tried copying the same model file from an older install on my other drive but it gave the same result.  I've been looking for a suitable replacement for the Latona.  I might have to use an Apollo for it.

[Update]
Well, I just opened both of the offending files in PCS2 and re-saved them and they worked.  It must have been something buried too deep for FSO's existing warnings to catch.
Title: Re: What are MDMP Files and How do I Use Them?
Post by: Trivial Psychic on September 26, 2021, 09:19:33 pm
So I've encountered this no-warning-crash a few times, and each time I can overcome it by simply loading the model in PCS2 and re-saving it... until now.  I'm considering a play-through of TBP but I've been getting a CTD from the Aurora models.  I've tried deleting them and re-downloading, but it didn't help.  What I did find strange however, is that I can load these models in the techroom without issue, but as soon as I load them in the lab, or attempt to open FRED, I get a ctd or in the case of FRED, it just silently aborts the program.  This occurs with both release and debug builds.
Title: Re: What are MDMP Files and How do I Use Them?
Post by: Trivial Psychic on October 02, 2021, 08:52:47 pm
Is there anyone out there who can instruct me in how to access the data in the MDMP file?  These no-message crashes are REALLY starting to get on my nerves and I would like to find out what's causing them, aside from the simple 'well, you must have broken something' answer.

So, I've done a bit more testing and found that there are underlying bugs that have been introduced in newer builds that seem to have gone unnoticed.

Recently, I've been playing Unification War, and I've been updating my copy with newer available (but still compatible) models and a few effects.  I also noticed that there was an inconsistent use of the escort list, so I decided to load all of the missions and add escort lists to them... at least those in which you HAVE targetting sensors.  I had being doing them a couple of missions ahead of where I was playing and suddenly had the missions giving me a CTD without error message and wouldn't let me proceed.  I thought that I'd corrupted my pilot file so I restarted the campaign, and also did the escort list changes to all of the relevant missions.  I'd again proceeded a few missions in and suddenly got the CTD again, and I hadn't even made any changes.  Oddly enough, the mission that gave me the CTD I had previously loaded properly, before exiting the program without flying it.  THAT was what had gotten me frustrated.  I then had an idea and switched back to an older, that is the 20.4 release build, and was surprised when it loaded properly.  A quick test with subsequent Knighlys reveals that whatever is giving me trouble was introduced AFTER the Sept. 29th build.

Also, I decided to test the TBP issue I was having and decided to try older builds.  I ended up jump back to the oldest build I had in my list, from early July and was surprised when the release build (I.E., not a debug build) gave me an error message.  It seems that the fighter in question had 2 primary banks in the model, but only 1 listed in the table.  I checked and found that there is space for 2 primaries in the table, but one of them had all text within the quotation marks removed.  I guess that someone decided they wanted those banks available for FREDders but didn't want it to suddenly give more banks to the fighter in preexisting campaigns.  I also guess that a coder decided to make it an option to leave banks empty in the tables but the change was incomplete, and the error message was taken out.  That's why it just crashes without any apparent reason.  I added data for the second bank on the affected fighters and they load properly now, even in recent builds.  I'll do some further research and maybe find out when this was introduced.
Title: Re: What are MDMP Files and How do I Use Them?
Post by: Phantom Hoover on October 04, 2021, 12:45:58 pm
I know there were substantial changes to the code that loads POFs into memory recently, to make them work on ARM. That could easily be related.
Title: Re: What are MDMP Files and How do I Use Them?
Post by: ngld on October 10, 2021, 07:21:50 pm
Is there anyone out there who can instruct me in how to access the data in the MDMP file?
You can open the .mdmp file with Visual Studio but that's not particularly helpful unless you also have the .pdb file for the build. If you have both files, it'll show you stacktrace which tells you where exactly the error happened in the code which is useful for further testing and debugging.

These no-message crashes are REALLY starting to get on my nerves and I would like to find out what's causing them, aside from the simple 'well, you must have broken something' answer.
A CTD is always an engine bug and a sign that something isn't being checked or handled appropriately. Mods should NEVER trigger a CTD even if they only contain nonsense data.
Can you put together a minimal mod (just a single mission with a ship if necessary) that reliably reproduces the problem? That'd make debugging a lot easier.
Title: Re: What are MDMP Files and How do I Use Them?
Post by: Trivial Psychic on October 10, 2021, 09:03:05 pm
I could put together a mini-mod for TBP.  I've been experiencing a CTD with a couple of higher-detail models I recently inserted into the mod.  As for the Unification War problem, I can't reproduce it yet.  I used the 20.4 to get past that point, and now I've switched to the Oct. 7th Nightly with no problems.
Title: Re: What are MDMP Files and How do I Use Them?
Post by: Trivial Psychic on October 11, 2021, 07:45:03 am
Is there anyone out there who can instruct me in how to access the data in the MDMP file?
You can open the .mdmp file with Visual Studio but that's not particularly helpful unless you also have the .pdb file for the build. If you have both files, it'll show you stacktrace which tells you where exactly the error happened in the code which is useful for further testing and debugging.
So you mean like the files in THIS (https://porphyrion.feralhosting.com/datacorder/builds/nightly/20211011_8a449eb8e/nightly_20211011_8a449eb8e-debug-x64-SSE2.7z) package?