Wait, I thought you were running the packaged executable with memory profiling enabled. You should leave bUseMallocProfiler set to false (and rebuild the engine, etc.) to use the editor. Set bUseMallocProfiler to true when compiling the package executable for your game (are you using ‘Development’ and ‘Win64’?). Once you have your game executable built, turn bUseMallocProfiler back off, fully rebuild the engine, then package your game (with the executable using the memory profiler). When you run the packaged executable, it should create the .mprof file.
Wait, I thought you were running the packaged executable with memory profiling enabled. You should leave bUseMallocProfiler set to false (and rebuild the engine, etc.) to use the editor. Set bUseMallocProfiler to true when compiling the package executable for your game (are you using ‘Development’ and ‘Win64’?). Once you have your game executable built, turn bUseMallocProfiler back off, fully rebuild the engine, then package your game (with the executable using the memory profiler). When you run the packaged executable, it should create the .mprof file.
Maybe you should just run the game uncooked with the memory profiler enabled?
Are you rebuilding the entire engine? Try changing the ‘bUseMallocProfiler’ in TargetRules.cs from ‘false’ to ‘true’ and then rebuild the entire engine.
Yes, setting bUseMallocProfiler in my Target.cs has the same result in a source build. That part is definitely fine - it’s compiling in the malloc profiler. Otherwise it wouldn’t get to crashing either.
Yes, I use the malloc profiler frequently. Setting ‘bUseMallocProfiler’ true in your module’s Target.cs files does not enable this engine-wide. This needs to be turned on in TargetRules.cs and the entire engine (and your project) needs to be fully rebuilt.
I’ll try that now. I’m trying to use it on a packaged build though (development config), are you sure the Target.cs does not apply to the everything then? There is only one per target, it’s not specific to modules.
Yes. Your module’s Target.cs doesn’t apply to everything else. The UnrealBuildTool’s TargetRules.cs does apply to everything built by UBT (including the enigne, any modules, and game projects).
Hm, still not working. The editor manages to start, but it crashes again when starting PIE or attempting to cook, so I can’t actually test whether this changed anything for the packaged build.
Building a packaged exe and launching it in the binaries folder still dies immediately instead of printing the usual “you need cooked content” message, so that didn’t change anything here
By the way, modifying TargetRules.cs or my packaged target.cs file results in the exact same binary except for the compiled in compile time. So that method is definitely working.