-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sub/osd rendering causes crashes after r38135 #10
Comments
The crash reproduced with |
I could reproduce your observations too. |
Meanwhile, i've posted this bug to |
I've got feeback from mplayer developers. Could anyone clarify this ? |
please try r38188+g6e1903938b |
Thanks everyone. In attempt to reduce factors, I found that the same crash can happen with Given that adding a few chars to the command line occasionally makes difference, just a wild guess: some more alignment failure on local stack/heap...? |
no unfotunately I need a debug build and gdb attached, did you managed to reproduce consistently with that command? |
Well, consistency... perhaps yes. Yes, consistent, but not reliable. I mean... Full command line: By changing only the last argument (note the number of last dots), crash/try: I bet it must also be dependent on cd/env/etc. and the crash pattern itself may not reproduce between machines. |
I've compiled mplayer r38188 with some patches from sherpya and create a gdb log file with option used by Fedyon |
can someone ping reimar? I'm not subscribed anymore |
I've informed him.
|
I'm not sure these issues are related. |
Also this happens only for 32-bit builds?
|
I aaply the patch. |
Sorry, here's an actually tested patch. |
No problem.
|
By the way: |
That patch just disables the SSE2 optimization on 32-bit Windows MPlayer.
|
I believe the crash point is: Line 262 in fee36a5
in particular the argument mmsrc, which is in turn Line 258 in fee36a5
Disasm on MPlayer-corei7-r38188+g6e1903938b gave this:
But I currently don't have proper development environment on this machine, and as such I looked up just by guess without gdb/symtbl, I might got wrong in the way... |
Result of guess-stack-rewinding.
That problematic
... and so now I'm very confused. If I read correctly those buffers are only allocated via Line 161 in fee36a5
and there memalign is supposed to provide align, am I right?????? What's happening???????
|
Wait, something is wrong. I think I found the compiled
edit: what is this Line 4011 in fee36a5
|
internal aligned malloc functions are implemented using malloc (with a trick) but it works |
@sherpya I'm afraid it looks like the trick is not here, for whatever reason. Line 150 in fee36a5
I see the align size value (=16) only in Line 155 in fee36a5
*_buffer align.
edit: after some failures I managed to see breakpoint on 00522777 caught storing |
The fallback in case of MPlayer's memalign use is actually plain malloc, so it does not actually work if the libc does not provide properly aligned memory. |
I make a clean svn checkout from current release (r38191) and compile it. If i compile r38190 (before the SSE2 optimization on 32-bit Windows MPlayer was disabled) and use the above patch in some cases mplayer crashes. |
I just realized that I overlooked this, it certainly can break MPlayer/libmpcodecs/vf_expand.c Line 130 in fee36a5
but I'm not sure what this path is doing at the first place... (rewrote; dst didn't matter, we use unaligned stores) |
While that expand code looks problematic, it should only trigger when you actually add borders with the expand filters, which none of the crashing example commands mentioned do... |
Ah I see, so adding side borders is breaking them all. Thanks for the explanation. With MPlayer-corei7-r38188+g6e1903938b, I simulated the fix by setting breakpoints on 00522777 and 00522784 to make them retry malloc until it get an aligned memory (just by chance). I confirm the trick makes all the reproducers not to crash, and by disabling breakpoints they crash again. So I believe it is solving a large part of problems, at least. (I'm severely running out of local disk space on the machine and can't have the build environment extracted. Yuck.) |
I'm a bit unsure about the status, if there are still issues or not (when re-enabling the optimization).
Needs to be refined a bit more before merging though |
From my point of view i could not reproduce crashes with mplayer r38192 anymore.
|
After all, it's free to continue using MMX in 32bit builds. Given the performance gain between MMX and SSE2 being pretty marginal (especially in nowadays normal playback scenario), I feel okay-ish to mark this closed at the current status as-is. At the same time I'm not particularly opposing to re-enable SSE2; it should work fine either way now. |
Reproducer:
mplayer -noconfig all -nofontconfig -font mplayer\subfont.ttf -osdlevel 3 sample.avi
-osdlevel 0
), it doesn't crash.-vo direct3d
seems much less likely to crash.Last-known-good:
Anything since r38152 (including) seems broken:
Systems:
Suspects:
The text was updated successfully, but these errors were encountered: