taweili / ardublock

ArduBlock is a Block Programming Language for Arduino.
GNU General Public License v3.0
413 stars 292 forks source link

ardublock.xml causes assertion error from underlying OpenBlocks #188

Open gregcorbett opened 5 years ago

gregcorbett commented 5 years ago

Hi,

I'm trying to re-enable unit-testing for ardublock, but running into an assertion error from the underlying OpenBlocks library.

java.lang.AssertionError: Unknown BlockGenus: variable_number
        at edu.mit.blocks.codeblocks.BlockGenus.loadBlockConnectorInformation(BlockGenus.java:569)
        at edu.mit.blocks.codeblocks.BlockGenus.loadBlockGenera(BlockGenus.java:888)
        at edu.mit.blocks.controller.WorkspaceController.loadBlockLanguage(WorkspaceController.java:285)
        at edu.mit.blocks.controller.WorkspaceController.loadFreshWorkspace(WorkspaceController.java:413)
        at com.ardublock.core.Context.resetWorksapce(Context.java:126)
        at com.ardublock.core.Context.<init>(Context.java:92)
        at com.ardublock.core.Context.getContext(Context.java:79)
        at com.ardublock.ui.OpenblocksFrame.<init>(OpenblocksFrame.java:71)
        at com.ardublock.Main.startOpenblocksFrame(Main.java:35)
        at com.ardublock.Main.startArdublock(Main.java:29)
        at com.ardublock.MainTest.setUp(MainTest.java:38)

Following the stack trace seems to lead me to this point, which seems to indicate a problem with ardublock.xml

I'm afraid I don't understand enough about ardublock.xml and this "low-level" Ardublock code to be able to effectively debug this myself... I'm also not sure if it would be more appropriate to open this against OpenBlocks. Yes the exception is coming from OpenBlocks, but it feels like something is wrong with ardublock.xml and that is causing the exception.

One solution is to disable assertion checking in the unit-testing and rely on exiting java on a test fail, but this seems like a bad idea...

Any ideas?

techno94 commented 5 years ago

first line of error is : Unknown BlockGenus: variable_number so in : ardublock.xml or block-mapping.properties or ardublock.properties

there is no variable_number

gregcorbett commented 5 years ago

So it seems like variable_number is defined in ardublock.xml, block-mapping.properties and ardublock.properties.