Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

crash at UnityPlayer.dll!MemoryManager::GetAllocator(struct MemLabelId)

Discussion in 'Windows' started by SnailRocketMan, Sep 8, 2022.

  1. SnailRocketMan

    SnailRocketMan

    Joined:
    Sep 8, 2022
    Posts:
    3
    Hi, calling CallWindowProcW(wndProc, hWnd, message, wParam, lParam) with the following parameters in our game will cause UnityPlayer.dll to crash. Does anyone know the possible reason?

    upload_2022-9-8_15-28-59.png

    upload_2022-9-8_15-28-28.png
     
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,455
    Latest unity lts?
     
  3. SnailRocketMan

    SnailRocketMan

    Joined:
    Sep 8, 2022
    Posts:
    3
    It is a recently launched game, and Unity should be a relatively new version.
     
  4. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,455
    Isn't it your game?
    Then make the devs post the issue and report the issue to them
     
  5. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,516
    You are not supposed to call WM_QUIT in middle of the game loop, Unity doesn't expect that (and I can't even tell whether you're calling it from the right thread). Call Application.Quit() instead.
     
  6. SnailRocketMan

    SnailRocketMan

    Joined:
    Sep 8, 2022
    Posts:
    3
    Message 16 is WM_CLOSE. We captures all windows messages, deals with it (in this case, it doesnt do a lot) and retransmit if needed to the actual game using CallWindowProc. In this case, we got a WM_CLOSE from Windows and retransmit it to the game.
     
  7. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,516
    Do you have a full callstack with "External Code" frames expanded?

    Re WM_QUIT/WM_CLOSE: my bad, I typed the wrong thing. However, the same thing applies to WM_CLOSE. That said, if Windows is sending this message, it shouldn't be crashing.