镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

diagAbortWithResult wrappers hide root error causes (e.g. for timeInitialize() and others) #742

Open

Description

@chrisbraucker

Hello!

I came across an issue where qLaunch crashed when launching the album override.

The root cause was PSC having limited slots for persistent clock objects initialized through libnx.
I had two sysmodules running at boot that both requested system time for logging (via libnx), and was then able to reproduce the crash consistently by launching any homebrew forwarder, keeping it running and then executing the album override.

Debugging this was cumbersome because the libnx error reported after timeInitialize() through diagAbortWithResult() hides the actual error by reporting a generic failure here.

I'm running Atmosphère 1.11.2 on HorizonOS 20.5.0 and have not yet confirmed this crash for other OS versions, but the issue is not about PSC having limited slots for clock registration, but the fact that libnx makes debugging this case harder by shadowing the underlying error.

In this case, timeInitialize() returned ResultOutOfMemory (0x64274), while the libnx initialization replaced that with LibnxError_InitFail_Time, hiding the underlying failure. Passing rc directly into diagAbortWithResult() would preserve that result and would have saved me a lot of time with the debugger.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions