Metadata
- Source
- SJRK-255
- Type
- Bug
- Priority
- Major
- Status
- Closed
- Resolution
- Fixed
- Assignee
- N/A
- Reporter
- Gregor Moss
- Created
2019-07-15T12:36:14.055-0400 - Updated
2020-02-13T16:00:46.928-0500 - Versions
- N/A
- Fixed Versions
- N/A
- Component
-
- Storytelling Tool UI
Description
NOTE: This may be a duplicate / the same root cause as SJRK-234
A race condition present in sjrk.storyTelling.base.page is blocking properly-functioning tests for both sjrk.storyTelling.loadStoryFromParameter and sjrk.storyTelling.loadBrowse (both in storyTellingServerUI.js).
These tests were meant to be added alongside the changes described in SJRK-237, but the work required to remediate them would be substantial, hence this Jira.
To reproduce:
- check out this branch: https://github.com/BlueSlug/sjrk-story-telling/tree/SJRK-255 (at commit cf3c37c, ideally)
- run the database server (instructions in README)
- run the webserver
- navigate to http://localhost:8081/tests/html/storyTellingServerUI-Tests.html
Expected: all tests passing, no errors
Actual: sometimes tests pass, sometimes they fail with error
On Windows 10 Pro v.1903:
- running Chrome 75, the error was not reported after 100 loads
- Firefox 68 failed 92% of the time with this message:
TypeError: text is undefinedfluidParser.js:420:8 XMLEncode fluidParser.js:420 renderComponent fluidRenderer.js:980 renderComponentSystem fluidRenderer.js:1139 renderRecurse fluidRenderer.js:1327 renderTemplates fluidRenderer.js:1405 reRender fluidRenderer.js:1488 render fluidRenderer.js:1555 render RendererUtilities.js:104 refreshView RendererUtilities.js:178 invokeInvoker FluidIoC.js:1749 togo FluidIoC.js:1813 fire Fluid.js:1596 finishInit PrefsEditor.js:469 then FluidPromises.js:33 finishInit PrefsEditor.js:467 init PrefsEditor.js:488
- Edge 44 failed 59% of the time with this error message
0: Unable to get property 'replace' of undefined or null reference
Comments
-
Antranig Basman commented
2019-07-17T16:43:44.247-0400 Could you describe in a little more detail what the race condition is and what components it involves? In your pull request https://github.com/fluid-project/sjrk-story-telling/pull/33 you mention "race condition relating to a bug with UIO implementation" - is the bug actually in the UIO implementation itself, and if so, has a JIRA been filed for that?
-
Gregor Moss commented
2019-07-18T13:42:32.721-0400 Antranig Basman of course. This branch should capture the bug: https://github.com/BlueSlug/sjrk-story-telling/commits/SJRK-237-race-condition
Once you have the server and database running, you should be able to reproduce it by running the tests on this page:
http://localhost:8081/tests/html/storyTellingServerUI-Tests.htmlThe bug involves the last two sequence items (see the latest commit for the relevant code). I haven't been able to reproduce it today, for some reason, even after a few dozen tries, so that's mildly perplexing.
-
Gregor Moss commented
2019-08-01T16:29:52.489-0400 @@Antranig Basman I've added more detail on reproduction and error messages received. Sorry for the delay 🙂
-
Antranig Basman commented
2019-08-05T06:40:02.225-0400 Hi @@Gregor Moss - thanks for the reproduction instructions, luckily it turns out I can reproduce the problem quite easily. I'm investigating the root cause which appears to be the message bundle not loading correctly for 2nd and subsequent UIO instances but in the meantime I've raised https://github.com/fluid-project/sjrk-story-telling/pull/35 in which to accumulate suggestions for refactoring. My sense is at the moment there is a fault in the very-oldfashioned resource loading code in Infusion master, which is being exacerbated by there being a lot of component leaks in the SJRK implementation. Once I find the root cause of the race we should be able to patch it in Infusion but at the same time we should also head off the issue by removing the leaks in SJRK which should also result in better performance and a design that is easier to work with.
-
Cindy Li commented
2020-01-22T16:43:55.406-0500 The pull request has been merged into stories-floe-dev branch at this commit so @@Gregor Moss can build upon them for other Jiras.
The initial pull request against re-review branch is preserved in order to accommodate further review on the source branch by @@Antranig Basman or others.