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

Fix main window detection with IBGateway v978 #18

Merged
merged 3 commits into from
Jul 28, 2020

Conversation

StefanoRaggi
Copy link
Contributor

@StefanoRaggi StefanoRaggi commented Jun 22, 2020

The main window was occasionally not detected properly, causing initialization failure (with IBGateway v978).

A previous fix for this issue was merged in #13, but it was still possible to consistently repeat the issue.

With IBGateway v978 apparently something changed in the initial loading of the windows which made our current logic unreliable.

This is the failing case:
the main window is set here:
https://github.com/QuantConnect/IBAutomater/pull/18/files#diff-f99616d61473f68c66c3e17455eb4339L227
but this line returns null:
https://github.com/QuantConnect/IBAutomater/pull/18/files#diff-f99616d61473f68c66c3e17455eb4339L261

With the new simplified logic, the main window detection is all done in a single method and this check is now always returning true:
https://github.com/QuantConnect/IBAutomater/pull/18/files#diff-f99616d61473f68c66c3e17455eb4339R230

Tested with both v974 and v978

- Tested with both v974 and v978
StefanoRaggi added a commit to QuantConnect/Lean that referenced this pull request Jun 22, 2020
StefanoRaggi added a commit to QuantConnect/Lean that referenced this pull request Jun 25, 2020
The main window might not be completely initialized when the "Starting application" splash window is closed so we start a task and wait 5 seconds maximum for the window to be ready.
StefanoRaggi added a commit to QuantConnect/Lean that referenced this pull request Jun 26, 2020
StefanoRaggi added a commit to QuantConnect/Lean that referenced this pull request Jul 2, 2020
StefanoRaggi added a commit to QuantConnect/Lean that referenced this pull request Jul 2, 2020
@Martin-Molinero Martin-Molinero merged commit f8f9f01 into master Jul 28, 2020
@StefanoRaggi StefanoRaggi deleted the v978-main-window-detection-fix branch July 29, 2020 11:43
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.

None yet

2 participants