Code Monkey home page Code Monkey logo

Comments (4)

josmas avatar josmas commented on July 24, 2024

Hi @puravidaapps thanks again for the report. Does it happen to you 100% of the time? I was able to reproduce it once, but only once... need to find a more consistent way of making it happen. When you say 'rename Web2 by Web1' you mean just switching it in the call block, right?
Do you use the save button at any stage in the process?

from appinventor-sources.

puravidaapps avatar puravidaapps commented on July 24, 2024

I can reproduce it easily. I simplified the example for you: create a project with 2 buttons and drag a "when Button2.Click" block out in the blocks editor
1
then switch it in the "when Button2.Click" block to "when Button1.Click"
2
and click Save, then delete the Button2 component, click Save, open another project and come back, you will get the error [ERROR] Error loading blocks for screen 5559130790035456_Screen1: : Error: "Button2_Click" is an unknown language block. and the block "when Button1.Click" disappeared


[INFO] DesignToolbar: switching to existing project bug22 with id 5559130790035456
[INFO] Setting currentScreen to Screen1
[INFO] ProjectEditor: got selectFileEditor for src/appinventor/ai_taifunbaer/bug22/Screen1.scm selectedFileEditor is null
[INFO] YaFormEditor: got onShow() for src/appinventor/ai_taifunbaer/bug22/Screen1.scm
[INFO] Ode: Setting current file editor to src/appinventor/ai_taifunbaer/bug22/Screen1.scm
[INFO] Saving global settings: {"GeneralSettings":{"CurrentProjectId":"5559130790035456"},"SimpleSettings":{}}
[INFO] Adding blocks editor as a listener for Screen1
[INFO] initBlocksArea: killed running timer.
[INFO] BlocklyPanel: Got initBlocksArea call for 5559130790035456_Screen1
[INFO] Restoring 0 previous blockly components for form 5559130790035456_Screen1
[INFO] Replaying 1 ops waiting in queue
[INFO] Loading blocks area content for 5559130790035456_Screen1
[INFO] Saving project settings: {"SimpleSettings":{"Icon":"","ShowHiddenComponents":"False","VersionCode":"1","VersionName":"1.0","UsesLocation":"False"}}
[INFO] Got blocks area changed for 5559130790035456_Screen1
[INFO] Setting currentScreen to Screen1
[INFO] ProjectEditor: got selectFileEditor for src/appinventor/ai_taifunbaer/bug22/Screen1.bky selectedFileEditor is src/appinventor/ai_taifunbaer/bug22/Screen1.scm
[INFO] YaFormEditor: got onHide() for src/appinventor/ai_taifunbaer/bug22/Screen1.scm
[INFO] Setting current file editor to null
[INFO] YaBlocksEditor: got onShow() for src/appinventor/ai_taifunbaer/bug22/Screen1.bky
[INFO] Ode: Setting current file editor to src/appinventor/ai_taifunbaer/bug22/Screen1.bky
[INFO] Saving global settings: {"GeneralSettings":{"CurrentProjectId":"5559130790035456"},"SimpleSettings":{}}
[INFO] showDifferentForm changing from 5559130790035456_Screen1 to 5559130790035456_Screen1
[INFO] Starting timer for 5559130790035456_Screen1
[INFO] Got blocks area changed for 5559130790035456_Screen1
[INFO] AssetManager: formName = 5559130790035456_Screen1
[INFO] Showing item Button2
[INFO] AssetManager: formName = 5559130790035456_Screen1
[INFO] Got blocks area changed for 5559130790035456_Screen1
[INFO] Got blocks area changed for 5559130790035456_Screen1
[INFO] Got blocks area changed for 5559130790035456_Screen1
[INFO] AssetManager: formName = 5559130790035456_Screen1
[INFO] AssetManager: formName = 5559130790035456_Screen1
[INFO] AssetManager: formName = 5559130790035456_Screen1
[INFO] AssetManager: formName = 5559130790035456_Screen1
[INFO] AssetManager: formName = 5559130790035456_Screen1
[INFO] AssetManager: formName = 5559130790035456_Screen1
[INFO] AssetManager: formName = 5559130790035456_Screen1
[INFO] AssetManager: formName = 5559130790035456_Screen1
[INFO] AssetManager: formName = 5559130790035456_Screen1
[INFO] AssetManager: formName = 5559130790035456_Screen1
[INFO] AssetManager: formName = 5559130790035456_Screen1
[INFO] AssetManager: formName = 5559130790035456_Screen1
[INFO] Got blocks area changed for 5559130790035456_Screen1
[INFO] AssetManager: formName = 5559130790035456_Screen1
[INFO] Got blocks area changed for 5559130790035456_Screen1
[INFO] AssetManager: formName = 5559130790035456_Screen1
[INFO] AssetManager: formName = 5559130790035456_Screen1
[INFO] Got blocks area changed for 5559130790035456_Screen1
[INFO] Got blocks area changed for 5559130790035456_Screen1
[INFO] Got blocks area changed for 5559130790035456_Screen1
[INFO] AssetManager: formName = 5559130790035456_Screen1
[INFO] AssetManager: formName = 5559130790035456_Screen1
[INFO] AssetManager: formName = 5559130790035456_Screen1
[INFO] AssetManager: formName = 5559130790035456_Screen1
[INFO] AssetManager: formName = 5559130790035456_Screen1
[INFO] AssetManager: formName = 5559130790035456_Screen1
[INFO] AssetManager: formName = 5559130790035456_Screen1
[INFO] AssetManager: formName = 5559130790035456_Screen1
[INFO] Got blocks area changed for 5559130790035456_Screen1
[INFO] AssetManager: formName = 5559130790035456_Screen1
[INFO] AssetManager: formName = 5559130790035456_Screen1
[INFO] AssetManager: formName = 5559130790035456_Screen1
[INFO] AssetManager: formName = 5559130790035456_Screen1
[INFO] AssetManager: formName = 5559130790035456_Screen1
[INFO] AssetManager: formName = 5559130790035456_Screen1
[INFO] ProjectEditor:clearLocation: clearing Button2
[INFO] ProjectEditor:recomputeLocationPermission: False
[INFO] AssetManager: formName = 5559130790035456_Screen1
[INFO] AssetManager: formName = 5559130790035456_Screen1
[INFO] AssetManager: formName = 5559130790035456_Screen1
[INFO] AssetManager: formName = 5559130790035456_Screen1
[INFO] AssetManager: formName = 5559130790035456_Screen1
[INFO] AssetManager: formName = 5559130790035456_Screen1
[INFO] AssetManager: formName = 5559130790035456_Screen1
[INFO] AssetManager: formName = 5559130790035456_Screen1
[INFO] AssetManager: formName = 5559130790035456_Screen1
[INFO] AssetManager: formName = 5559130790035456_Screen1
[INFO] AssetManager: formName = 5559130790035456_Screen1
[INFO] ViewerBox: switching the content in the viewer box
[INFO] YaProjectEditor: got onUnload
[INFO] ProjectEditor: got onUnload for project 5559130790035456
[INFO] YaProjectEditor: got onHide
[INFO] AssetList: switching projects from 5559130790035456 to 0
[INFO] AssetList: refreshing for project 0
[INFO] YaBlocksEditor: got onHide() for src/appinventor/ai_taifunbaer/bug22/Screen1.bky
[INFO] Setting current file editor to null
[INFO] BlocklyEditor: prepared for reinit for form 5559130790035456_Screen1
[INFO] ProjectEditor: got onLoad for project 4644337115725824
[INFO] YaProjectEditor got onShow() for project 4644337115725824
[INFO] AssetList: switching projects from 0 to 4644337115725824
[INFO] AssetList: refreshing for project 4644337115725824
[INFO] DesignToolbar: switching to existing project test1 with id 4644337115725824
[INFO] Setting currentScreen to Screen1
[INFO] ProjectEditor: got selectFileEditor for src/appinventor/ai_taifunbaer/test1/Screen1.bky selectedFileEditor is src/appinventor/ai_taifunbaer/test1/Screen1.bky
[INFO] YaBlocksEditor: got onShow() for src/appinventor/ai_taifunbaer/test1/Screen1.bky
[INFO] Ode: Setting current file editor to src/appinventor/ai_taifunbaer/test1/Screen1.bky
[INFO] Saving global settings: {"GeneralSettings":{"CurrentProjectId":"4644337115725824"},"SimpleSettings":{}}
[INFO] showDifferentForm changing from 4644337115725824_Screen1 to 4644337115725824_Screen1
[INFO] timerForm changed, killing running timer.
[INFO] Starting timer for 4644337115725824_Screen1
[INFO] Got blocks area changed for 4644337115725824_Screen1
[INFO] AssetManager: Loading assets for 4644337115725824
[INFO] initBlocksArea: killed running timer.
[INFO] BlocklyPanel: Got initBlocksArea call for 4644337115725824_Screen1
[INFO] Restoring 1 previous blockly components for form 4644337115725824_Screen1
[INFO] Replaying 0 ops waiting in queue
[INFO] Loading blocks area content for 4644337115725824_Screen1
[INFO] Got blocks area changed for 4644337115725824_Screen1
[INFO] Starting timer for 4644337115725824_Screen1
[INFO] AssetManager: formName = 4644337115725824_Screen1
[INFO] AssetManager: formName = 4644337115725824_Screen1
[INFO] ViewerBox: switching the content in the viewer box
[INFO] YaProjectEditor: got onUnload
[INFO] ProjectEditor: got onUnload for project 4644337115725824
[INFO] YaProjectEditor: got onHide
[INFO] AssetList: switching projects from 4644337115725824 to 0
[INFO] AssetList: refreshing for project 0
[INFO] YaBlocksEditor: got onHide() for src/appinventor/ai_taifunbaer/test1/Screen1.bky
[INFO] Setting current file editor to null
[INFO] BlocklyEditor: prepared for reinit for form 4644337115725824_Screen1
[INFO] ProjectEditor: got onLoad for project 5559130790035456
[INFO] YaProjectEditor got onShow() for project 5559130790035456
[INFO] AssetList: switching projects from 0 to 5559130790035456
[INFO] AssetList: refreshing for project 5559130790035456
[INFO] DesignToolbar: switching to existing project bug22 with id 5559130790035456
[INFO] Setting currentScreen to Screen1
[INFO] ProjectEditor: got selectFileEditor for src/appinventor/ai_taifunbaer/bug22/Screen1.bky selectedFileEditor is src/appinventor/ai_taifunbaer/bug22/Screen1.bky
[INFO] YaBlocksEditor: got onShow() for src/appinventor/ai_taifunbaer/bug22/Screen1.bky
[INFO] Ode: Setting current file editor to src/appinventor/ai_taifunbaer/bug22/Screen1.bky
[INFO] Saving global settings: {"GeneralSettings":{"CurrentProjectId":"5559130790035456"},"SimpleSettings":{}}
[INFO] showDifferentForm changing from 5559130790035456_Screen1 to 5559130790035456_Screen1
[INFO] timerForm changed, killing running timer.
[INFO] Starting timer for 5559130790035456_Screen1
[INFO] Got blocks area changed for 5559130790035456_Screen1
[INFO] AssetManager: Loading assets for 5559130790035456
[INFO] initBlocksArea: killed running timer.
[INFO] BlocklyPanel: Got initBlocksArea call for 5559130790035456_Screen1
[INFO] Restoring 2 previous blockly components for form 5559130790035456_Screen1
[INFO] Replaying 0 ops waiting in queue
[INFO] Loading blocks area content for 5559130790035456_Screen1
[ERROR] Error loading blocks for screen 5559130790035456_Screen1: : Error: "Button2_Click" is an unknown language block.

from appinventor-sources.

josmas avatar josmas commented on July 24, 2024

Hi Taifun; thanks again. I believe I know what's happening, but it seems to be a race condition. I get it at times, but other times I do not (worst kind of bugs!).
Basically the Blocks Editor and Designer are out of sync for an short amount of time, and if the user loads a different project before they get a chance to get in sync, then the problem happens. We will look into it. Thanks!

from appinventor-sources.

josmas avatar josmas commented on July 24, 2024

fixed and pushed. Thanks!

from appinventor-sources.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.