Skip to content

Conversation

@klown
Copy link
Member

@klown klown commented Oct 30, 2017

Modified the C# ("dotNetProcesses.csx") to handle the exception where the process has exited while fetching information about it, specifically its process ID.

Modified C# code to handle the exception and not add the process to the
list of running processes.
@gpii-bot
Copy link

CI job failed: https://ci.gpii.net/job/windows-tests/317/

@klown
Copy link
Member Author

klown commented Oct 30, 2017

ok to test

@gpii-bot
Copy link

CI job passed: https://ci.gpii.net/job/windows-tests/318/

@klown
Copy link
Member Author

klown commented Nov 6, 2017

@amb26 Since you so kindly reviewed the original ProcessReporter pull requests, could you have a look at this, when/if you have time? Thanks!

}

public static ProcInfo makeProcInfo(ManagementObject process) {
public static void makeAndApprendProcInfo(ManagementObject processMO, ArrayList procInfos) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apprend?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At least the error was consistent. Copy/paste is your friend. Or, enemy.

case ThreadState.Standby:
case ThreadState.Transition:
procInfo.state = "Sleeping";
break;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some tab characters, before "case" on 106-111

Copy link
Member Author

@klown klown Nov 9, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oddly, I cannot find these tabs in my local copy of the code. I'm going to chance it, push the changes for the "apprende" error, and see if these tabs simply go away.

Thanks, @stegru and @amb26 !

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't get these tabs on checkout of this code, but it could be my editor being nice

@stegru
Copy link
Member

stegru commented Nov 9, 2017

Looks good to me.

I couldn't reproduce this naturally, so I changed the code to Process.GetProcessById(pid + 1), and it no longer crashed - and isn't in the list as expected.

Modified to address Steve Grundell's comments.
@klown
Copy link
Member Author

klown commented Nov 9, 2017

@stegru wrote:

I couldn't reproduce this naturally, so I changed the code to Process.GetProcessById(pid + 1), and it no longer crashed - and isn't in the list as expected.

Yes, I couldn't make the exception happen. The only reason I found out about it was CI, and, even there, it failed only on two occasions.

@gpii-bot
Copy link

gpii-bot commented Nov 9, 2017

CI job passed: https://ci.gpii.net/job/windows-tests/319/

@kaspermarkus
Copy link
Member

I was able to reproduce the issue quite consistently (every 3rd login or so) as described here: https://issues.gpii.net/browse/GPII-2777 .... It disappeared once I merge with this branch.

@klown
Copy link
Member Author

klown commented Jan 16, 2018

@kaspermarkus I had a chat with @stegru in #fluid-tech, and he is satisfied with this code, but he doesn't have the authority to merge it into master:

stegru> ok, well, you'll have to ask one of the gatekeepers to merge it in - kasparnet is obviously happy with it because he's used it

@kaspermarkus kaspermarkus merged commit df46eb3 into GPII:master Jan 17, 2018
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

Successfully merging this pull request may close these issues.

5 participants