[Xperia Z1 Compact Original Android Development] thorstenhirsch:
Hi optimumpro. I just switched to your ROM, so first of all: THANK YOU!

Most things work fine - well, I'd like to use Xposed, but I've seen that it doesn't work anymore since some months and you haven't figured out what's causing the problem. I don't need it that much, it's only nice-to-have for me. However there's one more problem that causes me much more pain: Gmail ist always crashing ("Unfortunately, Gmail has stopped"). I installed the full gapps package and the other apps work fine. Gapps starts (I can see all my mails), but right after 1 second it crashes. The crash is always reproducable. So I checked logcat and here are some findings... (I guess most of them are not related to the Gmail crash, but anyway...)

1.) Permission Denial (DownloadProvider)

E/AndroidRuntime(12620): FATAL EXCEPTION: IntentService[ModelDownloadProcessorService]
E/AndroidRuntime(12620): Process: com.google.android.googlequicksearchbox:search, PID: 12620
E/AndroidRuntime(12620): java.lang.SecurityException: Permission Denial: reading com.android.providers.downloads.DownloadProvider uri content://downloads/all_downloads/253 from pid=12620, uid=10025 requires android.permission.ACCESS_ALL_DOWNLOADS, or grantUriPermission()
E/AndroidRuntime(12620):	at android.os.Parcel.readException(Parcel.java:1546)
E/AndroidRuntime(12620):	at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:185)
E/AndroidRuntime(12620):	at android.database.DatabaseUtils.readExceptionWithFileNotFoundExceptionFromParcel(DatabaseUtils.java:148)
E/AndroidRuntime(12620):	at android.content.ContentProviderProxy.openTypedAssetFile(ContentProviderNative.java:691)
E/AndroidRuntime(12620):	at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1080)
E/AndroidRuntime(12620):	at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:921)
E/AndroidRuntime(12620):	at android.content.ContentResolver.openInputStream(ContentResolver.java:646)
E/AndroidRuntime(12620):	at com.google.android.apps.gsa.speech.microdetection.ModelDownloadProcessorService.onHandleIntent(SourceFile:1325)
E/AndroidRuntime(12620):	at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
E/AndroidRuntime(12620):	at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime(12620):	at android.os.Looper.loop(Looper.java:135)
E/AndroidRuntime(12620):	at android.os.HandlerThread.run(HandlerThread.java:61)

Occurs hundreds of times in logcat. Solution might be to add permissons in your AndroidManifest.xml, but that's just one of the first Google hits.

2.) IncallActivity has leaked IntentReceiver

E/ActivityThread( 6590): Activity com.android.incallui.InCallActivity has leaked IntentReceiver com.android.incallui.CallCardFragment$12@39ad8a16 that was originally registered here. Are you missing a call to unregisterReceiver()?
E/ActivityThread( 6590): android.app.IntentReceiverLeaked: Activity com.android.incallui.InCallActivity has leaked IntentReceiver com.android.incallui.CallCardFragment$12@39ad8a16 that was originally registered here. Are you missing a call to unregisterReceiver()?
E/ActivityThread( 6590):	at android.app.LoadedApk$ReceiverDispatcher.<init>(LoadedApk.java:903)
E/ActivityThread( 6590):	at android.app.LoadedApk.getReceiverDispatcher(LoadedApk.java:704)
E/ActivityThread( 6590):	at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1659)
E/ActivityThread( 6590):	at android.app.ContextImpl.registerReceiver(ContextImpl.java:1639)
E/ActivityThread( 6590):	at android.app.ContextImpl.registerReceiver(ContextImpl.java:1633)
E/ActivityThread( 6590):	at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:489)
E/ActivityThread( 6590):	at com.android.incallui.CallCardFragment.onCreate(CallCardFragment.java:202)
E/ActivityThread( 6590):	at android.app.Fragment.performCreate(Fragment.java:2031)
E/ActivityThread( 6590):	at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:863)
E/ActivityThread( 6590):	at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1045)
E/ActivityThread( 6590):	at android.app.FragmentManagerImpl.addFragment(FragmentManager.java:1147)
E/ActivityThread( 6590):	at android.app.FragmentManagerImpl.onCreateView(FragmentManager.java:2116)
E/ActivityThread( 6590):	at android.app.Activity.onCreateView(Activity.java:5372)
E/ActivityThread( 6590):	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:733)
E/ActivityThread( 6590):	at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
E/ActivityThread( 6590):	at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
E/ActivityThread( 6590):	at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
E/ActivityThread( 6590):	at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
E/ActivityThread( 6590):	at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:378)
E/ActivityThread( 6590):	at android.app.Activity.setContentView(Activity.java:2167)
E/ActivityThread( 6590):	at com.android.incallui.InCallActivity.onCreate(InCallActivity.java:169)
E/ActivityThread( 6590):	at android.app.Activity.performCreate(Activity.java:6034)
E/ActivityThread( 6590):	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
E/ActivityThread( 6590):	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2293)
E/ActivityThread( 6590):	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2402)
E/ActivityThread( 6590):	at android.app.ActivityThread.access$900(ActivityThread.java:151)
E/ActivityThread( 6590):	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1318)
E/ActivityThread( 6590):	at android.os.Handler.dispatchMessage(Handler.java:102)
E/ActivityThread( 6590):	at android.os.Looper.loop(Looper.java:135)
E/ActivityThread( 6590):	at android.app.ActivityThread.main(ActivityThread.java:5280)
E/ActivityThread( 6590):	at java.lang.reflect.Method.invoke(Native Method)
E/ActivityThread( 6590):	at java.lang.reflect.Method.invoke(Method.java:372)
E/ActivityThread( 6590):	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:906)
E/ActivityThread( 6590):	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:701)

Looks like a programming error in an app to me that might occur on incoming phone calls. But I had no problem with an incoming phone call, everything worked fine. I guess we can ignore this problem.

3.) com.google.android.gms.ui has died due to locking problem

I/ActivityManager( 845): Process com.google.android.gms.ui (pid 8786) has died
D/ActivityManager( 845): cleanUpApplicationRecord -- 8786
I/ActivityManager( 845): START u0 {flg=0x1000000 cmp=com.stackexchange.marvin/.ui.BaseActivity} from uid 10088 on display 0
V/WindowManager( 845): addAppToken: AppWindowToken{1cc5318 token=Token{1eb376fb ActivityRecord{2ce1008a u0 com.stackexchange.marvin/.ui.BaseActivity t195}}} to stack=1 task=195 at 1
V/WindowManager( 845): Adding window Window{288e6d30 u0 com.stackexchange.marvin/com.stackexchange.marvin.ui.BaseActivity} at 22 of 30 (after Window{27ae0bcc u0 com.stackexchange.marvin/com.stackexchange.marvin.ui.LoadDataActivity})
I/ActivityManager( 845): Process com.google.android.gm (pid 9061) has died
D/ActivityManager( 845): cleanUpApplicationRecord -- 9061
W/ActivityManager( 845): Scheduling restart of crashed service com.google.android.gm/.provider.MailSyncAdapterService in 1000ms
W/ProcessCpuTracker( 845): Skipping unknown process pid 9055
W/ProcessCpuTracker( 845): Skipping unknown process pid 9056
W/ProcessCpuTracker( 845): Skipping unknown process pid 9058
W/ProcessCpuTracker( 845): Skipping unknown process pid 9095
W/ProcessCpuTracker( 845): Skipping unknown process pid 9186
--------- beginning of main
E/QCOM PowerHAL( 845): Failed to acquire lock.
D/HybiParser( 8703): Creating frame for: 0:: op: 1 err: -1
D/WebSocketClient( 8703): WebSocket EOF!
D/WebSocketClient( 8703): java.io.EOFException
D/WebSocketClient( 8703):	at java.io.DataInputStream.readByte(DataInputStream.java:77)
D/WebSocketClient( 8703):	at com.codebutler.android_websockets.HybiParser.start(HybiParser.java:112)
D/WebSocketClient( 8703):	at com.codebutler.android_websockets.WebSocketClient$1.run(WebSocketClient.java:134)
D/WebSocketClient( 8703):	at java.lang.Thread.run(Thread.java:818)
I/ActivityManager( 845): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10200000 cmp=com.google.android.googlequicksearchbox/com.google.android.launcher.GEL} from uid 1000 on display 0
E/QCOM PowerHAL( 845): Failed to acquire lock.
I/GEL ( 2539): handleIntent(Intent { act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10200000 cmp=com.google.android.googlequicksearchbox/com.google.android.launcher.GEL })
E/QCOM PowerHAL( 845): Failed to acquire lock.
E/QCOM PowerHAL( 845): Failed to acquire lock.
E/QCOM PowerHAL( 845): Failed to acquire lock.
E/QCOM PowerHAL( 845): Failed to acquire lock.
E/QCOM PowerHAL( 845): Failed to acquire lock.
E/QCOM PowerHAL( 845): Failed to acquire lock.
I/ActivityManager( 845): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10200000 cmp=com.google.android.googlequicksearchbox/com.google.android.launcher.GEL} from uid 1000 on display 0
E/QCOM PowerHAL( 845): Failed to acquire lock.
I/GEL ( 2539): handleIntent(Intent { act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10200000 cmp=com.google.android.googlequicksearchbox/com.google.android.launcher.GEL })
E/QCOM PowerHAL( 845): Failed to acquire lock.
E/QCOM PowerHAL( 845): Failed to acquire lock.
E/QCOM PowerHAL( 845): Failed to acquire lock.
E/QCOM PowerHAL( 845): Failed to acquire lock.
E/QCOM PowerHAL( 845): Failed to acquire lock.
E/WindowManager( 845): Unknown window type: 2033
I/ActivityManager( 845): Killing 8703:com.stackexchange.marvin/u0a88 (adj 13): remove task
D/ActivityManager( 845): cleanUpApplicationRecord -- 8703
D/TaskPersister( 845): removeObsoleteFile: deleting file=195_task.xml
D/TaskPersister( 845): removeObsoleteFile: deleting file=195_task_thumbnail.png
W/InputMethodManagerService( 845): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@d8de731 attribute=null, token = android.os.BinderProxy@39ad0e3b

Looks like com.google.android.gms is called "Google Play Services" nowadays, so it's rather a problem in the background processes.

4.) airaudio network problems

E/alljoyn ( 4105): 902.516 ****** ERROR NETWORK IpNameServiceImpl ...mon/os/posix/Socket.cc:579 | 0x0004
E/alljoyn ( 4105): 902.516 ****** ERROR IPNS IpNameServiceImpl .../IpNameServiceImpl.cc:3705 | 0x0004
E/alljoyn ( 4105): 902.519 ****** ERROR NETWORK IpNameServiceImpl ...mon/os/posix/Socket.cc:579 | 0x0004
E/alljoyn ( 4105): 902.519 ****** ERROR IPNS IpNameServiceImpl .../IpNameServiceImpl.cc:3705 | 0x0004
E/alljoyn ( 4105): 902.520 ****** ERROR NETWORK IpNameServiceImpl ...mon/os/posix/Socket.cc:579 | 0x0004
E/alljoyn ( 4105): 902.520 ****** ERROR IPNS IpNameServiceImpl .../IpNameServiceImpl.cc:3705 | 0x0004

Looks pretty strange. There are hundreds of lines like these in logcat. But airaudio seems to work fine (it's an app to for audio network streaming via airplay protocol).

5.) Font problems (maybe in Chrome)

E/Minikin (10679): addFont failed to create font /system/fonts/NanumGothic.ttf
E/Minikin (10679): addFont failed to create font /system/fonts/DroidSansFallback.ttf

Again: hundreds of lines like these. Should the fonts be there already? Should Chrome be able to write them to /system/fonts? I don't think so.

6.) Emoji lib missing

E/EmojiFactory_jni(10679): Failed to load libemoji.so: dlopen failed: library "libemoji.so" not found

Alright, this one has definetly the lowest severity. ;)

7.) thermanager/emmc

W/thermanager(10897): failed to attach resource "temp-emmc" [msm-adc], ignoring
W/thermanager(10897): failed to attach resource "temp-batt" [msm-adc], ignoring
E/thermanager(10897): failed to create configuration with sensor "temp-emmc"
E/thermanager(10897): failed to parse configuration sections
[...]
W/thermanager(11432): failed to attach resource "cpu2" [sysfs], ignoring
W/thermanager(11432): failed to attach resource "cpu3" [sysfs], ignoring
W/thermanager(11432): failed to attach resource "temp-emmc" [msm-adc], ignoring
W/thermanager(11432): failed to attach resource "temp-batt" [msm-adc], ignoring
E/thermanager(11432): failed to create configuration with sensor "temp-emmc"
E/thermanager(11432): failed to parse configuration sections

8.) Gmail (now it's getting interesting)

I/ActivityManager( 845): Start proc 12219:com.google.android.gm/u0a56 for activity com.google.android.gm/.ConversationListActivityGmail
E/asset (12241): setgid: Operation not permitted
W/EasBundling(12219): in EasBundling.init, isBundlingEnabled=true
I/UnifiedEmail(12219): getAccountsCursor
D/ActivityThread(12219): Loading provider com.google.android.gmail.provider;com.android.mail.notifier;com.google.android.gm.email.provider;com.google.android.gm.email.notifier: com.android.email.provider.EmailProvider
W/GAV2 (12219): Thread[main,5,main]: Need to call initialize() and be in fallback mode to start dispatch.
I/Gmail (12219): Recorded initial entry point: MAIL_ACTIVITY.
I/UnifiedEmail(12219): Initiated Service map for: [gPop3, gLegacyImap, gEas, gmail]
W/art (12219): Long monitor contention event with owner method=boolean libcore.io.Posix.access(java.lang.String, int) from Posix.java:4294967294 waiters=0 for 190ms
W/ActivityManager( 845): Unable to start service Intent { cmp=com.google.android.gm/com.android.email.service.AttachmentService } U=0: not found
D/TypefaceImpl(12219): makeFontCollection adding /system/fonts/Roboto-Regular.ttf
I/Gmail (12219): Observing account changes for notifications
E/Minikin (12219): addFont failed to create font /system/fonts/NanumGothic.ttf
E/Minikin (12219): addFont failed to create font /system/fonts/DroidSansFallback.ttf
W/ActionBarDrawerToggle(12219): DrawerToggle may not show up because NavigationIcon is not visible. You may need to call actionbar.setDisplayHomeAsUpEnabled(true);
E/Gmail (12219): FLF.setSelectedAccount(null) called! Destroying existing loader.
I/ActivityManager( 845): Start proc 12269:com.google.android.gms.feedback/u0a18 for service com.google.android.gms/.feedback.FeedbackService
W/Gmail (12219): email_address in bundle is empty
W/ResourcesManager(12219): Asset path '/system/framework/com.android.media.remotedisplay.jar' does not exist or contains no resources.
W/ResourcesManager(12219): Asset path '/system/framework/com.android.location.provider.jar' does not exist or contains no resources.
D/OpenGLRenderer(12219): Use EGL_SWAP_BEHAVIOR_PRESERVED: true
V/WindowManager( 845): Adding window Window{3bc66845 u0 com.google.android.gm/com.google.android.gm.ConversationListActivityGmail} at 28 of 36 (before Window{2d4d05a9 u0 Starting com.google.android.gm})
I/Exchange(12219): EasService.onCreate
W/ActivityManager( 845): Unable to start service Intent { cmp=com.google.android.gm.exchange/com.android.exchange.service.EasService } U=0: not found
I/Exchange(12219): EasService.onCreate stoppedOldService=false
I/Exchange(12219): needResyncCalendar: false, hasCalendarPermission: true, needResyncContacts: false, hasContactsPermission: true
I/Exchange(12219): RestartPingTask
E/EmojiFactory_jni(12219): Failed to load libemoji.so: dlopen failed: library "libemoji.so" not found
E/asset (12289): setgid: Operation not permitted
[...]
E/patchoat(12311): Failed to open output oat file /data/dalvik-cache/arm/data@data@com.google.android.gms@app_chimera@m@00000001@DynamiteModulesA_GmsCore_prodlmp_xhdpi_release.apk@classes.dex: Permission denied(13)
E/patchoat(12311): Failed to open input/output oat files
W/art (12269): Patching of oat file '/data/data/com.google.android.gms/app_chimera/m/00000001/arm/DynamiteModulesA_GmsCore_prodlmp_xhdpi_release.odex' failed. Attempting to use oat file for interpretation. patchoat failure was: Failed execv(/system/bin/patchoat --instruction-set=arm --input-oat-file=/data/data/com.google.android.gms/app_chimera/m/00000001/arm/DynamiteModulesA_GmsCore_prodlmp_xhdpi_release.odex --output-oat-file=/data/dalvik-cache/arm/data@data@com.google.android.gms@app_chimera@m@00000001@DynamiteModulesA_GmsCore_prodlmp_xhdpi_release.apk@classes.dex --patched-image-location=/system/framework/boot.art) because non-0 exit status
[...]
W/ActivityManager( 845): Unable to start service Intent { cmp=com.google.android.gm.exchange/com.android.exchange.service.EasService } U=0: not found
[...]
W/UnifiedEmail(12219): Attempted to stop tracing Inbox first results loaded before XTracer initialization.
I/Exchange(12219): RestartPingsTask did not start any pings.
I/Exchange(12219): onDestroy
I/ActivityManager( 845): Process com.google.android.apps.plus (pid 11809) has died
D/ActivityManager( 845): cleanUpApplicationRecord -- 11809
I/ConversationCursor(12219): Resuming caching, pos=0 idler=dhc@2472c823
I/ConversationCursor(12219): Caching complete pos=57
D/DownloadManager(11776): [291] Finished with status SUCCESS
E/DatabaseUtils(11776): Writing exception to parcel
E/DatabaseUtils(11776): java.lang.SecurityException: Permission Denial: reading com.android.providers.downloads.DownloadProvider uri content://downloads/all_downloads/291 from pid=12219, uid=10056 requires android.permission.ACCESS_ALL_DOWNLOADS, or grantUriPermission()
E/DatabaseUtils(11776):	at android.content.ContentProvider.enforceReadPermissionInner(ContentProvider.java:573)
E/DatabaseUtils(11776):	at android.content.ContentProvider$Transport.enforceReadPermission(ContentProvider.java:461)
E/DatabaseUtils(11776):	at android.content.ContentProvider$Transport.enforceFilePermission(ContentProvider.java:452)
E/DatabaseUtils(11776):	at android.content.ContentProvider$Transport.openTypedAssetFile(ContentProvider.java:397)
E/DatabaseUtils(11776):	at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:313)
E/DatabaseUtils(11776):	at android.os.Binder.execTransact(Binder.java:446)
W/GAV2 (12219): Thread[Background tasks,5,main]: dispatch call queued. Need to call GAServiceManager.getInstance().initialize().
E/AndroidRuntime(12219): FATAL EXCEPTION: Background tasks
E/AndroidRuntime(12219): Process: com.google.android.gm, PID: 12219
E/AndroidRuntime(12219): java.lang.SecurityException: Permission Denial: reading com.android.providers.downloads.DownloadProvider uri content://downloads/all_downloads/291 from pid=12219, uid=10056 requires android.permission.ACCESS_ALL_DOWNLOADS, or grantUriPermission()
E/AndroidRuntime(12219):	at android.os.Parcel.readException(Parcel.java:1546)
E/AndroidRuntime(12219):	at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:185)
E/AndroidRuntime(12219):	at android.database.DatabaseUtils.readExceptionWithFileNotFoundExceptionFromParcel(DatabaseUtils.java:148)
E/AndroidRuntime(12219):	at android.content.ContentProviderProxy.openTypedAssetFile(ContentProviderNative.java:691)
E/AndroidRuntime(12219):	at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1080)
E/AndroidRuntime(12219):	at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:921)
E/AndroidRuntime(12219):	at android.content.ContentResolver.openFileDescriptor(ContentResolver.java:778)
E/AndroidRuntime(12219):	at android.content.ContentResolver.openFileDescriptor(ContentResolver.java:733)
E/AndroidRuntime(12219):	at android.app.DownloadManager.openDownloadedFile(DownloadManager.java:1017)
E/AndroidRuntime(12219):	at efe.a(SourceFile:1579)
E/AndroidRuntime(12219):	at efe.a(SourceFile:10278)
E/AndroidRuntime(12219):	at duq.run(SourceFile:2990)
E/AndroidRuntime(12219):	at android.os.Handler.handleCallback(Handler.java:739)
E/AndroidRuntime(12219):	at android.os.Handler.dispatchMessage(Handler.java:95)
E/AndroidRuntime(12219):	at android.os.Looper.loop(Looper.java:135)
E/AndroidRuntime(12219):	at android.os.HandlerThread.run(HandlerThread.java:61)
W/ActivityManager( 845): Force finishing activity 1 com.google.android.gm/.ConversationListActivityGmail
I/OpenGLRenderer( 845): Initialized EGL, version 1.4
I/Timeline( 2539): Timeline: Activity_idle id: android.os.BinderProxy@2890015e time:7676215
I/Timeline( 845): Timeline: Activity_windows_visible id: ActivityRecord{ad8ebd0 u0 com.google.android.googlequicksearchbox/com.google.android.launcher.GEL t130} time:7676412
W/OpenGLRenderer( 2539): Incorrectly called buildLayer on View: ShortcutAndWidgetContainer, destroying layer...
W/ResourceType( 2143): No package identifier when getting value for resource number 0x00000000
W/PackageManager( 2143): Failure retrieving resources for com.google.android.gm: Resource ID #0x0
W/thermanager(12333): failed to attach resource "temp-emmc" [msm-adc], ignoring
W/thermanager(12333): failed to attach resource "temp-batt" [msm-adc], ignoring
E/thermanager(12333): failed to create configuration with sensor "temp-emmc"
E/thermanager(12333): failed to parse configuration sections
I/Process (12219): Sending signal. PID: 12219 SIG: 9
I/ActivityManager( 845): Process com.google.android.gm (pid 12219) has died

...and that's when Gmail dies. As you can see problem #1 occurs again when Gmail was running, so the Gmail crash might be caused by it. But I don't know for sure. It might as well be the line "E/Gmail (12219): FLF.setSelectedAccount(null) called! Destroying existing loader." that's causing the crash. Does it mean that Gmail has not (full) access on the accounts?