Closed jgstew closed 7 years ago
If I had to guess, I'd say the results from properties
is overflowing a buffer or something, or just returning a too large result.
This does work: properties whose(it as string contains "client")
This returns a subset of the results of properties
which suggests this is an issue of a result that is too large.
On windows, the properties
command returns about 116537 characters.
This crash happens at or after line 82 here: https://github.com/rustymyers/QnAGUI/blob/master/QnA/ViewController.swift#L82
I set breakpoints on all of the lines around here and stepped through them in the debugger and QnA GUI seemed to hang on Line #82
I feel like this: task.waitUntilExit()
or this: outpipe.fileHandleForReading.readDataToEndOfFile()
are the most likely culprits.
Latest commit resolves this issue. Disabled the task.waitUntilExit method and it seems to work fine. No real memory or cpu/thread run aways.
Interesting. I guess I should have tried that. I wonder if there is some sort of drawback or alternative. to .waitUntilExit()
Fixed by this: https://github.com/rustymyers/QnAGUI/blob/8a3bf5619fa24ec4b196f9161defb5c2aca01a0a/QnA/ViewController.swift#L84
In this commit: https://github.com/rustymyers/QnAGUI/commit/8a3bf5619fa24ec4b196f9161defb5c2aca01a0a
Also, I wonder what the value is to Updating deployment target to 10.10
other queries seem to work fine, but if I try to evaluate
properties
, which has a very large result, QnA GUI crashes.Not sure if it always did this.