15

I have developed a iOS keyboard and i am getting some wired error in my crash logs i have search in every where but i didn't find any solution. This is the error i am getting in my error console.

PlugInKit: -[PKService run] + 752

enter image description here

Here is screenshot of the error. can anyone tell me how can i solved this error. error log

#0  (null) in mach_msg_trap ()

#1  (null) in mach_msg ()

#2  (null) in __CFRunLoopServiceMachPort ()

#3  (null) in __CFRunLoopRun ()

#4  (null) in CFRunLoopRunSpecific ()

#5  (null) in GSEventRunModal ()

#6  (null) in UIApplicationMain ()

#7  (null) in _xpc_objc_main ()

#8  (null) in xpc_main ()

#9  (null) in -[NSXPCListener resume] ()

#10 (null) in -[PKService run] ()

#11 (null) in +[PKService main] ()

#12 (null) in +[PKService _defaultRun:arguments:] ()

#13 (null) in NSExtensionMain ()

#14 (null) in start ()
rmaddy
  • 314,917
  • 42
  • 532
  • 579
Kamal Upasena
  • 1,329
  • 4
  • 13
  • 38

2 Answers2

3

Looks like a problem with the memory. From the documentation

Memory limits for running app extensions are significantly lower than the memory limits imposed on a foreground app. On both platforms, the system may aggressively terminate extensions because users want to return to their main goal in the host app. Some extensions may have lower memory limits than others: For example, widgets must be especially efficient because users are likely to have several widgets open at the same time.

Are you building an extension keyboard? Are you loading images there?

If you are loading images make sure to use lower resolution and check the color bitmap for each image (sometimes png uses 24bit). Try with jpeg images (you are gonna lose transparency but at least will work) so when you load them it won't take too much memory. For more info about PNG vs JPEG and memory concerns take a look at https://www.cocoanetics.com/2011/10/avoiding-image-decompression-sickness/

denis_lor
  • 6,212
  • 4
  • 31
  • 55
  • why do you say it's a problem with memory? For me the issue is in my keyboard extension however I have very small images. – Nilsymbol Mar 13 '19 at 12:55
  • 2
    Images can be small in size when you have them as they are compressed. But when GPUs render image they decompress images to their original size, which can take a lot of memory. – denis_lor Mar 13 '19 at 13:01
  • Take a look here for the memory consumption of PNG images when you think they are small: https://stackoverflow.com/questions/4610329/iphone-loading-png-to-uiimage-takes-up-more-memory-than-png-binary-size – denis_lor Mar 13 '19 at 13:07
  • Take a look at this as well: https://stackoverflow.com/a/13307529/3564632 where it says "from a performance standpoint from fastest to slowest it would go low quality JPG, high quality JPG, PNG Crushed, PNG" – denis_lor Mar 13 '19 at 13:10
  • And also at this article: https://www.cocoanetics.com/2011/10/avoiding-image-decompression-sickness/ – denis_lor Mar 13 '19 at 13:11
  • In my case i dont have any images – Kamal Upasena Mar 18 '19 at 04:50
1

Open up the actual crash log file (right click / show in finder from Xcode) and post it here. It contains a lot more info such as exception type, notes and so on that will help you diagnose.

Read up a bit here to give you an idea of what you’ll find in the crash log and how to use it.

https://developer.apple.com/library/archive/technotes/tn2151/_index.html

(Just realized how old this post is, oh well :))

Alex
  • 712
  • 1
  • 5
  • 11