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

error with example #429

Open
vaibhavdaren opened this issue Jun 7, 2018 · 13 comments
Open

error with example #429

vaibhavdaren opened this issue Jun 7, 2018 · 13 comments
Labels

Comments

@vaibhavdaren
Copy link
Contributor

The following example is running perfectly in firefox but it is not running in chrome
https://turtle.sugarlabs.org/index.html?id=1528262976123644&run=True

It is showing in the console log:-
error-eg

@vaibhavdaren
Copy link
Contributor Author

FireFox Version: 60.0.2 (64-bit)
Chrome Version: 67.0.3396.79 (Official Build) (64-bit)

@walterbender
Copy link
Member

Runs fine in chromium 66.
Can you please attach the entire console log (please select-all and paste it here rather than attaching a screen shot)? I think the error might be due to something happening earlier.

@vaibhavdaren
Copy link
Contributor Author

Here is the log.
undefined
/js/utils/platformstyle.js:29 On platform: Object
/js/sugarizer-compatibility.js:66 insideSugarizer? false
/js/activity.js:150 loaded
/lib/easeljs.min.js:12 Deprecated property or method 'Ticker.setFPS'. See docs for info.
(anonymous) @ /lib/easeljs.min.js:12
/js/utils/utils.js:346 adding palette external
/js/utils/utils.js:346 adding palette maths
/js/utils/utils.js:408 adding plugin block quote
/js/utils/utils.js:408 adding plugin block asin
/js/utils/utils.js:408 adding plugin block cos
/js/utils/utils.js:408 adding plugin block e
/js/utils/utils.js:408 adding plugin block atan
/js/utils/utils.js:408 adding plugin block power
/js/utils/utils.js:408 adding plugin block floor
/js/utils/utils.js:408 adding plugin block ceiling
/js/utils/utils.js:408 adding plugin block sin
/js/utils/utils.js:408 adding plugin block degrees
/js/utils/utils.js:408 adding plugin block tan
/js/utils/utils.js:408 adding plugin block pi
/js/utils/utils.js:408 adding plugin block acos
/js/utils/utils.js:408 adding plugin block radians
/js/activity.js:3554 hard stop turtle
/js/activity.js:3784 0.9619834710743802
/js/activity.js:1843 loading 1528262976123644
/js/activity.js:1327 overwriting session data
/js/activity.js:1271 loadRawProject [[0,["clear",{}],126.83333333333333,97.16666666666666,[1,33]],[1,["start",{"collapsed":true,"xcor":-161.5011853122574,"ycor":-99.05960173244944,"heading":15,"color":274,"shade":100,"pensize":88.5,"grey":100}],113.33333333333333,56.666666666666664,[null,0,null]],[2,["setcolor",{}],126.83333333333333,254.66666666666666,[36,3,4]],[3,["number",{"value":0}],212.02278645833331,254.66666666666666,[2]],[4,["setpensize",{}],126.83333333333333,286.16666666666663,[2,5,19]],[5,["number",{"value":20}],235.37972005208331,286.16666666666663,[4]],[6,["repeat",{}],126.83333333333333,380.66666666666663,[19,7,29,null]],[7,["number",{"value":1000}],198.83333333333331,380.66666666666663,[6]],[8,["pendown",{}],296.8333333333333,97.16666666666666,[37,9]],[9,["forward",{}],296.8333333333333,128.66666666666666,[8,10,38]],[10,["number",{"value":1}],375.3504231770833,128.66666666666666,[9]],[11,["penup",{}],296.8333333333333,191.66666666666666,[38,12]],[12,["forward",{}],296.8333333333333,223.16666666666666,[11,30,13]],[13,["right",{}],296.8333333333333,254.66666666666666,[12,14,22]],[14,["number",{"value":93}],370.3333333333333,254.66666666666666,[13]],[15,["plus",{}],374.5227864583333,317.6666666666667,[22,31,16]],[16,["number",{"value":1}],460.0227864583333,349.1666666666667,[15]],[17,["setcolor",{}],296.8333333333333,380.6666666666667,[18,32,41]],[18,["vspace",{}],296.8333333333333,349.1666666666667,[22,17]],[19,["storein",{}],126.83333333333333,317.66666666666663,[4,20,21,6]],[20,["text",{"value":"my box"}],204.52278645833331,317.66666666666663,[19]],[21,["number",{"value":0}],204.52278645833331,349.16666666666663,[19]],[22,["storein",{}],296.8333333333333,286.1666666666667,[13,23,15,18]],[23,["text",{"value":"my box"}],374.5227864583333,286.1666666666667,[22]],[24,["action",{"collapsed":true}],283.3333333333333,56.666666666666664,[null,25,37,null]],[25,["text",{"value":"dot"}],403.3333333333333,65.66666666666666,[24]],[26,["number",{"value":60}],212.02278645833331,128.66666666666666,[33]],[27,["number",{"value":100}],220.37972005208331,191.66666666666666,[34]],[28,["number",{"value":100}],208.69026692708331,160.16666666666666,[35]],[29,["nameddo",{"value":"dot"}],140.33333333333331,412.16666666666663,[6,null]],[30,["namedbox",{"value":"my box"}],375.3504231770833,223.16666666666666,[12]],[31,["namedbox",{"value":"my box"}],460.0227864583333,317.6666666666667,[15]],[32,["namedbox",{"value":"my box"}],382.0227864583333,380.6666666666667,[17]],[33,["setcolor",{}],126.83333333333333,128.66666666666666,[0,26,35]],[34,["setshade",{}],126.83333333333333,191.66666666666666,[35,27,36]],[35,["setgrey",{}],126.83333333333333,160.16666666666666,[33,28,34]],[36,["background",{}],126.83333333333333,223.16666666666666,[34,2]],[37,["hidden",{}],296.8333333333333,97.16666666666666,[24,8]],[38,["back",{}],296.8333333333333,160.16666666666666,[9,39,11]],[39,["number",{"value":1}],370.3333333333333,160.16666666666666,[38]],[40,["pensize",{}],370.3333333333333,412.1666666666667,[41]],[41,["increment",{}],296.8333333333333,412.1666666666667,[17,40,42,null]],[42,["number",{"value":0.25}],370.3333333333333,443.6666666666667,[41]],[43,["status",{"collapsed":true}],453.3333333333333,56.666666666666664,[null,44,50]],[44,["print",{}],466.8333333333333,97.16666666666666,[43,45,46]],[45,["x",{}],540.3333333333333,97.16666666666666,[44]],[46,["print",{}],466.8333333333333,128.66666666666666,[44,47,48]],[47,["y",{}],540.3333333333333,128.66666666666666,[46]],[48,["print",{}],466.8333333333333,160.16666666666666,[46,49,null]],[49,["heading",{}],540.3333333333333,160.16666666666666,[48]],[50,["hiddennoflow",{}],468.3333333333333,221.66666666666666,[43,null]],[51,1,[0,"clear"]],[52,1,[0,"setcolor",60]],[53,1,[0,"setgrey",100]],[54,1,[0,"setshade",100]],[55,1,[0,"setcolor",0]],[56,1,[0,"setpensize",20]],[57,1,[0,"pendown"]],[58,1,[0,"forward",1]],[59,1,[0,"forward",-1]],[60,1,[0,"penup"]],[61,1,[0,"forward",0]],[62,1,[0,"right",93]],[63,1,[0,"setcolor",1]],[64,1,[0,"setpensize",20.25]],[65,1,[0,"pendown"]],[66,1,[0,"forward",1]],[67,1,[0,"forward",-1]],[68,1,[0,"penup"]],[69,1,[0,"forward",1]],[70,1,[0,"right",93]],[71,1,[0,"setcolor",2]],[72,1,[0,"setpensize",20.5]],[73,1,[0,"pendown"]],[74,1,[0,"forward",1]],[75,1,[0,"forward",-1]],[76,1,[0,"penup"]],[77,1,[0,"forward",2]],[78,1,[0,"right",93]],[79,1,[0,"setcolor",3]],[80,1,[0,"setpensize",20.75]],[81,1,[0,"pendown"]],[82,1,[0,"forward",1]],[83,1,[0,"forward",-1]],[84,1,[0,"penup"]],[85,1,[0,"forward",3]],[86,1,[0,"right",93]],[87,1,[0,"setcolor",4]],[88,1,[0,"setpensize",21]],[89,1,[0,"pendown"]],[90,1,[0,"forward",1]],[91,1,[0,"forward",-1]],[92,1,[0,"penup"]],[93,1,[0,"forward",4]],[94,1,[0,"right",93]],[95,1,[0,"setcolor",5]],[96,1,[0,"setpensize",21.25]],[97,1,[0,"pendown"]],[98,1,[0,"forward",1]],[99,1,[0,"forward",-1]],[100,1,[0,"penup"]],[101,1,[0,"forward",5]],[102,1,[0,"right",93]],[103,1,[0,"setcolor",6]],[104,1,[0,"setpensize",21.5]],[105,1,[0,"pendown"]],[106,1,[0,"forward",1]],[107,
/js/turtle.js:1162 adding a new turtle start
/js/blocks.js:4229 Finished block loading
/js/activity.js:3008 zoom level is not 100%: 1364 !== 1360
/js/blocks.js:4135 playbackQueue: remapping from 1 to 0
/js/activity.js:2838 calling toggleCollapsibles
/js/activity.js:2913 Running Project from Event
/js/activity.js:2838 calling toggleCollapsibles
/js/logo.js:8049 play
/js/activity.js:2916 Run
/js/activity.js:581 stopping...
/js/logo.js:589 SHOW BLOCKS
/js/activity.js:585 and running
/js/activity.js:1327 overwriting session data
/js/logo.js:1185 Uncaught TypeError: Cannot read property 'init' of null
at Logo.runLogoCommands (/js/logo.js:1185)
at /js/activity.js:586
/js/activity.js:571 running
/js/activity.js:1327 overwriting session data
/js/logo.js:1185 Uncaught TypeError: Cannot read property 'init' of null
at Logo.runLogoCommands (/js/logo.js:1185)
at _doFastButton (/js/activity.js:573)
at a.__pressupFunction (/js/activity.js:4105)
at /lib/easeljs.min.js:12
at a.b._dispatchEvent (/lib/easeljs.min.js:12)
at a.b._dispatchEvent (/lib/easeljs.min.js:12)
at a.b.dispatchEvent (/lib/easeljs.min.js:12)
at a.b._dispatchMouseEvent (/lib/easeljs.min.js:13)
at a.b._handlePointerUp (/lib/easeljs.min.js:13)
at a.b._handleMouseUp (/lib/easeljs.min.js:13)
/js/logo.js:589 SHOW BLOCKS
/js/activity.js:3554 hard stop turtle

@walterbender
Copy link
Member

I think I see what is going on. It seems to be related to the auto launch of the status matrix.

@vaibhavdaren
Copy link
Contributor Author

Yes the execution of the program begins with start block but somewhere in between the status matrix is launched which stops the running code in turtle blocks and shows the error "Cannot read property 'init' of null" in the console log when we run again. To correct this, I think we have to make the order of execution such that first the status block part of the code executes before the start block part of code.

@walterbender
Copy link
Member

Could you please test again? I made sure that the widget is created before trying to initialize it.

@vaibhavdaren
Copy link
Contributor Author

sometimes it runs fine, occasionally it is giving an error. I am not able to figure out exactly why.

@walterbender
Copy link
Member

Can you please post the console.log file for when it doesn't work?

@vaibhavdaren
Copy link
Contributor Author

[1] when the project is working
Working.log
[2]when the project is not working
NotWorking.log
"these are the complete log"

@walterbender
Copy link
Member

What version of Turtle are you using? (I ask because the line numbers reported in the console output don't match any version I have and it seems that they are from a version that does not have my patch to fix this bug).

@vaibhavdaren
Copy link
Contributor Author

p5.sound.min.js:3 The Web Audio autoplay policy will be re-enabled in Chrome 70 (October 2018). Please check that your website is compatible with it. https://goo.gl/7K7WLu
(anonymous) @ p5.sound.min.js:3
p5.sound.min.js:3 The Web Audio autoplay policy will be re-enabled in Chrome 70 (October 2018). Please check that your website is compatible with it. https://goo.gl/7K7WLu
(anonymous) @ p5.sound.min.js:3
/js/activity.js:54 undefined
/js/utils/platformstyle.js:29 On platform:  Object
howler.js:21 The Web Audio autoplay policy will be re-enabled in Chrome 70 (October 2018). Please check that your website is compatible with it. https://goo.gl/7K7WLu
(anonymous) @ howler.js:21
/js/sugarizer-compatibility.js:66 insideSugarizer? false
/js/activity.js:150 loaded
/js/activity.js:1078 UtilityBox
/js/activity.js:1090 Uncaught TypeError: utilityBox.setStage(...).setRefreshCanvas(...).setBigger(...).setSmaller(...).setPlugins(...).deletePlugins(...).setStats(...).setSearch(...).setScroller(...).setLanguage(...).setOptimize is not a function
    at init (/js/activity.js:1090)
    at domReady (/js/activity.js:944)
    at /js/activity.js:151
    at Object.execCb (require.js:1604)
    at Module.check (require.js:844)
    at Module.<anonymous> (require.js:1084)
    at require.js:129
    at require.js:1127
    at each (require.js:57)
    at Module.emit (require.js:1126)
2/js/activity.js:2872 Uncaught TypeError: Cannot read property 'visible' of null
    at Logo.onStopTurtle (/js/activity.js:2872)
    at Logo.doStopTurtle (/js/logo.js:581)
    at doHardStopButton (/js/activity.js:696)
    at window.onblur (/js/activity.js:299)


@walterbender
Copy link
Member

I cannot reproduce this bug on Chromium (67.0.3396.79). What version of Chrome are you using? I assume you are using turtle.sugarlabs.org?

@vaibhavdaren
Copy link
Contributor Author

Version 68.0.3440.106 (Official Build) (64-bit)
Yes I am using turtle.sugarlabs.org

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants