-
Notifications
You must be signed in to change notification settings - Fork 2
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
Adding and removing the same view twice causes application to crash #402
Comments
I can reproduce this error in my tests. I could even shorten it by omitting the selection in the copy number ranking. The interesting fact is that only replacing the view (i.e., without add + remove before) works, but with adding and removing it breaks. My assumption is that the ordino/src/internal/ViewWrapper.ts Line 120 in a665c47
I investigate this hypothesis and see if this is the cause. |
I extended the function generateHash(desc: IPluginDesc, selection: ISelection) {
// const s = `${selection.idtype ? selection.idtype.id : ''}r${selection.ids}`;
const s = `${selection.idtype ? selection.idtype.id : ''}r${selection.ids}_${BaseUtils.randomId()}`;
return `${desc.id}_${s}`;
} It turns out that with the random hash replacing the view after add + remove is working successfully! So my initial assumption seems to be confirmed. Diffing the provenance graphs from before and after the change reveals that the object reference is not reused and the inverse action was added to the graph (which was previously not possible, due to the error within the replace action). ScreenshotsAdded random id Successfully added inverse action Reused object ref with id Exported provenance graphs
Follow-up questions
|
The lookup (and reusage) is done in Without the random id the same object with id
Most likely not. Hence, adding a random id is probably the only solution and we must check the effects as mentioned in question 1. |
I check further how and when this bug could have been introduced and I couldn't find any recent change that could cause this error. The Interestingly, the I applied the - this.ref = ObjectRefUtils.objectRef(this, plugin.desc.name, ObjectRefUtils.category.visual, generateHash(plugin.desc, selection));
+ this.ref = graph.findOrAddObject(ObjectRefUtils.objectRef(this, plugin.desc.name, ObjectRefUtils.category.visual, generateHash(plugin.desc, selection))); ScreenshotsThe interesting point here is that no additional object ref All following node ids are decreased by one, due to the missing object ref Exported provenance graphs
|
I've tested the compatibility with existing provenance graphs, by exporting a session from Ordino Daily (without the ref change) and imported it locally (with the ref change) again. Additionally I've tested the Ordino Paper Teaser Figure. In my tests all actions like add, remove, replace views work without problems. Also jumping to a specific state and the inverse actions work for me. I also imported the previously broken clue_add-remove-replace-fail.json.txt session and now Ordino continues and finishes the action to replace the view. The graph got extended by the previously missing inverse action. Users could continue that session now. |
Fixes #402 See GitHub issue for in-depth analysis and testing results.
* prepare next development version 12.0.1-SNAPSHOT * Fix ref in replace views w/ `findOrAddObject()` Fixes #402 See GitHub issue for in-depth analysis and testing results. * Add missing dist files * Use context to get current view name Fixes #254 * Remove `nav.mainNavi` styles (#415) I couldn't find any occurence or usage of the CSS class `mainNavi` in the TypeScript code of the phovea, Caleydo, or datavisyn organization, nor do know where this element would be. Hence, I would remove this code. * Prepare github changes * Remove circleci * prepare next dev version * Update fontawesome * refactor: Improve Cypress setup and use Cypress commands.js (#354) Co-authored-by: Florian Engertsberger <florian.engertsberger@datavisyn.io> Co-authored-by: Holger Stitz <holger.stitz@datavisyn.io> * feat: CLUE support for URL query parameter + refactor public session link (#419) Co-authored-by: oltionchampari <oltion.champari@datavisyn.io> * Add Visyn Scripts (#421) * Prepare visyn_script changes * Update package.json * Remove prepack script * Removed phovea_registry.js from package.json files * Update package.json * Update package.json * add depth * Update package.json * Update package.json * Update package.json * Update package.json * Update package.json * Update package.json * Update engine and prepare script * Add react resolutions and overrides * Remove react and react-dom from deps * add dist folder * Added resolutions like overrides * Fix wrongly formatted visyn_scripts git ssh link * Remove .git from git+ssh link to visyn_script * Add yarn-3.2.2 * Remove yarn-3.2.2 again * Add .yarnrc.yml * Add yarn-3.2.2 * Switch to visyn_scripts clean * Change d3 to d3v3 Co-authored-by: anita-steiner <> Co-authored-by: Anita Steiner <anita.steiner@datavisyn.io> Co-authored-by: Michael Puehringer <michael.puehringer@datavisyn.io> * Add dist/ folder (#423) * fix: Replace jQuery scrollTo plugin with custom implementation (#425) Replace jquery scrollTo plugin with custom impl * prepare release 13.0.0 Co-authored-by: Holger Stitz <holger.stitz@datavisyn.io> Co-authored-by: Champari Oltion <51322092+oltionchampari@users.noreply.github.com> Co-authored-by: Dominic Girardi <45822063+dg-datavisyn@users.noreply.github.com> Co-authored-by: anita-steiner <> Co-authored-by: Florian Engertsberger <florian.engertsberger@datavisyn.io> Co-authored-by: oltionchampari <oltion.champari@datavisyn.io> Co-authored-by: datavisyn-bot <32451285+datavisyn-bot@users.noreply.github.com> Co-authored-by: Anita Steiner <anita.steiner@datavisyn.io> Co-authored-by: Michael Puehringer <michael.puehringer@datavisyn.io> Co-authored-by: Thomas Schachinger <79898881+dvtschachinger@users.noreply.github.com>
* prepare next development version 12.0.1-SNAPSHOT * Fix ref in replace views w/ `findOrAddObject()` Fixes #402 See GitHub issue for in-depth analysis and testing results. * Add missing dist files * Use context to get current view name Fixes #254 * Remove `nav.mainNavi` styles (#415) I couldn't find any occurence or usage of the CSS class `mainNavi` in the TypeScript code of the phovea, Caleydo, or datavisyn organization, nor do know where this element would be. Hence, I would remove this code. * Prepare github changes * Remove circleci * prepare next dev version * Update fontawesome * refactor: Improve Cypress setup and use Cypress commands.js (#354) Co-authored-by: Florian Engertsberger <florian.engertsberger@datavisyn.io> Co-authored-by: Holger Stitz <holger.stitz@datavisyn.io> * feat: CLUE support for URL query parameter + refactor public session link (#419) Co-authored-by: oltionchampari <oltion.champari@datavisyn.io> * Add Visyn Scripts (#421) * Prepare visyn_script changes * Update package.json * Remove prepack script * Removed phovea_registry.js from package.json files * Update package.json * Update package.json * add depth * Update package.json * Update package.json * Update package.json * Update package.json * Update package.json * Update package.json * Update engine and prepare script * Add react resolutions and overrides * Remove react and react-dom from deps * add dist folder * Added resolutions like overrides * Fix wrongly formatted visyn_scripts git ssh link * Remove .git from git+ssh link to visyn_script * Add yarn-3.2.2 * Remove yarn-3.2.2 again * Add .yarnrc.yml * Add yarn-3.2.2 * Switch to visyn_scripts clean * Change d3 to d3v3 Co-authored-by: anita-steiner <> Co-authored-by: Anita Steiner <anita.steiner@datavisyn.io> Co-authored-by: Michael Puehringer <michael.puehringer@datavisyn.io> * Add dist/ folder (#423) * fix: Replace jQuery scrollTo plugin with custom implementation (#425) Replace jquery scrollTo plugin with custom impl * prepare next dev version * Improve typings for new session functions (#427) * Improve typings for new session functions datavisyn/ordino_eins#525 * Add `await` to `initSessionImpl` * Add `await` to init session and push view * Make `pushStartViewToSession` protected Required to call this function from extended OrdinoApp * prepare release 13.0.1 Co-authored-by: Holger Stitz <holger.stitz@datavisyn.io> Co-authored-by: Champari Oltion <51322092+oltionchampari@users.noreply.github.com> Co-authored-by: Dominic Girardi <45822063+dg-datavisyn@users.noreply.github.com> Co-authored-by: anita-steiner <> Co-authored-by: Florian Engertsberger <florian.engertsberger@datavisyn.io> Co-authored-by: oltionchampari <oltion.champari@datavisyn.io> Co-authored-by: datavisyn-bot <32451285+datavisyn-bot@users.noreply.github.com> Co-authored-by: Anita Steiner <anita.steiner@datavisyn.io> Co-authored-by: Michael Puehringer <michael.puehringer@datavisyn.io> Co-authored-by: Thomas Schachinger <79898881+dvtschachinger@users.noreply.github.com>
Environment
Steps to reproduce the bug
Observed Behavior
The application crashes and the views are unresponsive
Expected Behavior
User should be able to replace view
Screenshot
The text was updated successfully, but these errors were encountered: