RudjiGames / MTuner

MTuner is a C/C++ memory profiler and memory leak finder for Windows, PlayStation 4 and 3, Android and other platforms
BSD 2-Clause "Simplified" License
2.63k stars 145 forks source link

Capture file was only partially loaded! #39

Closed marcelpetrick closed 6 years ago

marcelpetrick commented 6 years ago

I am using MTuner 4.0.9 (your build) on Win7, x64 against a bigger 32 bit-application. Got it configured and running, then after quitting the application-under-test, the profiled data is analysed and I get the following message-box:


Capture loaded partially!

Capture file was only partially loaded! Information may be missing from the profile!

OK

After confirmation MTuner crashes. After restarting MTuner and loading the stored profile, it crashes repeatedly. What can I use as workaround?

I've notice that profiling smaller apps works fine, but not with that which actually needs the profiling. Thank you very much for the tool and the great work! :)

marcelpetrick commented 6 years ago

As additional note: I've also tried to analyse the profiles (*.Mtuner) via command line, but this also results in a crash of MTuner. Doing the same workflow with something simple (like mspaint.exe) works without flaws.

The stacktrace of the crash only shows Qt-function-calls. Nothing specific to MTuner.

milostosic commented 6 years ago

Thanks for the report. "Capture loaded partially!" normally means that the process didn't exit cleanly so the capture file is incomplete. It's just a warning and MTuner is generally loading those captures just fine.

Command line or GUI - crash is likely during processing loaded data (guessing here).

Would it be possible to send me capture file to see if I can reproduce it locally?

marcelpetrick commented 6 years ago

Unfortunately not, because of the confidelity of the project. I've discussed this in our team and since approval from other instances would be necessary, no :/

Is there a way to provide you with more information what crashed inside MTuner without handing you over a profile-file? Add some verbose-flags to see what is happening. Run MTuner under debugger?

milostosic commented 6 years ago

Ok, understandable. I don't have other reports of similar crashes and problem is that even if I get a crash during some profiling I can't be sure it's the same one triggered by loading your capture file. Since I don't have a way to reproduce this there is only one option... build MTuner locally and run it through debugger. I'd be very keen to fix that crash if you identify where/why it happens.

In case you need any assistance with building MTuner, feel free to contact me.

chubinou commented 6 years ago

Hello, I think have similar issues, it occurs when trying to open x86_64 executable compiled with mingw64 with debug symbols, profiling the application with symbols striped don't causes the crash (but it's not so useful)

reopening MTrace cause crash as well. I have uploaded a sample at https://framadrop.org/r/RxQmKDahV7#aW/GN1toxfPSMHpxpmW3uaoJ/Q+XWS9l4MQCg34HFXw=

milostosic commented 6 years ago

Thank you for additional info! Unfortunately, I'm about to go on a business trip and won't have time to look into this for ~10 days. Sorry for inconvenience, will take a look as soon as possible.

marcelpetrick commented 6 years ago

Good evening, I will try to give this a shot as soon as I have some free time. Currently I relied only on your provided binaries. Will report back. As said: with "smaller" processes it works just fine and is also a very fancy-looking tool.

milostosic commented 6 years ago

Finally I had time to check this... turns out, in case of provided VLC capture, number of modules loaded by executable is very high (> 256). This caused a crash as I have a fixed size array for this. MTuner v4.1.0 is up with a fix for this. I'll close this for now, feel free to reopen in case you encounter crashes again.

marcelpetrick commented 6 years ago

@milostosic I tried yesterday to analzye the initially captured file with v4.1.0 and it showed the same message. MTuner did not crash. But after the progress bar at the bottom right of the window reached, nothing happened (I had confirmed the messagebox). Loading other dumps or using MTuner was not possible anymore, because it was in a "undefined" state (?).

I can try - if time allows - to profile today again with v.4.1.0 and then report. Did not build MTuner just like you suggested, yet.

Thank you for your advances and improvements.