In my project using MobileVLCKit 3.0.0 for playing media.
All types of videos successfully playing on iOS9&10 but on iOS 11 video audio able to listen but the picture doesn't display and shows the black screen.
Gives below logs:
2017-09-18 18:26:17.640065+0800 DemoPlayer[39923:369260] creating player instance using shared library
=================================================================
Main Thread Checker: UI API called on a background thread: -[UIView bounds]
PID: 39923, TID: 369593, Thread name: (none), Queue name: com.apple.root.default-qos.overcommit, QoS: 21
Backtrace:
4 DemoPlayer 0x0000000108349895 Open + 405
2017-09-18 18:26:23.490963+0800 DemoPlayer[39923:369593] [reports] Main Thread Checker: UI API called on a background thread: -[UIView bounds]
PID: 39923, TID: 369593, Thread name: (none), Queue name: com.apple.root.default-qos.overcommit, QoS: 21
Backtrace:
4 DemoPlayer 0x0000000108349895 Open + 405
=================================================================
Main Thread Checker: UI API called on a background thread: -[UIView initWithFrame:]
PID: 39923, TID: 369593, Thread name: (none), Queue name: com.apple.root.default-qos.overcommit, QoS: 21
Backtrace:
4 DemoPlayer 0x0000000108349f3b -[VLCOpenGLES2VideoView initWithFrame:zeroCopy:voutDisplay:] + 91
2017-09-18 18:26:23.875359+0800 DemoPlayer[39923:369593] [reports] Main Thread Checker: UI API called on a background thread: -[UIView initWithFrame:]
PID: 39923, TID: 369593, Thread name: (none), Queue name: com.apple.root.default-qos.overcommit, QoS: 21
Backtrace:
4 DemoPlayer 0x0000000108349f3b -[VLCOpenGLES2VideoView initWithFrame:zeroCopy:voutDisplay:] + 91
2017-09-18 18:26:23.959355+0800 DemoPlayer[39923:369593] CoreAnimation: [EAGLContext renderbufferStorage:fromDrawable:] was called from a non-main thread in an implicit transaction! Note that this may be unsafe without an explicit CATransaction or a call to [CATransaction flush].
shader program 1: WARNING: Output of vertex shader 'TexCoord1' not read by fragment shader
WARNING: Output of vertex shader 'TexCoord2' not read by fragment shader
thanks in advance.
Finally, got the solution...
Now 'MobileVLCKit-Unstable' version updated into master on Sep 20 with UIKit from a background thread(iOS 11 Video play) issue.
Solution1:
Add pod 'MobileVLCKit-unstable', '3.0.0a38' to podfile and run pod install
Solution 2:
Cloned the repo from the following URL: http://code.videolan.org/videolan/VLCKit.git
Open terminal, navigate to root directory and execute ./buildMobileVLCKit.sh -f (Note: It may take 1-2 hours to complete)
On successful completion, the MobileVLCKit.framework will be generated in VLCKit/build/ folder location.
Simply drag it to your project.
You need to update MobileVLCKit to the pod 'MobileVLCKit-unstable' in version '3.0.0a38' or later. This problem was resolved. There is no way to make older releases of the library work in any way as it calls to UIKit from a background thread.
Related
I have a Nativescript-Angular mobile app. It works on simulator well. But once it's published to Apple store, it works on older model like iphone 7, but not on iphone 10/11/12. The ios version are all 14+ so I don't think that's the cause.
I pulled the crash report from my phone, it just has some error messages like these. Could anyone give me some ideas or point me in the right direction of how to research on this?
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x000000000280b350
VM Region Info: 0x280b350 is not in any region. Bytes before following region: 4324461744
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
UNUSED SPACE AT START
--->
__TEXT 10442c000-104430000 [ 16K] r-x/r-x SM=COW ...e.app/LBELite
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [508]
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x000000019ffbc658 0x19ffb7000 + 22104
1 libobjc.A.dylib 0x000000019ffbcf88 0x19ffb7000 + 24456
2 NativeScript 0x0000000104da4930 0x104d30000 + 477488
...
Thread 1 name: JavaScriptCore bmalloc scavenger
Thread 1:
0 libsystem_kernel.dylib 0x00000001b8ef41ac 0x1b8ecc000 + 164268
...
Thread 2:
0 libsystem_pthread.dylib 0x00000001d6a58764 0x1d6a4e000 + 42852
...
Thread 3 name: Heap Helper Thread
Thread 3:
0 libsystem_kernel.dylib 0x00000001b8ef41ac 0x1b8ecc000 + 164268
...
Thread 4 name: Heap Helper Thread
Thread 4:
0 libsystem_kernel.dylib 0x00000001b8ef41ac 0x1b8ecc000 + 164268
...
Thread 5 name: Heap Helper Thread
Thread 5:
0 libsystem_kernel.dylib 0x00000001b8ef41ac 0x1b8ecc000 + 164268
...
Thread 6 name: Heap Helper Thread
Thread 6:
0 libsystem_kernel.dylib 0x00000001b8ef41ac 0x1b8ecc000 + 164268
...
Thread 7 name: Heap Helper Thread
Thread 7:
0 libsystem_kernel.dylib 0x00000001b8ef41ac 0x1b8ecc000 + 164268
...
Thread 0 crashed with ARM Thread State (64-bit):
x0: 0x000000000280b348 x1: 0x0000000280b34b60 x2: 0x0000000000000000 x3: 0x0000000000000034
...
esr: 0x92000006 (Data Abort) byte read Translation fault
The runtime library you are using, NativeScript is supplying a much too low valued data pointer to the objective-C runtime. When this memory location, 0x000000000280b350, is accessed, the Kernel notices there is no Virtual Memory mapped for that address, giving a Data Abort. Your esr register has top bits binary 100100. The ARM manual says
Used for MMU faults generated by data accesses, alignment faults other than those caused by Stack Pointer misalignment, and synchronous External aborts, including synchronous parity or ECC errors. Not used for debug-related exceptions.
A common reason for low-valued data addresses is that there has been code that offsets a value from some other base value, and the thing the gets the base value returned nil, or gave you 0. Your bad value is kind of large for such a problem (normally you'd see a bad value like 0x230 or something).
The reason I think your code is breaking is that the underlying library must have an architecture-specific aspect of code to it. It is likely that the code supports Intel (assume you are using an Intel based Mac), and older ARM chips but not the newer chips. iPhone X is using the A11 Bionic chip.
Are there any other apps you have that use this technology stack but work on the latest hardware? Do you have an iPhone X, does that work locally? Is there any updated versions of your NativeScript support you can try?
There is a small chance that the foul-up is due to the App Store re-compiling your BitCode before sending it to the customer, and that has introduced a fault. Is BitCode enabled in your build archive?
What version of the IOS runtime are you using? I was having similar issues until I updated from 6.5.0 to 6.5.4.
I usually develop in higher level languages like Javascript and Python , so I am not that experienced when it comes to reading lower level stack traces. I am building an iOS app with React Native and my app sometimes unexpectedly crashes. Reading the crash log this is what I get:
Incident Identifier: B03D5F95-EFD1-4FEB-AE18-C8EFEF273E53
CrashReporter Key: 6049c1cc93a2e0163265631aa6cc2fd30a1af6e7
Hardware Model: iPhone7,2
Process: MyApp [24268]
Path: /private/var/containers/Bundle/Application/99B2B9A1-D266-4222-A083-84C4CFFCE182/MyApp.app/MyApp
Identifier: org.mycompany.MyApp
Version: 1 (1.0)
Code Type: ARM-64 (Native)
Role: Non UI
Parent Process: launchd [1]
Coalition: org.mycompany.MyApp [3119]
Date/Time: 2019-03-04 14:20:18.4924 +0800
Launch Time: 2019-03-04 14:09:15.2536 +0800
OS Version: iPhone OS 11.0.3 (15A432)
Baseband Version: 6.17.00
Report Version: 104
Exception Type: EXC_CRASH (SIGKILL)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace <0xF>, Code 0x8badf00d
Triggered by Thread: 0
Filtered syslog:
None found
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x0000000180a60bc4 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x0000000180a60a3c mach_msg + 72
2 BackBoardServices 0x00000001835d0de0 _BKSHIDGetCurrentDisplayBrightness + 112
3 BackBoardServices 0x00000001835de9cc BKSDisplayBrightnessGetCurrent + 32
4 FrontBoardServices 0x00000001835fffc0 -[FBSUIApplicationSystemService currentBacklightLevel] + 12
5 UIKit 0x000000018a8a3d44 -[UIDevice _backlightLevel] + 44
6 UIKit 0x000000018a8aced4 -[UIScreen _postBrightnessDidChangeNotificationIfAppropriate] + 168
7 CoreFoundation 0x0000000180efa12c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 20
8 CoreFoundation 0x0000000180efa090 ___CFXRegistrationPost_block_invoke + 64
9 CoreFoundation 0x0000000180f1016c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 20
10 CoreFoundation 0x0000000180f0fa3c __CFRunLoopDoBlocks + 288
11 CoreFoundation 0x0000000180f0dca4 __CFRunLoopRun + 2436
12 CoreFoundation 0x0000000180e2e2d8 CFRunLoopRunSpecific + 436
13 GraphicsServices 0x0000000182cbff84 GSEventRunModal + 100
14 UIKit 0x000000018a3db880 UIApplicationMain + 208
15 MyApp 0x00000001005833d4 main + 29652 (main.m:14)
16 libdyld.dylib 0x000000018095256c start + 4
How/where do I begin reading thsi crash log? I believe it has something to do with mach_msg_trap but I haven't been able to find anything about it. For some context, my app is an app which tracks the users Geolocation with background geolocation tracking. I am unable to figure out what causes the crash.
See TN2141: Understanding and Analyzing Application Crash Reports, which says:
The exception code 0x8badf00d indicates that an application has been terminated by iOS because a watchdog timeout occurred. The application took too long to launch, terminate, or respond to system events. ... Whatever operation is on Thread 0 needs to be moved to a background thread, or processed differently, so that it does not block the main thread.
Are you doing anything that could be blocking the main thread for any prolonged period of time?
Have you add Privacy - Location in info.plist?
Something like that.
<key>NSLocationAlwaysUsageDescription</key>
<string>Why you need track location?</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>Why you need track location?</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Why you need track location?</string>
And I see you work with background geolocation tracking. Have you turn on Background Modes in Capabilities?
If not just add Privacy turn on Background Modes and try again.
This question already has answers here:
Getting a "This application is modifying the autolayout engine from a background thread" error?
(21 answers)
Closed 6 years ago.
I am almost done migrating an iOS app of mine to Swift 3.0.
But I still have a few cases similar to the one below.
Most of them I have been able to solve by putting the problematic code on the main thread.
In some other cases, I can't figure out, which part of my code is executing on the wrong thread. And I get a message like this one:
This application is modifying the autolayout engine from a background thread after the engine was accessed from the main thread. This can lead to engine corruption and weird crashes.
Stack:(
0 CoreFoundation 0x000000018765a1d8 <redacted> + 148
1 libobjc.A.dylib 0x000000018609455c objc_exception_throw + 56
2 CoreFoundation 0x000000018765a108 <redacted> + 0
3 Foundation 0x0000000188241ea4 <redacted> + 192
....................
16 libsystem_pthread.dylib 0x00000001866eece4 <redacted> + 200
17 libsystem_pthread.dylib 0x00000001866ee378 pthread_mutex_lock + 0
18 libsystem_pthread.dylib 0x00000001866edda4 start_wqthread + 4
)
Is there some special technic (option when using the debugger or ??) I can use to trace the path followed by the progran, to see where this is happening?
Obviously you are doing some UI update on back ground thread. Cant predict exactly where, without seeing your code.
These are some situations it might happen:-
you might be doing something on background thread and not using. Being in the same function this code is easier to spot.
DispatchQueue.main.async { // do UI update here }
calling a func doing web request call on background thread and its completion handler calling other func doing ui update.
to solve this try checking code where you have updated the UI after webrequest call.
// Do something on background thread
DispatchQueue.global(qos: .userInitiated).async {
// update UI on main thread
DispatchQueue.main.async {
// Updating whole table view
self.myTableview.reloadData()
}
}
I don't think there is any other inbuilt tool for debugging such crashes because it's the code which is modifying the AutoLayout UI elements/constraints from the code which is either running in Background thread or completion handlers. All completion handlers by default run in background thread. You need to use the GCD to update the UI elements from your completion handler blocks.
Currently I have an iOS app which I plan to release for beta testing. My problem is that the app will not run as after 2 seconds or so after the app has shown the GameScene.swift SKScene, it crashes and it keeps on repeating.
I have compiled the app via Xcode 7.3 in both Release and Debug configurations. I have analysed the project, cleaned it, uninstalled it, reinstalled it, restored my device etc. But nothing changes. This unexpected crash only happens when the app is run via TestFlight. I will attach below the log from the crashes. I have tried to symbolicate the crash but it just shows up the original log file.
Incident Identifier: 408B1212-4AE8-42E2-905F-D4567D5030AD
CrashReporter Key: 4c7013cab29b9011557c3005550950488452cc04
Hardware Model: xxx
Process: Number Tap [2226]
Path: /private/var/containers/Bundle/Application/69833BAF-AD19-4FAF-BB95-E766A493D525/Number Tap.app/Number Tap
Identifier: com.flatboxstudio.numbertap
Version: 2 (1.0.1)
Code Type: ARM-64 (Native)
Parent Process: launchd [1]
Date/Time: 2016-03-29 18:44:31.31 -0700
Launch Time: 2016-03-29 18:44:31.31 -0700
OS Version: iOS 9.3 (13E233)
Report Version: 105
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x0000000100046724
Triggered by Thread: 0
Filtered syslog:
None found
Breadcrumb Trail: (reverse chronological seconds)
0 GC Framework: startAuthenticationForExistingPrimaryPlayer
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 Number Tap 0x0000000100046724 0x10000c000 + 239396
1 libdispatch.dylib 0x000000018200d4bc 0x18200c000 + 5308
2 libdispatch.dylib 0x000000018200d47c 0x18200c000 + 5244
3 libdispatch.dylib 0x0000000182012b84 0x18200c000 + 27524
4 CoreFoundation 0x0000000182578dd8 0x182498000 + 921048
5 CoreFoundation 0x0000000182576c40 0x182498000 + 912448
6 CoreFoundation 0x00000001824a0d10 0x182498000 + 36112
7 GraphicsServices 0x0000000183d88088 0x183d7c000 + 49288
8 UIKit 0x000000018776df70 0x1876f0000 + 515952
9 Number Tap 0x0000000100046bdc 0x10000c000 + 240604
10 libdyld.dylib 0x000000018203e8b8 0x18203c000 + 10424
Activity ID: 0x0000000000043e33
Activity Name: starting resolver activity
Activity Image Path: /usr/lib/system/libsystem_network.dylib
Activity Image UUID: A1D92752-ABF1-3834-9EBB-FE35E00EB642
Activity Offset: 0x0003333c
Activity Running Time: 0.468516 sec
Trace Messages (reverse chronological seconds):
0.292098 GameCenterFoundation 0x000000019066a20c authenticateWithCompletionHandler:Username and Password passed in. GKDaemonProxy to authenticate player
0.296164 CFNetwork 0x0000000204da9da8 Format not found
0.300431 CFNetwork 0x0000000204da9da8 Format not found
0.301584 CFNetwork 0x0000000204da9da8 Format not found
0.301623 CFNetwork 0x0000000182c493a8 TCP Conn 0x146553ea0 started
0.305076 CFNetwork 0x0000000182ca3ce8 Creating default cookie storage with default identifier
0.305077 CFNetwork 0x0000000182ca3cb4 Faulting in CFHTTPCookieStorage singleton
0.305077 CFNetwork 0x0000000182cf5e44 Faulting in NSHTTPCookieStorage singleton
I removed some of the log as I felt it may be unimportant. I have read apples guide on resolving this but still not resolved.I will be truly grateful if anybody could help me out. If you need any extra code, logs or information don't hesitate to ask. (The whole log was quite long so I cropped some information out.)
I have already done some research on identifying crash logs but couldn't find solution:
Here are my references:
http://www.raywenderlich.com/23704/demystifying-ios-application-crash-logs
http://developer.apple.com/library/ios/#qa/qa1747/_index.html
How to view crash report on xcode 4.2
I do come to know that it is because of Memory Issue but how to find that particular? In my project there are 200 files also there are 4-5 third party libraries are being used.
Here is crash log:
Incident Identifier: BD0F0F41-C60A-4D9C-8386-1B10796CF835
CrashReporter Key: 43c75986a25cae4226726a78b4bf5b543ab87caa
Hardware Model: iPad3,3
Process: BLSOffline [10824]
Path: /var/mobile/Applications/54AAF195-FD1D-4426-BC20-939662ECC56B/BLSOffline.app/BLSOffline
Identifier: BLSOffline
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2013-07-12 15:24:05.680 +0530
OS Version: iOS 6.1.3 (10B329)
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000013
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x3aadd526 0x3aad8000 + 21798
1 BLSOffline 0x000dbb6a 0xc8000 + 80746
2 CoreFoundation 0x32c3f9c0 0x32b7a000 + 809408
3 CoreFoundation 0x32b96fe6 0x32b7a000 + 118758
4 Foundation 0x335530f0 0x334a2000 + 725232
5 CoreFoundation 0x32c11680 0x32b7a000 + 620160
6 CoreFoundation 0x32c10f7a 0x32b7a000 + 618362
7 CoreFoundation 0x32c0fcb2 0x32b7a000 + 613554
8 CoreFoundation 0x32b82eb8 0x32b7a000 + 36536
9 CoreFoundation 0x32b82d44 0x32b7a000 + 36164
10 GraphicsServices 0x367372e6 0x36732000 + 21222
11 UIKit 0x34a982fc 0x34a41000 + 357116
12 BLSOffline 0x000db5fe 0xc8000 + 79358
13 libdyld.dylib 0x3af17b1c 0x3af16000 + 6940
Thread 1 name: Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0 libsystem_kernel.dylib 0x3afce648 0x3afcd000 + 5704
1 libdispatch.dylib 0x3aefe974 0x3aef6000 + 35188
2 libdispatch.dylib 0x3aefe654 0x3aef6000 + 34388
Thread 2 name: WebThread
Thread 3 name: JavaScriptCore::BlockFree
Thread 4 name: JavaScriptCore::Marking
Thread 5 name: com.apple.NSURLConnectionLoader
Thread 6 name: WebCore: CFNetwork Loader
Thread 7 name: WebCore: LocalStorage
Thread 8 name: com.apple.CFSocket.private
Thread 9 name: com.apple.coremedia.player.async
Thread 10 name: com.apple.coremedia.player.remote
Please let me know how to find cause out of this.
If my application is crashing at random point of times, still can it be possible to upload on AppStore? Will Apple allow such application?
Edit: The major problem is application is not crashing over simulator, it does only on devices. Also on device, when we debug the app, it crashes on curl library code, which is working fine since first day. Then how come sudden crash occurs in application?
If your application is crashing randomly then you need to analyze your code. That you can do in XCode only.Open your Project in XCode and in Product menu you will find the Analyze option (cmd+shift+B) .make sure you have selected "iOS Device" before analyzing it.
other than this you can use the this link:
http://www.raywenderlich.com/23037/how-to-use-instruments-in-xcode
apple will not accept your app if it is crashing.
No, Apple will probably get the crash too and reject your app (it's a risk).
About the crash, it's hard to say, you'll have to run the app from XCode and check there where the crash was.
If it's a memory issue, profile the app from XCode and you'll see there which component is crashing.