Opened 18 months ago

Closed 8 months ago

#8679 closed defect (needs_more_info)

av_vlog crash in master

Reported by: juha-h Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords: android
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

In couple of days old master, libavutils/log.c av_vlog() function sometimes crashes on line:

482 if (avc && avc->version >= (50 << 16 | 15 << 8 | 2) &&

I'm using ffmpeg libs in my Android app and get this kind of dump:

Crash dump:
Build fingerprint: 'Nokia/Panther_00EEA/PAN_sprout:10/QKQ1.191008.001/00EEA_2_29A:user/release-keys'
#00 0x00000000006e1520 /data/app/com.tutpro.baresip-7tUYUB8SYm2ibmzMXtH8tA==/base.apk!libbaresip.so (offset 0xaff000) (av_vlog+28) (BuildId: c5ea1a8fdb8e033894719e1ee60c2a47f415eaae)

av_vlog
/usr/src/libbaresip-android/ffmpeg/libavutil/log.c:428:21

I don't know how to produce backtrace. I don't get the crash if I comment out the if statement.

Change History (6)

comment:1 by juha-h, 18 months ago

I suspect that the crash comes from this statement:

./libavdevice/android_camera.c: av_log(context, AV_LOG_INFO, "Android camera capture session was closed.\n");

When the crash happens that message is not printed when it is expected to show up.

The crash does not happen every time the message is printed.

comment:2 by juha-h, 18 months ago

When the message is printed without crash it looks like this:

[android_camera @ 0x7823e21200] Android camera capture session was closed.

Perhaps there is something wrong with the context argument of av_log() call? Since the crash is related to closing of the session, could it be that the context does not exist anymore?

Last edited 18 months ago by juha-h (previous) (diff)

comment:3 by juha-h, 18 months ago

Keywords: android added

When I commented out the av_log line:

static void capture_session_closed(void *context, ACameraCaptureSession *session)
{
//   av_log(context, AV_LOG_INFO, "Android camera capture session was closed.\n");
}

I was not able to reproduce the crash even when I tried more that 20 times.

Last edited 18 months ago by juha-h (previous) (diff)

comment:4 by Carl Eugen Hoyos, 17 months ago

Please use the crashdump to provide backtrace, disassembly and register dump.

comment:5 by James, 17 months ago

What's the context argument in this call? It needs to be a struct where the very first field is a valid AVClass pointer. You're probably passing it the wrong thing.

comment:6 by Elon Musk, 8 months ago

Resolution: needs_more_info
Status: newclosed
Note: See TracTickets for help on using tickets.