WMI query with multiple sets causes stack overflow

Forums Desktop Info WMI query with multiple sets causes stack overflow

Tagged: 

Viewing 6 reply threads
  • Author
    Posts
    • #3817
      cmdcmd
      Participant

      Hello again Glenn!

      I’ve managed to work myself into a hole again. I’m attempting to use WMI queries to gather information and store it in variables via the set: functionality. It seems that specifying a single variable via the WMI %name% return style doesn’t set the value, and instead only puts the literal string %WhateverProperty% into the variable.

      The big one though I ran into when attempting to collect multiple pieces of information in a single query. Specifying more than one variable in the set: section causes a stack overflow during UpdateEntries (according to the log). DesktopInfo.exe then closes (and will leave DesktopInfo64.exe orphaned if it was running.

      Windows version: Windows 10 Pro for Workstations 20H2 (19042.804)
      Product version: 2.10.1.3742
      Expected output: Result: MYMACHINE\myUserName WORKGROUP PC-Model
      Actual output: Result: %UserName% %Workgroup% %Model% (Or a stack overflow with no output.)

      Small ini to reproduce issue: (uncomment one of the WMI lines at a time. I left the stack overflow line in.)

      Log output from stack overflow:

    • #3820
      rtrussrtruss
      Participant

      I was able to get this to work, i am not in a workgroup but it still worked with domain in its place

      WMI=hidden:0,interval:0,namespace:root\cimv2,query:Win32_ComputerSystem,Row-text:FullUser| DOMAIN| Model,display:%UserName%| %DOMAIN%| %Model%

      Workgroup and Model are already ‘known’ to dti i believe so a set would not be needed for those.

      hope that helps.

    • #3821
      cmdcmd
      Participant

      Hey rtruss, I appreciate that workaround. I was more demonstrating the stack overflow, as it seems to happen with any time I use multiple sets from a WMI query.

      I did manage to work around it for my use case too: if I break each WMI query set into a single set per query, using display and a single, non-‘equals’ set like so:

      Everything works like I’d expect!

      Obviously there’s un-needed overhead in running the query multiple times, but the majority of the data I’m collecting I’m doing with interval:0, so it’s a relatively small issue for now!

    • #3823
      webmasterwebmaster
      Keymaster

      I’ve fixed the multi SET for WMI items. I couldn’t reproduce the stack overflow though. It’s possible I fixed it while working on other things.

    • #3824
      cmdcmd
      Participant

      Awesome news, Glenn!

      I’ll keep my eye open for the next release and will see if I can reproduce it at all and let you know if it got fixed along the way!

      Cheers

    • #3826
      webmasterwebmaster
      Keymaster

      I just loaded up 2.10.1 and reproduced your error so I can say the bug has been fixed in the next release.

    • #3829
      cmdcmd
      Participant

      Incredible! I wish everything had the same sort of turnaround you do, Glenn. Thanks a heap!

      • #3830
        webmasterwebmaster
        Keymaster

        Having said that, I notice it’s been 2 months since the last release which is unusual. I like to do updates monthly. But I have a good excuse (I think), I’ve been experimenting with a plugin system.

Viewing 6 reply threads
  • You must be logged in to reply to this topic.
Glenn's Page