Skip to content

Possible bug causing Daijisho to steal focus on network event #898

Description

@Yarg-mirror

Hello,

I think I may have found a bug related to Daijisho background behavior, but I’m not fully sure, so I wanted to report it with logs in case it helps.

Device / setup

  • AYN Odin 2 Portal
  • Android 13
  • Daijisho as launcher (latest version from Play Store)
  • RetroArch used for emulation
  • Issue also happened outside RetroArch (for example in Moonlight), so it does not seem emulator-specific

Problem

While playing, the foreground app sometimes suddenly loses focus and I get sent back to the launcher/home screen.

Important detail

The running app is not actually closed.
If I reopen it immediately, everything resumes exactly where it was.
So this feels more like an unexpected task switch / launcher focus steal than an app crash.

Frequency

Random. but frequent, In a single session of 1h15, I "launched" the same game 54 times

What I tested

  • Tested multiple times in RetroArch and also in Moonlight

  • Checked for ghost inputs / hardware button issues with gamepad tester and other apps
    ==> Nothing apparent.

After some time tried adb to look for something:

with adb shell getevent -l and leaving the game alone, nothing, just returning home with no input detected.

with adb shell logcat

while a network BSSID swith happened, I got that message:

I daijishou_logging_service: [StandaloneCoroutine] Refreshing RetroAchievements Credentials. Because connection has changed and retroInterface is null.

Then I got sent back to home.

Since I never did setup retroachievement that looked odd, so maybe a bug with the non configured credentials ?
After disabling retroachievement from the settings, same results.

With WIFI OFF, no issues at all. Could not reproduce

With WIFI ON, the issue returns.

Switched back to Quickstep to see if it's Android, nothing there, no Issue, but I get that log in the background regularly:

E ActivityTaskManager: START u0 {flg=0x10000000 cmp=com.magneticchen.daijishou/.ui.activities.BootstrapActivity} from uid 10114
W ActivityTaskManager: Background activity start [callingPackage: com.magneticchen.daijishou; callingUid: 10114; appSwitchState: 2; isCallingUidForeground: false; callingUidHasAnyVisibleWindow: false; callingUidProcState: SERVICE; isCallingUidPersistentSystemProcess: false; realCallingUid: 10114; isRealCallingUidForeground: false; realCallingUidHasAnyVisibleWindow: false; realCallingUidProcState: SERVICE; isRealCallingUidPersistentSystemProcess: false; originatingPendingIntent: null; allowBackgroundActivityStart: false; intent: Intent { flg=0x10000000 cmp=com.magneticchen.daijishou/.ui.activities.BootstrapActivity }; callerApp: ProcessRecord{6a4ef05 3405:com.magneticchen.daijishou/u0a114}; inVisibleTask: false]
E CellBroadcastUtils: getDefaultCellBroadcastReceiverPackageName: no package found
I daijishou_logging_service: [DaijishouDebugServiceTcpClient] New client: Socket[address=/192.168.1.114,port=49188,localPort=19487]
daijishou_logging_service: [DaijishouDebugServiceTcpClient] sun.net.ConnectionResetException: Connection reset
daijishou_logging_service:     at java.net.SocketOutputStream.socketWrite0(Native Method)
daijishou_logging_service:     at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:116)
daijishou_logging_service:     at java.net.SocketOutputStream.write(SocketOutputStream.java:135)
daijishou_logging_service:     at java.io.DataOutputStream.write(DataOutputStream.java:88)
daijishou_logging_service:     at com.magneticchen.daijishou.service.debug.DaijishouDebugService$DaijishouDebugServiceTcpClient$start$1.invoke(DaijishouDebugService.kt:148)
daijishou_logging_service:     at com.magneticchen.daijishou.service.debug.DaijishouDebugService$DaijishouDebugServiceTcpClient$start$1.invoke(DaijishouDebugService.kt:101)
daijishou_logging_service:     at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:30)

That make me think that Daijisho try to get to the foreground for some reason and put the running app in the background in the same time.

I do not have a retroachievement account to see if that fix the issue, I think it is the only test I have not done.

I hope that can help finding the issue if it is not related to my device only someway !
Thanks for your great work on the project !

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions