Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PlusVersion sometimes returns --short output even when not specified #593

Open
jamesobutler opened this issue Sep 6, 2019 · 3 comments
Open

Comments

@jamesobutler
Copy link
Contributor

Occasionally I have noticed that calling PlusVersion.exe will result in the "Supported Devices" output being missing as though I specified the "--short" command line argument.

Does the initialization method have something to do with this? I never accidentally get "--help" output.

bool printHelp(false);
bool printShortVersionInfo=false;

I also only get this error only when using Plus packages downloaded from the Plus website. I can't replicate using my personal PlusBuild. Maybe related to build tools that were used? I used Visual Studio 2019 with the v140 toolset. Testing on Windows 10.

Here's a test script that I've been using with my system python 3. Sometimes I have to run this a few times when set to 100 iterations.

path = "C:/Program Files/PlusApp-2.8.0/bin/PlusVersion.exe"
for i in range(100):
    import subprocess
    startup_info = subprocess.STARTUPINFO()
    startup_info.dwFlags |= subprocess.STARTF_USESHOWWINDOW  # hide window
    out_raw = subprocess.check_output(path, stderr=subprocess.PIPE, shell=False, startupinfo=startup_info)
    out = out_raw.decode("utf-8")
    lines = out.split('\n')
    lines = [line.rstrip() for line in lines]
    supported_devices = False
    for line in lines:
        if "Supported devices" in line:
            supported_devices = True
    if not supported_devices:
        print(i)
        print(out_raw)
        print(lines)
@jamesobutler
Copy link
Contributor Author

I'm specifically using the 64-bit PlusApp stable 2.8.0 package from the website. The 32-bit PlusApp package takes a while for PlusVersion.exe to output probably because of the additional built-in devices.

@Sunderlandkyl
Copy link
Contributor

Sunderlandkyl commented Sep 6, 2019

Interesting. I've ran the python script a couple of times with 1000 iterations, but I haven't experienced this behavior yet.

Edit: I am also using the Plus 2.8.0-64 bit package.

@jamesobutler
Copy link
Contributor Author

jamesobutler commented Sep 6, 2019

hmm weird that you didn't encounter it. Here's my output when running 1000 iterations.

PS C:\Users\JamesButler\Desktop> python plus_version_test.py                                                            441
b'System start timestamp: 86658\r\nSoftware version: Plus-2.8.0.283830c3 - Win64\r\n'
['System start timestamp: 86658', 'Software version: Plus-2.8.0.283830c3 - Win64', '']
477
b'System start timestamp: 86677\r\nSoftware version: Plus-2.8.0.283830c3 - Win64\r\n'
['System start timestamp: 86677', 'Software version: Plus-2.8.0.283830c3 - Win64', '']
557
b'System start timestamp: 86720\r\nSoftware version: Plus-2.8.0.283830c3 - Win64\r\n'
['System start timestamp: 86720', 'Software version: Plus-2.8.0.283830c3 - Win64', '']
579
b'System start timestamp: 86732\r\nSoftware version: Plus-2.8.0.283830c3 - Win64\r\n'
['System start timestamp: 86732', 'Software version: Plus-2.8.0.283830c3 - Win64', '']
582
b'System start timestamp: 86733\r\nSoftware version: Plus-2.8.0.283830c3 - Win64\r\n'
['System start timestamp: 86733', 'Software version: Plus-2.8.0.283830c3 - Win64', '']
597
b'System start timestamp: 86741\r\nSoftware version: Plus-2.8.0.283830c3 - Win64\r\n'
['System start timestamp: 86741', 'Software version: Plus-2.8.0.283830c3 - Win64', '']
650
b'System start timestamp: 86770\r\nSoftware version: Plus-2.8.0.283830c3 - Win64\r\n'
['System start timestamp: 86770', 'Software version: Plus-2.8.0.283830c3 - Win64', '']
671
b'System start timestamp: 86782\r\nSoftware version: Plus-2.8.0.283830c3 - Win64\r\n'
['System start timestamp: 86782', 'Software version: Plus-2.8.0.283830c3 - Win64', '']
714
b'System start timestamp: 86805\r\nSoftware version: Plus-2.8.0.283830c3 - Win64\r\n'
['System start timestamp: 86805', 'Software version: Plus-2.8.0.283830c3 - Win64', '']
720
b'System start timestamp: 86809\r\nSoftware version: Plus-2.8.0.283830c3 - Win64\r\n'
['System start timestamp: 86809', 'Software version: Plus-2.8.0.283830c3 - Win64', '']
725
b'System start timestamp: 86811\r\nSoftware version: Plus-2.8.0.283830c3 - Win64\r\n'
['System start timestamp: 86811', 'Software version: Plus-2.8.0.283830c3 - Win64', '']
757
b'System start timestamp: 86829\r\nSoftware version: Plus-2.8.0.283830c3 - Win64\r\n'
['System start timestamp: 86829', 'Software version: Plus-2.8.0.283830c3 - Win64', '']
763
b'System start timestamp: 86832\r\nSoftware version: Plus-2.8.0.283830c3 - Win64\r\n'
['System start timestamp: 86832', 'Software version: Plus-2.8.0.283830c3 - Win64', '']
773
b'System start timestamp: 86837\r\nSoftware version: Plus-2.8.0.283830c3 - Win64\r\n'
['System start timestamp: 86837', 'Software version: Plus-2.8.0.283830c3 - Win64', '']
823
b'System start timestamp: 86863\r\nSoftware version: Plus-2.8.0.283830c3 - Win64\r\n'
['System start timestamp: 86863', 'Software version: Plus-2.8.0.283830c3 - Win64', '']
834
b'System start timestamp: 86870\r\nSoftware version: Plus-2.8.0.283830c3 - Win64\r\n'
['System start timestamp: 86870', 'Software version: Plus-2.8.0.283830c3 - Win64', '']
860
b'System start timestamp: 86884\r\nSoftware version: Plus-2.8.0.283830c3 - Win64\r\n'
['System start timestamp: 86884', 'Software version: Plus-2.8.0.283830c3 - Win64', '']
871
b'System start timestamp: 86890\r\nSoftware version: Plus-2.8.0.283830c3 - Win64\r\n'
['System start timestamp: 86890', 'Software version: Plus-2.8.0.283830c3 - Win64', '']
874
b'System start timestamp: 86892\r\nSoftware version: Plus-2.8.0.283830c3 - Win64\r\n'
['System start timestamp: 86892', 'Software version: Plus-2.8.0.283830c3 - Win64', '']

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants