Crash in vout_display_PlacePicture

This forum is about all development around libVLC.
Hanley
Blank Cone
Blank Cone
Posts: 22
Joined: 30 May 2013 04:56

Crash in vout_display_PlacePicture

Postby Hanley » 06 Jan 2023 17:21

I've implemented libvlc in my Mac app and am encountering a very annoying bug that only affects some of my users some of the time, and I can't recreate it on my end. Basically, when they load a video and hit play, the app crashes.

The only breadcrumb I have to go on is that their crash reports all point to the same line in libvlccore as the cause: vout_display_PlacePicture + 288

But even this is limited as it's an isolated line in the crash report with no preceding lines in the stack trace. With this admittedly small amount of knowledge, do you have any theories or suggestions as to what I could be doing wrong that might cause a crash at this line only some of the time?

wbtcpip
Blank Cone
Blank Cone
Posts: 14
Joined: 13 May 2021 16:21

Re: Crash in vout_display_PlacePicture

Postby wbtcpip » 06 Jan 2023 19:27

which version of libvlc?

Hanley
Blank Cone
Blank Cone
Posts: 22
Joined: 30 May 2013 04:56

Re: Crash in vout_display_PlacePicture

Postby Hanley » 06 Jan 2023 19:55

3.0.17

Rémi Denis-Courmont
Developer
Developer
Posts: 15266
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Crash in vout_display_PlacePicture

Postby Rémi Denis-Courmont » 08 Jan 2023 09:27

I'm not sure what you expect here with basically no info provided. As you could easily gather from looking at the source code, there are two ways that that function can crash: invalid pointers supplied, or division by zero due to invalid SAR.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Hanley
Blank Cone
Blank Cone
Posts: 22
Joined: 30 May 2013 04:56

Re: Crash in vout_display_PlacePicture

Postby Hanley » 09 Jan 2023 19:02

Yeah, sorry, I was being a bit lazy wasn't I. It's a floating point exception so yes, probably division by zero. Looking at the function it appears there could be a few culprits making the 0. The only one I'm not sure of is source->i_sar_den. The documentation on that variable offers no description. What does that variable represent?

Hanley
Blank Cone
Blank Cone
Posts: 22
Joined: 30 May 2013 04:56

Re: Crash in vout_display_PlacePicture

Postby Hanley » 09 Jan 2023 19:04

Actually, a better question for clarification: If it's an invalid SAR, does that simply mean I'm supplying it with a 0 aspect ratio?

Hanley
Blank Cone
Blank Cone
Posts: 22
Joined: 30 May 2013 04:56

Re: Crash in vout_display_PlacePicture

Postby Hanley » 09 Jan 2023 20:07

Also, is it possible your previous commit might prevent such a crash: https://github.com/videolan/vlc/commit/ ... 09426fc87e


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 7 guests