[Bug]: Race Condition in stacker
This issue respects the following points:
- [X] This is a bug, not a question or a configuration issue; Please visit our forum first to troubleshoot with volunteers, before creating a report. The links can be found here.
- [X] This issue is not already reported on GitHub (I've searched it).
- [X] I'm using an up to date version of OpenBullet2. We generally do not support previous older versions. If possible, please update to the latest version before opening an issue.
- [X] I agree to follow OpenBullet's Code of Conduct.
- [X] This report addresses only a single issue; If you encounter multiple issues, kindly create separate reports for each one.
Description of the bug
When you make changes on config and click debug in stacker but for some reason its keeps old inputs and change will be affected on second clicking on debug
Reproduction steps
Make changes to config, click debug and see if changes are affected or not
What is the current bug behavior?
.
What is the expected correct behavior?
To have changes saved on clicking debug
Version of the client
0.3.1
Type of client
Web client
Environment
- OS: Windows 10
- Virtualization:
- Browser: Chrome
OpenBullet2 logs
No response
Client / Browser logs
No response
Relevant screenshots or videos
No response
Relevant LoliCode if needed
No response
Additional information
No response
angular moment
It's because the config is saved upon blur of the input elements, so the request to start debugging might sometimes come first if you directly click on the Debug button without first clicking elsewhere, we just need to add an additional save request before starting the debugger, and then start the debugger upon its completion. This could be a good first issue for a new contributor.
I cannot reproduce this, tried multiple times. Also, the code already seems to be doing exactly that, so I don't know what may be causing this.
https://github.com/openbullet/OpenBullet2/blob/1fdd1d439704d850ad8723dab4023bd0653f5ab7/openbullet2-web-client/src/app/main/components/config/config-debugger/config-debugger.component.ts#L176-L187
I will close this, if you can find a way to reliably reproduce it (maybe on some specific input elements) please reopen.
Maybe this just needs a setTimeout to execute the above code on the next render frame so that the blur is processed correctly, who knows.