storyboard-fountain icon indicating copy to clipboard operation
storyboard-fountain copied to clipboard

Stats crash on Linux x64 with single storyboard (with patch)

Open jbuchbinder opened this issue 10 years ago • 0 comments

Got this errors when trying to view stats on Linux x64 build:

[24711:1231/115544:INFO:CONSOLE(1665)] "Uncaught TypeError: Cannot read property 'elementsCount' of undefined", source: file:///tmp/.org.chromium.Chromium.2MyYKo/js/fountainmanager.js (1665)

The following patch seems to stop the crash, but messes up some of the stats:

diff --git a/node-webkit-src/js/fountainmanager.js b/node-webkit-src/js/fountain
index 1e4c6ff..307bd44 100644
--- a/node-webkit-src/js/fountainmanager.js
+++ b/node-webkit-src/js/fountainmanager.js
@@ -1651,8 +1651,8 @@ function hexToRgb(hex) {
     var elementsCount = 0;
     var currentScene = 0;
     for (var i=0; i<objects.length; i++) {
+      if (typeof sceneStats[objects[i].scene-1] == 'undefined') { sceneStats[ob
       if (currentScene != objects[i].scene) {
-        if (typeof sceneStats[objects[i].scene-1] == 'undefined') { sceneStats[
         sceneStats[objects[i].scene-1]["elementsCount"] = 0;
         currentScene = objects[i].scene;
       }

jbuchbinder avatar Dec 31 '14 17:12 jbuchbinder