BrainiumLLC / cargo-mobile

Rust on mobile made easy!
Apache License 2.0
1.23k stars 52 forks source link

Broken winit example on Android? #46

Open zeerooth opened 3 years ago

zeerooth commented 3 years ago

I recently tried updating cargo-mobile, along with Android NDK and running the winit example, but it seems like it's broken on my device, because no events are being logged at all and whenever I touch the screen I get this in adb logcat:

10-23 21:33:09.704  2053  2560 I InputDispatcher: Dropping event because there is no touchable window or gesture monitor at (449, 853) in display 0.
10-23 21:33:09.933  2053  2560 I InputDispatcher: Dropping event because there is no touchable window or gesture monitor at (537, 907) in display 0.
10-23 21:33:10.182  2053  2560 I InputDispatcher: Dropping event because there is no touchable window or gesture monitor at (588, 953) in display 0.
10-23 21:33:10.389  2053  2560 I InputDispatcher: Dropping event because there is no touchable window or gesture monitor at (640, 950) in display 0.

Here are some startup logs:

10-23 21:32:55.946 22452 16553 I Finsky  : [21232] agax.c(3): Verify: Verification package=com.example.cargo_mobile_winit_test, id=77 response=0
10-23 21:32:56.160  2053  2201 I ActivityManager: Force stopping com.example.cargo_mobile_winit_test appid=10394 user=-1: installPackageLI
10-23 21:32:56.161  2053  2237 I PackageManager: Update package com.example.cargo_mobile_winit_test code path from /data/app/com.example.cargo_mobile_winit_test-uhgxk2lrSV4gcG9LuGa7Fw== to /data/app/com.example.cargo_mobile_winit_test-sCxw4BSvRu7RPVywW1Qudw==; Retain data and using new
10-23 21:32:56.161  2053  2237 I PackageManager: Update package com.example.cargo_mobile_winit_test resource path from /data/app/com.example.cargo_mobile_winit_test-uhgxk2lrSV4gcG9LuGa7Fw== to /data/app/com.example.cargo_mobile_winit_test-sCxw4BSvRu7RPVywW1Qudw==; Retain data and using new
10-23 21:32:56.161  2053  2201 I ActivityManager: Killing 8013:com.example.cargo_mobile_winit_test/u0a394 (adj 910): stop com.example.cargo_mobile_winit_test
10-23 21:32:56.165  2053  2201 D ActivityManager: makeInactive, ProcessRecord{7a9d7a 8013:com.example.cargo_mobile_winit_test/u0a394}, clear holder.state
10-23 21:32:56.166  2053  2201 W ActivityTaskManager: Force removing ActivityRecord{6018162 u0 com.example.cargo_mobile_winit_test/android.app.NativeActivity t22024 f}: app died, no saved state
10-23 21:32:56.563  2053  2237 I ActivityManager: Force stopping com.example.cargo_mobile_winit_test appid=10394 user=0: pkg removed
10-23 21:32:56.598  3650  3650 D MotoSystemServer: receive intent :package:com.example.cargo_mobile_winit_test#Intent;action=android.intent.action.PACKAGE_REMOVED;launchFlags=0x4000010;B.android.intent.extra.REMOVED_FOR_ALL_USERS=true;B.android.intent.extra.DONT_KILL_APP=false;i.android.intent.extra.UID=10394;B.android.intent.extra.DATA_REMOVED=false;B.android.intent.extra.REPLACING=true;i.android.intent.extra.user_handle=0;end
10-23 21:32:56.599  3650  3650 D MotoSystemServer:  packageName = com.example.cargo_mobile_winit_test
10-23 21:32:56.599  3650  3650 D MotoSystemServer: mRemovedPackages add: com.example.cargo_mobile_winit_test
10-23 21:32:56.608 22452 22452 I Finsky  : [2] ttq.n(8): Invalidating cached PackageState for com.example.cargo_mobile_winit_test
10-23 21:32:56.619  3069  3069 I GsaVoiceInteractionSrv: O received Intent { act=android.intent.action.PACKAGE_REMOVED dat=package:com.example.cargo_mobile_winit_test flg=0x4000010 (has extras) }
10-23 21:32:56.623  3650  3650 D MotoSystemServer: receive intent :package:com.example.cargo_mobile_winit_test#Intent;action=android.intent.action.PACKAGE_ADDED;launchFlags=0x4000010;i.android.intent.extra.UID=10394;B.android.intent.extra.REPLACING=true;i.android.intent.extra.user_handle=0;end
10-23 21:32:56.623  3650  3650 D MotoSystemServer:  packageName = com.example.cargo_mobile_winit_test
10-23 21:32:56.624  3650  3650 D MotoSystemServer: #1 mRemovedPackages remove: com.example.cargo_mobile_winit_test
10-23 21:32:56.631  2053  2201 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_REMOVED dat=package:com.example.cargo_mobile_winit_test flg=0x4000010 (has extras) } to com.android.vending/com.google.android.finsky.packagemanager.impl.PackageMonitorReceiverImpl$RegisteredReceiver
10-23 21:32:56.648  3069  3069 I GsaVoiceInteractionSrv: O received Intent { act=android.intent.action.PACKAGE_ADDED dat=package:com.example.cargo_mobile_winit_test flg=0x4000010 (has extras) }
10-23 21:32:56.657  2053  2201 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_REMOVED dat=package:com.example.cargo_mobile_winit_test flg=0x4000010 (has extras) } to com.android.vending/com.google.android.finsky.instantapps.appmanagement.InstantAppRemoveMonitor
10-23 21:32:56.659  2053  2201 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_REMOVED dat=package:com.example.cargo_mobile_winit_test flg=0x4000010 (has extras) } to com.facebook.services/com.facebook.oxygen.services.fbns.RegisteredMqttSystemBroadcastReceiver
10-23 21:32:56.664  2053  2201 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_REMOVED dat=package:com.example.cargo_mobile_winit_test flg=0x4000010 (has extras) } to com.google.android.apps.maps/com.google.android.libraries.social.peoplekit.thirdparty.viewcontrollers.ThirdPartyReceiver
10-23 21:32:56.665  2053  2201 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_REMOVED dat=package:com.example.cargo_mobile_winit_test flg=0x4000010 (has extras) } to com.google.android.apps.photos/com.google.android.libraries.social.peoplekit.thirdparty.viewcontrollers.ThirdPartyReceiver
10-23 21:32:56.674  2053  2201 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_REMOVED dat=package:com.example.cargo_mobile_winit_test flg=0x4000010 (has extras) } to com.google.android.gms/.games.chimera.GamesSystemBroadcastReceiverProxy
10-23 21:32:56.674  2053  2201 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_REMOVED dat=package:com.example.cargo_mobile_winit_test flg=0x4000010 (has extras) } to com.google.android.gms/.chimera.GmsIntentOperationService$PersistentTrustedReceiver
10-23 21:32:56.674  2053  2201 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_REMOVED dat=package:com.example.cargo_mobile_winit_test flg=0x4000010 (has extras) } to com.google.android.googlequicksearchbox/com.google.android.apps.gsa.googlequicksearchbox.GelStubAppWatcher
10-23 21:32:56.685 22452 22485 I Finsky  : [20471] fvw.a(5): AIM: AppInfoManager-Perf > OnDeviceAppInfo > cacheHitCount=0, cacheMissCount=1. Missed  in cache (limit 10) : [com.example.cargo_mobile_winit_test]
10-23 21:32:56.692  2053  2201 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_REMOVED dat=package:com.example.cargo_mobile_winit_test flg=0x4000010 (has extras) } to com.facebook.katana/com.facebook.feed.platformads.AppInstallReceiver
10-23 21:32:56.693  2053  2201 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_REMOVED dat=package:com.example.cargo_mobile_winit_test flg=0x4000010 (has extras) } to com.google.android.apps.magazines/com.google.android.libraries.social.peoplekit.thirdparty.viewcontrollers.ThirdPartyReceiver
10-23 21:32:56.693  2053  2201 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_REMOVED dat=package:com.example.cargo_mobile_winit_test flg=0x4000010 (has extras) } to com.mgoogle.android.gms/org.microg.gms.gcm.UnregisterReceiver
10-23 21:32:56.694  2053  2201 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_ADDED dat=package:com.example.cargo_mobile_winit_test flg=0x4000010 (has extras) } to com.google.android.packageinstaller/com.android.packageinstaller.PackageInstalledReceiver
10-23 21:32:56.721  3650  3650 D MotoSystemServer: receive intent :package:com.example.cargo_mobile_winit_test#Intent;action=android.intent.action.PACKAGE_REPLACED;launchFlags=0x4000010;i.android.intent.extra.UID=10394;B.android.intent.extra.REPLACING=true;i.android.intent.extra.user_handle=0;end
10-23 21:32:56.721  3650  3650 D MotoSystemServer:  packageName = com.example.cargo_mobile_winit_test
10-23 21:32:56.734  3069  3069 I GsaVoiceInteractionSrv: O received Intent { act=android.intent.action.PACKAGE_REPLACED dat=package:com.example.cargo_mobile_winit_test flg=0x4000010 (has extras) }
10-23 21:32:56.740  2053  2201 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_ADDED dat=package:com.example.cargo_mobile_winit_test flg=0x4000010 (has extras) } to com.android.vending/com.google.android.finsky.packagemanager.impl.PackageMonitorReceiverImpl$RegisteredReceiver
10-23 21:32:56.741  2053  2201 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_ADDED dat=package:com.example.cargo_mobile_winit_test flg=0x4000010 (has extras) } to com.facebook.appmanager/com.facebook.oxygen.common.packages.event.manifest.ManifestPackageEventReceiver
10-23 21:32:56.741  2053  2201 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_ADDED dat=package:com.example.cargo_mobile_winit_test flg=0x4000010 (has extras) } to com.google.android.gms/.games.chimera.GamesSystemBroadcastReceiverProxy
10-23 21:32:56.742  2053  2201 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_ADDED dat=package:com.example.cargo_mobile_winit_test flg=0x4000010 (has extras) } to com.google.android.gms/.gass.chimera.PackageChangeBroadcastReceiver
10-23 21:32:56.747 22452 22452 I Finsky  : [2] nyr.g(1): Installer: package com.example.cargo_mobile_winit_test was removed. replacing: true
10-23 21:32:56.748 22452 22452 I Finsky  : [2] nyr.P(18): Installer: Notifying status update. package=com.example.cargo_mobile_winit_test, status=UNINSTALLED
10-23 21:32:56.753 22452 22452 I Finsky  : [2] ttq.n(8): Invalidating cached PackageState for com.example.cargo_mobile_winit_test
10-23 21:32:56.757 22452 16577 I Finsky  : [21235] glz.accept(16): Cancelled 0 ongoing asset module downloads for package com.example.cargo_mobile_winit_test due to a concurrent app update.
10-23 21:32:56.797  2053  2201 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_ADDED dat=package:com.example.cargo_mobile_winit_test flg=0x4000010 (has extras) } to com.google.android.gms/.chimera.GmsIntentOperationService$PersistentTrustedReceiver
10-23 21:32:56.815  2053  2201 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_ADDED dat=package:com.example.cargo_mobile_winit_test flg=0x4000010 (has extras) } to com.google.android.googlequicksearchbox/com.google.android.apps.gsa.googlequicksearchbox.GelStubAppWatcher
10-23 21:32:56.816  2053  2201 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_ADDED dat=package:com.example.cargo_mobile_winit_test flg=0x4000010 (has extras) } to com.google.android.ims/.receivers.RcsAutoStartReceiver
10-23 21:32:56.857 22452 22485 I Finsky  : [20471] fvw.a(5): AIM: AppInfoManager-Perf > OnDeviceAppInfo > cacheHitCount=0, cacheMissCount=1. Missed  in cache (limit 10) : [com.example.cargo_mobile_winit_test]
10-23 21:32:56.861  2053  3009 I ActivityTaskManager: START u0 {flg=0x10000000 cmp=com.example.cargo_mobile_winit_test/android.app.NativeActivity} from uid 2000
10-23 21:32:56.923 22452 16577 I Finsky  : [21235] glz.accept(24): Asset module broadcast after update successful for package com.example.cargo_mobile_winit_test. 0 sessions broadcast.
10-23 21:32:56.948  2942  2942 D ImsResolver: maybeAddedImsService, packageName: com.example.cargo_mobile_winit_test
10-23 21:32:57.047 22452 22452 I Finsky  : [2] ttq.n(8): Invalidating cached PackageState for com.example.cargo_mobile_winit_test
10-23 21:32:57.076 22452 16582 I Finsky  : [21237] ome.G(2): IQ: Notifying installation update. package=com.example.cargo_mobile_winit_test, status=UNINSTALLED
10-23 21:32:57.097 23661 16623 I FontLog : Package com.example.cargo_mobile_winit_test has no metadata [CONTEXT service_id=132 ]
10-23 21:32:57.140 22452 22452 I Finsky  : [2] VerifyInstallTask.mR(6): Verification complete: id=77, package_name=com.example.cargo_mobile_winit_test
10-23 21:32:57.162  2053  7472 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_ADDED dat=package:com.example.cargo_mobile_winit_test flg=0x4000010 (has extras) } to com.facebook.katana/com.facebook.feed.platformads.AppInstallReceiver
10-23 21:32:57.180 22452 22452 I Finsky  : [2] ttq.n(8): Invalidating cached PackageState for com.example.cargo_mobile_winit_test
10-23 21:32:57.189  2053  7472 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_REPLACED dat=package:com.example.cargo_mobile_winit_test flg=0x4000010 (has extras) } to com.facebook.appmanager/com.facebook.oxygen.common.packages.event.manifest.ManifestPackageEventReceiver
10-23 21:32:57.191  2053  2201 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_REPLACED dat=package:com.example.cargo_mobile_winit_test flg=0x4000010 (has extras) } to com.google.android.apps.photos/.account.full.FetchAccountPropertiesAppUpgradeBroadcastReceiver
10-23 21:32:57.191  2053  2201 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_REPLACED dat=package:com.example.cargo_mobile_winit_test flg=0x4000010 (has extras) } to com.google.android.apps.photos/.account.full.SyncAccountsForLoginBroadcastReceiver
10-23 21:32:57.191  2053  2201 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_REPLACED dat=package:com.example.cargo_mobile_winit_test flg=0x4000010 (has extras) } to com.google.android.apps.photos/.notificationchannels.AppUpdateBroadcastReceiver
10-23 21:32:57.191  2053  2201 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_REPLACED dat=package:com.example.cargo_mobile_winit_test flg=0x4000010 (has extras) } to com.google.android.gms/.gass.chimera.PackageChangeBroadcastReceiver
10-23 21:32:57.191  2053  2201 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_REPLACED dat=package:com.example.cargo_mobile_winit_test flg=0x4000010 (has extras) } to com.google.android.gms/.chimera.GmsIntentOperationService$PersistentTrustedReceiver
10-23 21:32:57.191  2053  2201 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_REPLACED dat=package:com.example.cargo_mobile_winit_test flg=0x4000010 (has extras) } to com.google.android.googlequicksearchbox/com.google.android.apps.gsa.googlequicksearchbox.GelStubAppWatcher
10-23 21:32:57.191  2053  2201 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_REPLACED dat=package:com.example.cargo_mobile_winit_test flg=0x4000010 (has extras) } to com.google.android.ims/.receivers.RcsAutoStartReceiver
10-23 21:32:57.191  2053  2201 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_REPLACED dat=package:com.example.cargo_mobile_winit_test flg=0x4000010 (has extras) } to com.motorola.ccc.notification/.gcm.GCMAdminReceiver
10-23 21:32:57.516  2053  2202 I ActivityManager: Start proc 16650:com.example.cargo_mobile_winit_test/u0a394 for activity {com.example.cargo_mobile_winit_test/android.app.NativeActivity}
10-23 21:32:57.739  2053  2172 I WindowManager:   SURFACE show Surface(name=Splash Screen com.example.cargo_mobile_winit_test)/@0xded7294 on display:0: Splash Screen com.example.cargo_mobile_winit_test
10-23 21:32:57.919 16650 16650 V cargo-mobile-winit-test: ndk_glue: Start
10-23 21:32:57.925 16650 16650 V cargo-mobile-winit-test: ndk_glue: Resume
10-23 21:32:57.949 16650 16650 V cargo-mobile-winit-test: ndk_glue: InputQueueCreated
10-23 21:32:57.972  2053  3859 V WindowManager: Changing focus from null to Window{99ca8c4 u0 com.example.cargo_mobile_winit_test/android.app.NativeActivity} displayId=0
10-23 21:32:57.976 16650 16650 V cargo-mobile-winit-test: ndk_glue: WindowCreated
10-23 21:32:57.976 16650 16650 V cargo-mobile-winit-test: ndk_glue: WindowResized
10-23 21:32:57.979 16650 16650 V cargo-mobile-winit-test: ndk_glue: ContentRectChanged
10-23 21:32:57.988 16650 16650 V cargo-mobile-winit-test: ndk_glue: WindowRedrawNeeded
10-23 21:32:57.997 16650 16650 V cargo-mobile-winit-test: ndk_glue: WindowHasFocus
10-23 21:32:58.009  2053  2172 I LaunchCheckinHandler: Displayed com.example.cargo_mobile_winit_test/android.app.NativeActivity,cp,ca,970
10-23 21:32:58.009  2053  2172 I WindowManager: Window drawn AppWindowToken{421b057 token=Token{b8115d6 ActivityRecord{116b5f1 u0 com.example.cargo_mobile_winit_test/android.app.NativeActivity t22028}}}
10-23 21:32:58.010  2053  2172 I WindowManager:   SURFACE show Surface(name=com.example.cargo_mobile_winit_test/android.app.NativeActivity)/@0xd49df2e on display:0: com.example.cargo_mobile_winit_test/android.app.NativeActivity
10-23 21:32:58.628 29565 29802 I DeviceAppInfoWork: remove existing package for update: com.example.cargo_mobile_winit_test
10-23 21:32:58.629 29565 29773 I DeviceAppInfoWork: remove existing package for update: com.example.cargo_mobile_winit_test
10-23 21:32:58.658 29565 29802 I DeviceAppInfoWork: remove existing package for update: com.example.cargo_mobile_winit_test
10-23 21:33:00.207  2053  2189 I ActivityTaskManager: Displayed com.example.cargo_mobile_winit_test/android.app.NativeActivity: +1s150ms

Honestly, I am lost as to why this might be happening, wgpu template seems to be drawn fine for example. I'll try to investigate it futher soon, but any ideas would be really appreciated :)

NDK version: 23.1.7779620 Rust: 1.51.0