View Issue Details

IDProjectCategoryView StatusLast Update
0001414NoesisGUIC++ SDKpublic2019-03-04 11:30
ReporternikobarliAssigned Tojsantos 
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
Product Version2.2.0b7 
Target Version2.2.0Fixed in Version2.2.0b8 
Summary0001414: NoesisGUI crash on Windows 7 SP1
DescriptionNoesisGUI crash on Windows 7 SP1 (confirmed with the r7800 of trunk)

All samples code of Noesis C++ SDK failed to run on Windows 7 SP1.
I confirmed with the following platforms
- Win7 SP1 + GeForce GTX 1050i (both local and RDP)
- Win7 SP1 + Quadro K620 (both local and RDP)
- Win7 SP1 on Hyper-V VM (emulated GPU)

# We usually use Windows 10 when developing code, but our target platform includes Windows 7 SP1.
# I forgot when is the last time I confirmed it run on Windows 7 SP1
TagsNo tags attached.
PlatformWindows

Activities

nikobarli

nikobarli

2019-02-26 02:28

reporter  

NoesisCrashOnWin7SP1.PNG (108,312 bytes)
NoesisCrashOnWin7SP1.PNG (108,312 bytes)
nikobarli

nikobarli

2019-02-26 03:12

reporter   ~0005472

At least it works on r6976
jsantos

jsantos

2019-02-26 05:05

manager   ~0005474

Yes, we introduced this bug in beta5 and was fixed in beta6. Could you try trunk?
nikobarli

nikobarli

2019-02-26 05:17

reporter   ~0005475

Hi Jesus,

I tried using r7801 of trunk just now and it's still there.
nikobarli

nikobarli

2019-02-26 07:57

reporter   ~0005476

Hhhmmmghh, it seems there are two problems

1. NoesisGUI samples crashed on Win7 SP1

This is due to commit on r7369. NoesisGUI called an API of XInput_4.dll which only supported on Windows 8 or above. Thus failing in Win7 SP1. This is still happening even on trunk r7801.

2. Our app crashed on Win7 SP1

This maybe the bug in beta5 you are mentioning. We are currently using r7643. Will try to update to the latest.
jsantos

jsantos

2019-02-26 16:52

manager   ~0005477

Hi Niko,

I am looking at the input thing right now and I see that we load XInput dynamically

    HMODULE xInput = LoadLibraryA("Xinput1_4.dll");
    if (xInput != 0)
    {
        XInputGetState_ = (PFN_XINPUTGETSTATE)GetProcAddress(xInput, "XInputGetState");
        XInputGetCapabilities_ = (PFN_XINPUTGETCAPABILITIES)GetProcAddress(xInput, "XInputGetCapabilities");
    }


So we shouldn't have that dependency at launch time. Could you please give me more information about the error?

Thanks!
jsantos

jsantos

2019-02-26 16:56

manager   ~0005478

Could you provide minidump using our latest beta release?

https://www.noesisengine.com/forums/viewtopic.php?f=14&t=1491
nikobarli

nikobarli

2019-02-27 03:01

reporter   ~0005482

Hi Jesus,

I attached a patch to comment out the offending part of the current source code.
XInputGetCapabilities_ may be called even when it is not initialized (as in Win7)

Win32Display.cpp.patch (1,163 bytes)
Index: Src/Packages/App/Win32Display/Src/Win32Display.cpp
===================================================================
--- Src/Packages/App/Win32Display/Src/Win32Display.cpp	(revision 7801)
+++ Src/Packages/App/Win32Display/Src/Win32Display.cpp	(working copy)
@@ -345,13 +345,13 @@
             if (currentTime - lastEnumTime > 2000)
             {
                 lastEnumTime = currentTime;
-                XINPUT_CAPABILITIES xinputCaps;
-                uint32_t capsResult = XInputGetCapabilities_(0, XINPUT_FLAG_GAMEPAD, &xinputCaps);
-                if (capsResult == ERROR_SUCCESS)
-                {
-                    NS_LOG_DEBUG("XInput controller connected");
-                    isControllerConnected = true;
-                }
+                // XINPUT_CAPABILITIES xinputCaps;
+                // uint32_t capsResult = XInputGetCapabilities_(0, XINPUT_FLAG_GAMEPAD, &xinputCaps);
+                // if (capsResult == ERROR_SUCCESS)
+                // {
+                //     NS_LOG_DEBUG("XInput controller connected");
+                //     isControllerConnected = true;
+                // }
             }
         }
 
Win32Display.cpp.patch (1,163 bytes)
nikobarli

nikobarli

2019-02-27 03:50

reporter   ~0005483

I updated our Noesis to 2.2.0b6 (r7766) and I confirmed that our code no longer crashes in Win7 SP1
jsantos

jsantos

2019-03-01 13:18

manager   ~0005485

So, just checking if XInputGetCapabilities_ is NULL before calling will solve the issue right?
jsantos

jsantos

2019-03-01 13:18

manager   ~0005486

I mean, the problem is that in Win7 that pointer is NULL or uninitiated.
nikobarli

nikobarli

2019-03-02 02:33

reporter   ~0005489

> I mean, the problem is that in Win7 that pointer is NULL or uninitiated.

Yes, that's correct.
jsantos

jsantos

2019-03-04 11:30

manager   ~0005495

Thanks for the help Niko! Fixed in r7850

Issue History

Date Modified Username Field Change
2019-02-26 02:28 nikobarli New Issue
2019-02-26 02:28 nikobarli File Added: NoesisCrashOnWin7SP1.PNG
2019-02-26 03:12 nikobarli Note Added: 0005472
2019-02-26 05:05 jsantos Note Added: 0005474
2019-02-26 05:05 jsantos Assigned To => jsantos
2019-02-26 05:05 jsantos Status new => feedback
2019-02-26 05:05 jsantos Target Version => 2.2.0
2019-02-26 05:05 jsantos Description Updated View Revisions
2019-02-26 05:17 nikobarli Note Added: 0005475
2019-02-26 05:17 nikobarli Status feedback => assigned
2019-02-26 07:57 nikobarli Note Added: 0005476
2019-02-26 16:52 jsantos Note Added: 0005477
2019-02-26 16:52 jsantos Status assigned => feedback
2019-02-26 16:56 jsantos Note Added: 0005478
2019-02-27 03:01 nikobarli File Added: Win32Display.cpp.patch
2019-02-27 03:01 nikobarli Note Added: 0005482
2019-02-27 03:01 nikobarli Status feedback => assigned
2019-02-27 03:50 nikobarli Note Added: 0005483
2019-03-01 13:18 jsantos Note Added: 0005485
2019-03-01 13:18 jsantos Note Added: 0005486
2019-03-01 13:18 jsantos Status assigned => feedback
2019-03-02 02:33 nikobarli Note Added: 0005489
2019-03-02 02:33 nikobarli Status feedback => assigned
2019-03-04 11:30 jsantos Status assigned => resolved
2019-03-04 11:30 jsantos Resolution open => fixed
2019-03-04 11:30 jsantos Fixed in Version => 2.2.0b8
2019-03-04 11:30 jsantos Note Added: 0005495