Hard Light Productions Forums

General FreeSpace => FreeSpace & FreeSpace Open Support => Topic started by: AV8R on March 13, 2015, 06:54:01 pm

Title: And The Saga Continues
Post by: AV8R on March 13, 2015, 06:54:01 pm
So, after a messy situation that cost me a motherboard (in trying to diagnose my frame rate issue I removed my i5 processor to replace it with my Pentium and when I removed it, some of the excess Arctic Silver paste from the cooler fell into the CPU socket, rendering it socket useless. Trying to clean it just made it worse). I got a new motherboard and video card and I'm doing testing in FSO and my other oft-played games. All work perfectly, except for when I try to load some missions - including my FRED-created mission.

When I try to load my FREDed mission, FSO will crash to the desktop with the following error:

Malloc Failed!

ntdll.dll! KiFastSystemCallRet
kernel32.dll! WaitForSingleObjectEx + 67 bytes
kernel32.dll! WaitForSingleObject + 18 bytes
fs2_open_3_7_2_RC5-DEBUG.exe! long SCP_DumpStack(class SCP_IDumpHandler *) + 354 bytes
fs2_open_3_7_2_RC5-DEBUG.exe! <no symbol>
fs2_open_3_7_2_RC5-DEBUG.exe! <no symbol>
fs2_open_3_7_2_RC5-DEBUG.exe! <no symbol>
fs2_open_3_7_2_RC5-DEBUG.exe! <no symbol>
fs2_open_3_7_2_RC5-DEBUG.exe! <no symbol>
fs2_open_3_7_2_RC5-DEBUG.exe! <no symbol>
fs2_open_3_7_2_RC5-DEBUG.exe! <no symbol>
fs2_open_3_7_2_RC5-DEBUG.exe! <no symbol>
fs2_open_3_7_2_RC5-DEBUG.exe! <no symbol>
fs2_open_3_7_2_RC5-DEBUG.exe! <no symbol>
fs2_open_3_7_2_RC5-DEBUG.exe! <no symbol>
fs2_open_3_7_2_RC5-DEBUG.exe! <no symbol>
fs2_open_3_7_2_RC5-DEBUG.exe! <no symbol>
fs2_open_3_7_2_RC5-DEBUG.exe! <no symbol>
fs2_open_3_7_2_RC5-DEBUG.exe! <no symbol>
fs2_open_3_7_2_RC5-DEBUG.exe! <no symbol>
fs2_open_3_7_2_RC5-DEBUG.exe! <no symbol>
fs2_open_3_7_2_RC5-DEBUG.exe! <no symbol>
fs2_open_3_7_2_RC5-DEBUG.exe! <no symbol>
fs2_open_3_7_2_RC5-DEBUG.exe! <no symbol>
fs2_open_3_7_2_RC5-DEBUG.exe! <no symbol>
fs2_open_3_7_2_RC5-DEBUG.exe! <no symbol>
fs2_open_3_7_2_RC5-DEBUG.exe! <no symbol>
kernel32.dll! BaseThreadInitThunk + 18 bytes
ntdll.dll! RtlInitializeExceptionChain + 239 bytes
ntdll.dll! RtlInitializeExceptionChain + 194 bytes

The video card is an NVidia GTX 750 Ti with latest driver running all default settings. I get this message running either the Debug or non-Debug EXE (3.7.2 RC5).

Log file is attached. Any ideas/suggestions?


[attachment deleted by nobody]
Title: Re: And The Saga Continues
Post by: AdmiralRalwood on March 13, 2015, 07:14:18 pm
Malloc Failed!
How much RAM do you have?
Title: Re: And The Saga Continues
Post by: AV8R on March 13, 2015, 07:16:51 pm
PC has 2GB DDR3 RAM

Vid card has 1GB GDDR5

EDIT: Complete specs:

Windows 7 SP1 x86
Intel i5 3350P (3.1Ghz)
2GB DDR3 @ 1600Mhz 9-9-9-24
NVidia GTX 750 Ti 1GB GDDR5 (PCIe 3.0)
Monitor resolution 1440x900 @ 32-bit
Title: Re: And The Saga Continues
Post by: AdmiralRalwood on March 13, 2015, 07:32:50 pm
Delete/rename MV_Advanced.vp and see if it still crashes.
Title: Re: And The Saga Continues
Post by: AV8R on March 13, 2015, 08:23:30 pm
This may be of help - after trying the Easy Setup selection "Default FS2 (All Features Off)" with success, I began from this point and starting adding features. What I discovered was a problem with 2 settings under Graphics:

1) Enable 3D Shockwaves
2) Enable Post Processing

The first one causes a CTD when enabled. The second causes the Malloc error posted above. With either setting unchecked, any mission loads and runs just fine - with no frame rate lag.

Does the MV_Advanced.vp file have something to do with this?
Title: Re: And The Saga Continues
Post by: AdmiralRalwood on March 13, 2015, 08:49:43 pm
Does the MV_Advanced.vp file have something to do with this?
Huge textures; take up a lot of memory. Generally "Malloc Failed" means you ran out of memory to allocate (or, more accurately, there was no usable block of memory to satisfy the request; you can actually have lots of unused RAM and still not have usable blocks due to fragmentation, for instance).

Presumably, post-processing is increasing your memory usage enough that you're getting malloc failures.
Title: Re: And The Saga Continues
Post by: AV8R on March 13, 2015, 09:11:36 pm
Thanks for your replies. When you mentioned lack of RAM, do you mean system RAM of video RAM?

Strange - this never happened before. My system is exactly the same as before (I even ordered the same MB) except for the video card - even though it has the same amount of VRAM as the last one (1GB). I never had this issue with the other video card (ATI FirePro 3D v4800) - with all other things being exactly the same. Hmmm.

What's your theory on why enabling 3D Shockwaves would cause a CTD?
Title: Re: And The Saga Continues
Post by: AdmiralRalwood on March 13, 2015, 09:19:13 pm
Thanks for your replies. When you mentioned lack of RAM, do you mean system RAM of video RAM?
[...]
What's your theory on why enabling 3D Shockwaves would cause a CTD?
¯\_(ツ)_/¯

We have reached the limits of my understanding of this matter.
Title: Re: And The Saga Continues
Post by: AV8R on March 13, 2015, 09:23:12 pm
¯\_(ツ)_/¯

Well said.... well said.   :D
Title: Re: And The Saga Continues
Post by: AV8R on March 13, 2015, 10:50:28 pm
Ok, further testing has revealed this (after once again using "Default FS2 (All Features Off)" and adding features many times and after many reboots):

Post processing is not the culprit, but 3D is. If anything is enabled that has 3D in the name (i.e.: 3D Shockwaves, 3D models, 3D warp) the game will give a Malloc error or black screen freeze and CTD during either initially loading the mission (before command briefing) or loading the actual briefing. Seems the video driver doesn't like the 3D settings. I tested loading missions with all FSO bells and whistles turned on under Graphics except 3D options and everything loads fine. If I include any one of the 3D options mentioned above, I get either a CTD or a Malloc error.

I'll continue to test to see if I can narrow down selections any further.
Title: Re: And The Saga Continues
Post by: jr2 on March 14, 2015, 06:52:10 am
On a lark, you could run memtest86 or Windows memtest to make sure you don't have bad memory.  (Although, I would think you would also experience system instability if that were the case).
Title: Re: And The Saga Continues
Post by: AV8R on March 14, 2015, 12:36:49 pm
On a lark, you could run memtest86 or Windows memtest to make sure you don't have bad memory.  (Although, I would think you would also experience system instability if that were the case).

You sir, are a semi-genius. I ran MemTest86 and sure enough, I was getting a few memory errors. Not having any before with the same memory, I popped out the RAM, switched memory slots and made sure I reseated them good. Reran MemTest and no more memory errors. Good call. Ok, that's taken care of.

Unfortunately, the 3D issue remains. Although now I've narrowed it down to 3 options:

1) Use 3D Shockwaves (causes black screen after loading mission and before command briefing appears - pressing ESC causes CTD, no error)
2) Use 3D models for ship selection (see below)
3) Use 3D models for weapons selection (see below)

Using "3D Warp" or "3D Radar" has no detrimental effect on loading or playing any mission.

Options 2 and 3 cause a serious crash that forces a system reset (3 errors will appear):

a) Malloc error
b) DWM.EXE App Error - The instruction at 0x679cdf4f referenced memory at 0x0000a568. The memory could not be read.
c) FS2_Open_3_7_2_RC5.exe App Error - The instruction at 0x004984ad referenced memory at 0x00000000. The memory could not be written.

After closing the dialog boxes I will be back to an unresponsive desktop (at 640x480 resolution) and unable to restart the PC, forcing a push of the reset button.

What's more confusing is that the crashes don't happen on every mission - if the mission is not complex (has few resources/ships) most will play ok. More complex missions (lots of resources/larger ships) seem to aggravate the issue.

FSO does not seem to like my choice of video card.   :mad:
Title: Re: And The Saga Continues
Post by: AV8R on March 14, 2015, 05:19:04 pm
Well, after playing FSO for several hours with no crashes simply by not using any 3D effects in the launcher, I'm quite pleased with the new video card's performance. The FPS display shows no deviation from 75FPS at any point no matter what is going on in the game or what is on the screen at any given time - and not just for FSO but all of my other games as well. So I may have to give up a few features to make FSO reliable on my system, but it's a small price to pay for such good performance.

Is anyone else out there having any issues with NVidia-based cards - specifically the 700-series? If so, perhaps we can collaborate and help the community by trying to isolate the cause of the instability while using 3D effects in FSO. Maybe we can find a solution together.

If there's any specific testing one of the SCP programmers would like me to try, just let me know.  :yes:

Edit: Using the latest nightly build still produced crashes while attempting to use 3D effects.
Title: Re: And The Saga Continues
Post by: jr2 on March 15, 2015, 03:24:37 pm
You could perhaps check to be sure that all of the FS files were downloaded correctly.   Bad memory gives me the creeps; lots of things can start to go wrong.

Might also want to do
Code: [Select]
sfc  /scannow from an elevated command prompt to give your Windows system files an inspection as well (any Windows updates manage to install while using the bad memory?).  (Start, type cmd, right-click it, run as admin)

I think you could use QuickHash (https://sourceforge.net/projects/quickhash/) to do the job for FS2 (you'll just have to ask someone else to run it or a similar program and compare notes).
Title: Re: And The Saga Continues
Post by: AV8R on March 15, 2015, 06:49:50 pm
Ok, I'll run the Windows system file check and make sure the OS is intact. I'm pretty confident about my FSO files since I downloaded them a while ago before I was having any issues and I have them backed up to my NAS for safekeeping. I corrected the memory issue thanks to your suggestion so now everything is running super stable on my system.

I wouldn't mind checking my hash values against someone else's. Maybe that would be a good post in the wiki so people would have a reference to check against. Just update the wiki when new versions are released.

The only issue I still have, which I think is video driver related, is with the 3D effects in FSO. I did a search on the forum because I could have sworn I saw a post from someone a few weeks ago about issues with an NVidia GTX 700-series video card - but now I can't find it. Does anyone remember seeing this?
Title: Re: And The Saga Continues
Post by: jr2 on March 15, 2015, 09:56:03 pm
I PMmed Goober, and he said re-running the FSO Installer will double-check the hashes of the FSO files, so go ahead and try that.  (I'm suspicious that those 3D- files you mentioned got corrupted somehow).

It could also be something overriding those files (such as, you put in custom files or something and forgot), so you could take a look and see if there are any non-vp files in your directories.
Title: Re: And The Saga Continues
Post by: AV8R on March 16, 2015, 01:01:27 pm
Ok, I'll re-download tonight just to be safe. The Windows system file check found nothing out of place, so that checks out.

As far as any other mods or files in other folders, I run FSO pretty lean (only the minimum files I need to get the maximum benefit). I run all of the 2014 VPs at default with visual tweaking only done in the Launcher 5.5g - which is all just typical stuff (nothing changed externally by adding files in any of the DATA folders anywhere). In the past when I downloaded updated VPs or ports I would delete the old folders and download all files fresh after creating a fresh VP folder - I'm super careful about this - as I said, I want the maximum benefit from the minimum number of files and no reconfiguration. I NEVER change what's been downloaded.

Thanks again, and I'll let you know how the download comparison goes.
Title: Re: And The Saga Continues
Post by: Macfie on March 16, 2015, 04:31:49 pm
You said you are using Launcher 5.5g.
That may be your problem.
Try downloading and using the wxlauncher-0.9.4
Title: Re: And The Saga Continues
Post by: AV8R on March 17, 2015, 07:18:27 pm
Download comparison complete. Other than missing some special feature files (.OGG movies, a music file for FSPort and such) everything that matters - all of the VP files were hash-confirmed. No broken or corrupt files. The wxLauncher made no difference either - I even eliminated the launchers and started RC5 with a batch file and all of the pertinent switches (which I stole from the launcher.ini file). FSO never gives me an issue starting up, no matter what options I choose from the launcher - it's loading missions that sometimes blows up depending on which options (switches) I choose from the loader - especially 3D options, as stated above.

I actually tried loading a bunch of missions in both FSO and FSPort with all bells and whistles turned on in the launchers and found that 99% load with no issues (I randomly selected them based on what kind/how many ship were in each mission - the more the merrier). Most loaded and played just fine (this is with all options turned on, including 3D options). Some, like Bearbaiting, High Noon and Their Finest Hour will sometimes CTD before the command briefing if the 3D effects are enabled in the launcher. This is also true of my FREDed mission which will ALWAYS crash if 3D Shockwaves are enabled and give a memory error if 3D models are enabled.

I don't know what these missions have in common, other than they all feature a Sathanas. Interestingly, I had no trouble loading any FSPort missions, even those with multiple capital ships and the Lucifier (and this is with all 3D effects turned on in the launcher; 3D Shockwaves, 3D models, etc).

Is there anything you would have me try next?

Edit: BTW, the new FSOInstaller is the bomb-diggity....
Title: Re: And The Saga Continues
Post by: jr2 on March 19, 2015, 10:54:57 am
Do missions with the Sathy crash with 3D on when using 2012 MVPs?  If so, what about previous MVPs?  No MVPs? (Wondering if there's a hard to find bug with the Sathy model??)
Title: Re: And The Saga Continues
Post by: AV8R on March 19, 2015, 07:22:13 pm
I hate to say this, jr2, but you may be onto something. I loaded and played through every FSOpen and FSPort mission with a major capital ship using no mods and all visual options turned on (all 3D options too) and encountered no issues whatsoever while loading or playing any mission (using the RC5 exe). If I switched to the FSPort 2014 MediaVPs, I could load/play any mission in FSPort with no issues, again with all visual and 3D options turned on. When I got to FSOpen using the 2014 MediaVPs, I could load/play any mission until I got to a mission with a Sathanas - then I would get either a failure to load with CTD before command briefing or briefing would load and I'd get a Malloc error loading the ship selection screen with a fatal CTD (have to reset PC). If I turn off the 3D options (Shockwaves, ship models, weapons models), the levels will properly load. This is all repeatable.

I haven't tried this with the old MediaVPs (3.6.12) yet. I may do it just to see how deep this rabbit hole goes.
Title: Re: And The Saga Continues
Post by: AV8R on March 19, 2015, 09:37:17 pm
Ok, so here's the score (using all graphics and 3D options enabled from the launcher):

FSPort:
No issues with any EXE or mod.

FSOpen
3.7.0 with no mods: No issues
3.7.0 with 3.6.12 VPs: No issues
RC5 with no mods: No issues
RC5 with 3.6.12: No issues
RC5 with 2014 VPs: CTD at mission load or ship selection screen with any 3D option enabled (3D Shockwaves, 3D Models, 3D Weapons). This only occurs with a mission that contains a Sathanas.

If anyone else can duplicate this, that would be great. You must be using an NVidia video card and the latest drivers (none of this ever happened with my ATI brand card). I think jr2 is right - there may be a bug in the Sathanas model when using RC5 with the 2014 MediaVPs in conjunction with an NVidia-based card (especially a 700-series card, but others can verify that) that caused these crashes.

If anyone else can test this on their similarly equipped rigs, please do. A consensus would help narrow down the issue.
Title: Re: And The Saga Continues
Post by: niffiwan on March 20, 2015, 03:13:24 am
Well, I can't repro the issue, but my setup isn't that similar:

Trunk r11276 DEBUG
GTS 450
Drivers: 331.113 (Linux Mint 17 default)
All launcher options with "3D" in the description enabled
Mission: Bear Baiting
Title: Re: And The Saga Continues
Post by: jr2 on March 20, 2015, 06:46:24 am
AV8R, you could try grabbing Linux Mint and installing (you can dual-boot, either re-size your Windows partition, or install it to a file in NTFS (yes, it can do that).

Right now I'm quad-booting 10, 7, XP, and Mint 13 and going to install a couple other Linux distros as well, so if you need help, let me know.

I'm just wondering if this occurs with your hardware under Linux (although that might be driver related, as Linux of course doesn't use Windows drivers.)


Wait... the Sathy model... you can take the 3.6.12 file for the Sathy, and extract it to the appropriate path in 3.6.14

e.g. {MVPs3614}\data\models

This would override the one included in the 3.6.14 MVPs -- if it still crashed, perhaps a texture that gets used?  Although, maybe the 3.6.12 version doesn't use the same textures.  :sigh:
Title: Re: And The Saga Continues
Post by: AV8R on March 20, 2015, 09:57:43 am
I must be honest, I have zero experience with Linux so although I'm willing to try, the learning curve might be a bit wide for this exercise.

Now, extracting the 3.6.12 Sathy model and using it in the 2014 setup may be worth a look. Maybe someone can post the 3.6.12 model here, unless the model is way too big for that?. Or is there a repository somewhere from which the model can be downloaded? If not, can someone walk me through extracting the model from its VP? (I've never done it before)

Keep in mind also that, other than some FPS performance issues, I NEVER had these issues with my ATI card - only after I got the NVidia card.

Could be driver related, could also be hardware related - but I hope not.  :nervous:
Title: Re: And The Saga Continues
Post by: AV8R on March 20, 2015, 10:02:56 am
Well, I can't repro the issue, but my setup isn't that similar:

Trunk r11276 DEBUG
GTS 450
Drivers: 331.113 (Linux Mint 17 default)
All launcher options with "3D" in the description enabled
Mission: Bear Baiting

Maybe this only affects Maxwell-based or 700-series NVidia cards? I dunno. Thanks for trying, though.

The crashes are really bad with my FREDed mission. You wanna try that? It may still be posted in my Frame Rate Drop thread.
Title: Re: And The Saga Continues
Post by: jr2 on March 20, 2015, 11:26:46 am
It appears Sathy is supercap2s-01.pof in sparky_fs2.vp, and is not present in mediavps3612.  So.. 3.6.12 MVPs uses the retail Sathy?  3.6.12 models are in MV_Assets.3612.vp

I'm using VPGUI (http://www.hard-light.net/forums/index.php?topic=83920.0) (requires .Net Framework 4.5), you can also use Maja Express (http://www.hard-light.net/wiki/index.php/Maja#Links) (requires Java).

To view all the models, tables, etc, install Model View (http://www.hard-light.net/wiki/index.php/ModelView), jTBLEdit (http://www.freespacemods.net/download.php?view.679), eh.. you'll need the Descent Manager DLL pack from DMTools (http://www.freespacemods.net/download.php?view.109) (run dp2003.exe) for Model View, I believe (model view I linked is newer than the one included in DMTools so use that, not the included one).  You could also use the table viewer in DMTools instead of jTBLEdit.  There are also ANI View, and pilot view, I think.


You should only need VP viewer, model viewer, maybe table viewer (to see what textures etc are used with MVPs 2014 for troubleshooting)

Keep in mind that the ships table file (.tbl) for FreeSpace is most likely modded with a .tbm in MVPs 3.6.12 / 3.6.14 (so that the table can be modified, instead of being overridden for minor edits).

You can easily open table files in Notepad without using a table viewer, but it might be a bit easier to read in a viewer (as it is probably sorted into columns for you)  HOWEVER I'm not sure if jTBLView or TableView32 {from DMTools} supports tbm files; you might have to use notepad for those.


Someone who has modded FS recently should be able to help you sort these out; but you can start playing with it using the information I gave above.  Oh, and read skim through this:

http://www.hard-light.net/wiki/index.php/FS2_Data_Structure

EDIT: Oh, and how FS2 handles hierarchy:

Say you are running a mod (fscoolmod36) which depended on 3.6.14 MVPs:

fscoolmod36\data\models\fancymodel6.pof would override fscoolmod36\models.vp/data/models/fancymodel6.pof

If there was a fancymodel6 in MVPs 3.6.14, whether a file or in the 3.6.14 vps, fscoolmod36's version would be used instead, as fscoolmod36 is selected as a mod

And, of course, any retail fancymodel6 would not be used, file \data\models\fancymodel6.pof or .vp/data/models/fancymodel6.pof

Basically, this allows mods to be distributed without distributing any assets from the mods they are based on, unless the assets are modified, and, it allows users to extract the assets, modify them, and place them into the directory for testing, without changing the .vp file (which would make diagnosing errors more difficult as you wouldn't know if the distributed .vp had been altered -- modifying .VP files is highly discouraged, unless you are making your own mod.  To change something, extract the files you want to change and leave them in the mod's \data\models or \data\tables etc).
Title: Re: And The Saga Continues
Post by: AV8R on March 20, 2015, 05:44:07 pm
Holy cow, jr2! All I wanted was a model and you schooled me in the entire course of "FreeSpace Modding 101".  lol  This is all a bit much to take in.  :eek:  But thanks for being so thorough.

Just so we're clear, all I want to do is test the previous Sathanas model's compatibility on my platform (the awful retail version causes no issues). To do that, all I want to do is extract the SuperCap2s-01.pof file from the MV_Assets.3612.vp file (as you specified). What is the bare minimum I have to install to do just that? Will the DMTools Dlls and VPViewer 2.0 be enough to extract that one file so I can put it in the models folder you specified and I can begin testing?
Title: Re: And The Saga Continues
Post by: AdmiralRalwood on March 20, 2015, 05:59:32 pm
It appears Sathy is supercap2s-01.pof in sparky_fs2.vp, and is not present in mediavps3612.  So.. 3.6.12 MVPs uses the retail Sathy?  3.6.12 models are in MV_Assets.3612.vp
Close; MV_Assets.3612.vp is a patch file that overrides MV_Assets.vp. The 3.6.12 MediaVPs' MV_Assets.vp does, in fact, contain a SuperCap2S-01.pof file.
Title: Re: And The Saga Continues
Post by: AV8R on March 20, 2015, 07:02:21 pm
Wait, how many official versions of the Sathanas were released since retail? Is the 3.6.12 version different than retail (from what I saw when I played it they looked similarly lame). Maybe I really wasn't playing with the true 3.6.12 model during my testing? What happened?
Title: Re: And The Saga Continues
Post by: jr2 on March 21, 2015, 10:39:35 am
Hmm.  Unsure.  Perhaps extract both models (retail and 3.6.12) and view them with model view?  Hmm, but then you wouldn't see the textures I think... blah, it's been years and years since I did any of this (extracting from vps and loading in model view).  ModelView might be able to pull the textures from your FS2 install to view the model, but even if it did, they would be retail, as Model View is retail era...


Someone who is up to date on all this has to clarify.  :nervous:
Title: Re: And The Saga Continues
Post by: AV8R on August 14, 2015, 09:26:02 pm
Delete/rename MV_Advanced.vp and see if it still crashes.

Sorry. I didn't want to necro an old thread but it seems like the Admiral's suggestion was the only thing that has kept my system stable playing FSO since the rebuild of my PC after the replacement of my motherboard and video card. It all seems strange as my system had always had enough resources to play Freespace with all options enabled (even with a 32-bit OS, a 512MB vid card and 2GB of RAM). But now, after the upgrade with the same OS, RAM and a better video card (NVidia GeForce 750 Ti w/ 1GB RAM) I simply cannot play without Malloc errors if too many options are turned on in the launcher.

I did narrow the CTD issues down to the 3D settings in the launcher and the Sathanas being part of a mission being loaded. But, as the Admiral suggested, renaming the MV_Advanced.vp file was the key. Trying to load the 1.8GB 2014 MV_Advanced proved to be too much for my system configured as it was. Missions with a Sathanas took up too much memory space and crashed my system when trying to load them, especially with 3D options enabled. Why this happened on a PC with more resources available is beyond me - but at least I have a reliable system/game now.

Anyway, thanks AdmiralRalwood for giving me back a stable Freespace experience. I can live without the MV_Advanced.vp for now since it doesn't seem to affect the quality of gameplay. Maybe if I upgrade my RAM or switch to a 64-bit OS I may try the using the Advanced file again.