How can we help you today? How can we help you today?

Crash Report showing wrong OS

Hello,
with SA 7 a CrashReport is showing Windows 8 as OS. But the crash is happening on a Windows 10 machine.
Could this been fixed?
mrmiagi0101
0

Comments

7 comments

  • mrmiagi0101
    You could do something like that to better get Windows Version:


    public static string GetOSVersion()
            {
                try
                {
                    var mo = GetManagementObject("Win32_OperatingSystem");

                    if (null == mo)
                        return string.Empty;

                    return mo["Caption"] + " (" + mo["Version"] + ") - " + mo["OSArchitecture"];
                }
                catch (Exception)
                {
                    return string.Empty;
                }
            }

            private static ManagementObject GetManagementObject(string className)
            {
                var mClass = new ManagementClass(className);
                foreach (var o in mClass.GetInstances())
                {
                    if (o is ManagementObject mObj) return mObj;
                }

                return null;
            }

    mrmiagi0101
    0
  • Alex B
    Hi @mrmiagi0101,

    I believe this will be down to not having a manifest file for your application - please see this forum post: https://forum.red-gate.com/discussion/81013/feature-usage-windows-10-detection#latest 

    Kind regards,
    Alex
    Alex B
    0
  • mrmiagi0101
    Yes I know this, but with the above lines of code you get better infos. Have a look at this report in the custom properties section. No manifest needed.


    mrmiagi0101
    0
  • Alex B
    Hi @mrmiagi0101,

    I see what you mean.  I'll pass this on to the development team for their consideration and input! 

    In the meantime for anyone else coming upon this - you will need a manifest file for the correct OS information to be shown currently in SmartAssembly error reports.

    Kind regards,
    Alex
    Alex B
    0
  • Alex B
    Hi @mrmiagi0101,

    The team have addressed this in the latest release 7.0.3.2212!

    Kind regards,
    Alex
    Alex B
    0
  • mrmiagi0101
    It seems to work now. Thanks.
    mrmiagi0101
    0
  • Alex B
    Hi @mrmiagi0101,

    Excellent, thank you for confirming!

    Kind regards,
    Alex
    Alex B
    0

Add comment

Please sign in to leave a comment.