Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-16707

Apisets Pseudo-Regression, Motorbike game crashes at start

    XMLWordPrintable

Details

    Description

      Reproducing steps:

      1. Download it here: http://www.bakno.com/Motorbike/downloads/Windows/Motorbike.zip.
      2. Extract to any directory.
      3. Run Motorbike.exe.

      0.4.9-dev-625-g3ff8f1bb09e6cbc46329ce368fbe7ded4733e95d - the game starts successfully.
      0.4.9-dev-626-g3f15a0d473ef745b9643a3497270c229814221d5 - it does no longer start.

      It crashes due to stub for missing RoInitialize function in our api-ms-win-core-winrt-l1-1-0.dll. The according part of debug.log seems to be:

      WARNING: calling stub RoInitialize()
      (dll/win32/kernel32/client/except.c:736) Missing function in   : api-ms-win-core-winrt-l1-1-0.dll
      (dll/win32/kernel32/client/except.c:737) with the functionname : RoInitialize
      Unhandled exception
      ExceptionCode:    80000100
      CS:EIP 1b:7c7168ed
      DS 23 ES 23 FS 3b GS 0
      EAX: 0012fd20   EBX: 80000100   ECX: 0012faac
      EDX: 00000000   EBP: 0012fd78   ESI: 00000000   ESP: 0012fd14
      EDI: 019913e0   EFLAGS: 00200246
      Address:
      <kernel32.dll:68ed> (C:\WINDOWS\system32\kernel32.dll@7c710000)
      Frames:
      <api-ms-win-core-winrt-l1-1-0.dll:112a> (C:\WINDOWS\System32\api-ms-win-core-winrt-l1-1-0.dll@60920000)
      <Motorbike.exe:807200> (C:\Motorbike\Motorbike.exe@400000)
      <Motorbike.exe:84e508> (C:\Motorbike\Motorbike.exe@400000)
      <Motorbike.exe:88c174> (C:\Motorbike\Motorbike.exe@400000)
      <kernel32.dll:10957> (C:\WINDOWS\system32\kernel32.dll@7c710000)
      

      Since that function is NT6+ (Windows 8/Server 2012) and is implemented in NT6 header/dll that we don't even actually have (roapi.h/combase.dll), the best fix is simple removing that stub. After removing it (and adding just a comment instead of that), the game starts as well again. So moreover there is no reason to implement that dll/header or import it from Wine. I think it is unneeded work for now.
      See https://docs.microsoft.com/en-us/windows/win32/api/roapi/nf-roapi-roinitialize for the reference.

      On XP/2003 it works as well too, so it supports them.

      Attachments

        1. 0.4.9-dev-625-g3ff8f1b.png
          1.39 MB
          Oleg Dubinskiy
        2. 0.4.9-dev-626-g3f15a0d.png
          32 kB
          Oleg Dubinskiy
        3. debug.log
          45 kB
          Oleg Dubinskiy
        4. fixed.png
          1.42 MB
          Oleg Dubinskiy
        5. Motorbike_XP.png
          1.50 MB
          Oleg Dubinskiy
        6. switch_from_opt_out_to_opt_in.patch
          0.9 kB
          reactosfanboy
        7. switch_from_optout_to_optin.webm
          996 kB
          reactosfanboy

        Issue Links

          Activity

            People

              learn_more Mark Jansen
              Oleg Dubinskij Oleg Dubinskiy
              Votes:
              3 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: