Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#13194 closed defect (fixed)

libgpg-error crash on iOS

Reported by: jbleyel Owned by: Felix Paul Kühne
Priority: high Milestone: iOS 2.6
Component: Build system: Contribs Version: master git
Severity: normal Keywords:
Cc: Difficulty: medium
Platform(s): iOS Work status: Not started

Description

I have an strange crash on iOS. This crash will only occurs when i close the app, not on runtime. (iOS 8.1.2 , 7.1.2) / iPad Mini 2, iPhone 5s, iPad 3

Thread 0 Crashed: 0 libsystem_kernel.dylib 0x393ebdfc pthread_kill + 8 1 libsystem_c.dylib 0x3938b909 abort + 76 2 VLC 0x0072005d _gpgrt_lock_lock (posix-lock.c:154) 3 VLC 0x00720067 -[VLCTime .cxx_destruct] + 3974922 4 ??? 0x7f000000 0x0 + 0 5 VLC 0x007200c3 do_deinit (estream.c:501)

Change History (12)

comment:1 Changed 3 years ago by jbleyel

i can reproduce the crash with the version 1.18 of libgpg-error.

Iphone 6 plus / iOS 8.1.3 / latest build from today with vlckit 2.2.0 / release build (!! not debug !!)

  1. Start the app
  2. Start any mpeg stream
  3. Close the app (complete close ) -> crash

You can see the crash only in organizer or with any crash reporter like quincy kit.

posix-lock.c line 154 gpgrt_lock_lock

posix-lock.c line 200 _gpgrt_lock_unlock

estream.c line 402 _gpgrt_fflush

estream.c line 488 do_deinit

comment:2 Changed 3 years ago by jbleyel

This patch can fix the problem. !!! NOT TESTED !!

diff --git a/contrib/src/gpg-error/rules.mak b/contrib/src/gpg-error/rules.mak
index acfcea8..95f2cdd 100644
--- a/contrib/src/gpg-error/rules.mak
+++ b/contrib/src/gpg-error/rules.mak
@@ -16,7 +16,10 @@ endif
 	$(MOVE)
 	cp $@/src/syscfg/lock-obj-pub.arm-unknown-linux-androideabi.h $@/src/syscfg/lock-obj-pub.linux-android.h
 ifdef HAVE_IOS
-	cp $@/src/syscfg/lock-obj-pub.arm-unknown-linux-androideabi.h $@/src/syscfg/lock-obj-pub.$(HOST).h
+    cp $@/src/syscfg/lock-obj-pub.arm-apple-darwin.h $@/src/syscfg/lock-obj-pub.$(HOST).h
+endif
+ifeq ($(ARCH),aarch64)
+    cp $@/src/syscfg/lock-obj-pub.aarch64-apple-darwin.h $@/src/syscfg/lock-obj-pub.$(HOST).h
 endif
 
 .gpg-error: libgpg-error

comment:3 Changed 3 years ago by jbleyel

Update:

the if

ifeq ($(ARCH),aarch64)

did not working

???

comment:4 Changed 3 years ago by jbleyel

Update: VLC for iOS 2.4.1 from the App Store has the issue too.

  1. start
  2. close the app (not in background)
  3. restart the app -> crash report

comment:5 Changed 3 years ago by Gleb Pinigin

Suppose that ARCH should be arm64, or you can rely on HAVE_ARMV7A

comment:6 Changed 3 years ago by Felix Paul Kühne

Component: Unknown → Build system: Contribs
Difficulty: unknown → medium
Milestone: Bugs paradize → iOS 2.6
Owner: set to Felix Paul Kühne
Priority: normal → high
Status: new → assigned

comment:7 Changed 3 years ago by Gleb Pinigin

This patch works for me on iOS device:

From 2f3fef8b5bad9b1d646e9bceba9d8e573d5b497b Mon Sep 17 00:00:00 2001
From: Gleb Pinigin <[email protected]>
Date: Wed, 18 Mar 2015 12:21:09 +0600
Subject: [PATCH] gpg-error: duplicate lock object data using by
 VLC build system (fixes #13194)

---
 contrib/src/gpg-error/rules.mak | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/contrib/src/gpg-error/rules.mak b/contrib/src/gpg-error/rules.mak
index acfcea8..7ce5519 100644
--- a/contrib/src/gpg-error/rules.mak
+++ b/contrib/src/gpg-error/rules.mak
@@ -16,7 +16,11 @@ endif
 	$(MOVE)
 	cp $@/src/syscfg/lock-obj-pub.arm-unknown-linux-androideabi.h $@/src/syscfg/lock-obj-pub.linux-android.h
 ifdef HAVE_IOS
-	cp $@/src/syscfg/lock-obj-pub.arm-unknown-linux-androideabi.h $@/src/syscfg/lock-obj-pub.$(HOST).h
+ifdef HAVE_ARMV7A
+	cp $@/src/syscfg/lock-obj-pub.arm-apple-darwin.h $@/src/syscfg/lock-obj-pub.$(HOST).h
+else
+	cp $@/src/syscfg/lock-obj-pub.aarch64-apple-darwin.h $@/src/syscfg/lock-obj-pub.$(HOST).h
+endif
 endif
 
 .gpg-error: libgpg-error
-- 
1.9.3 (Apple Git-50)

But there are no support for i386/x86_64 arch (simulator builds)

Hope it helps.

comment:8 Changed 3 years ago by Felix Paul Kühne

Thanks a lot for sharing! I'll see what I can do for the simulator :)

comment:9 Changed 3 years ago by Felix Paul Kühne

FYI, this is the only significant crash we see in the beta shared today. Btw. do you want to be added to our Testflight?

comment:10 in reply to:  8 Changed 3 years ago by jbleyel

Replying to fkuehne:

Thanks a lot for sharing! I'll see what I can do for the simulator :)

The simulator build don't have this issue. It's only arm related.

comment:11 Changed 3 years ago by Felix Paul Kühne

Resolution: → fixed
Status: assigned → closed

Gleb, thanks again for your patch. It is merged now and works great! :)

Fixed in 2.6b2.

comment:12 Changed 3 years ago by gpinigin@…

commit c417e384c905058d3d571d2277a30fe4955c984f Author: Gleb Pinigin <gpinigin@…> Date: Wed Mar 18 12:21:09 2015 +0600

contrib/gpg-error: fix crash in lock object on iOS (fixes #13194)

Signed-off-by: Felix Paul Kühne <fkuehne@…>

Note: See TracTickets for help on using tickets.