Code Monkey home page Code Monkey logo

yodine's Issues

Invalid nan and inf values in fields

Description of Issue
If a statement in Yolol generate a nan (not a number) or inf (infinite value), this value can be placed in a variable or a field.

Step to reproduce - nan
Run the following script once :

:ChipField1 = ATAN 4

Step to reproduce - inf
Run the following script for a few seconds :

:ChipField1 = 2
:ChipField1 = :ChipField1*:ChipField1 goto 1

Crash when writing Yolol : Quadruple equal

YOLOL Code
:LampOn = :LampOn ==== 0

Error Dump

Error

yolol/parse.lua:28: Invalid op, was unary '==' but expected a valid operator

Traceback

[C]: in function 'error'
yolol/parse.lua:28: in function '_climbPrecedence'
yolol/parse.lua:66: in function '_climbPrecedence'
yolol/parse.lua:75: in function <yolol/parse.lua:73>
[C]: in function 'match'
yolol/parse.lua:312: in function 'parseLine'
devices/YololChip.lua:88: in function 'linesChanged'
menus/YololChipEditor.lua:32: in function 'linesChanged'
lfeditor.lua:274: in function 'textinput'
libs/loveframes/objects/base.lua:257: in function 'textinput'
libs/loveframes/objects/base.lua:257: in function 'textinput'
libs/loveframes/init.lua:295: in function 'textinput'
main.lua:356: in function main.lua:355
[C]: in function 'xpcall'

Crash when code is pasted in that would exceed the 20 line limit

Clicking low down on a chip then pasting in a multi-lined copy will cause the program to crash with the following error:

Error

devices/chip.lua:361: attempt to index a nil value


Traceback

devices/chip.lua:361: in function 'keypressedGUI'
main.lua:301: in function <main.lua:295>
[C]: in function 'xpcall'

Crash when writing Yolol : double Percent

Yolol Code
:a%%

Crash Dump

Error

yolol/parse.lua:28: Invalid op, was unary '%' but expected a valid operator

Traceback

[C]: in function 'error'
yolol/parse.lua:28: in function '_climbPrecedence'
yolol/parse.lua:66: in function '_climbPrecedence'
yolol/parse.lua:75: in function <yolol/parse.lua:73>
[C]: in function 'match'
yolol/parse.lua:312: in function 'parseLine'
devices/YololChip.lua:88: in function 'linesChanged'
menus/YololChipEditor.lua:32: in function 'linesChanged'
lfeditor.lua:274: in function 'textinput'
libs/loveframes/objects/base.lua:257: in function 'textinput'
libs/loveframes/objects/base.lua:257: in function 'textinput'
libs/loveframes/init.lua:295: in function 'textinput'
main.lua:356: in function main.lua:355
[C]: in function 'xpcall'

Typos in devices categories

The following category names have typos :

  • Un-Offical Devices and Un-Offical Chips : missing a i in official
  • Uncatagorized Devices : Should be "Uncategorized"

Crash on Yolol Execution : invalid goto

Description of the issue
Yodine crashes if goto is given a non-integer numerical value (such as 1.5)
This also occurs if goto is fed a special value (see #15)

Step to reproduce
Run the following script :

goto 1.5

CTD in the Yolol Editor - Backspace madness

Steps to Reproduce

  • Place a ChipSocket and put a YololChip in it.
  • Open the chip editor
  • Type any string
  • Press down arrow to move to the second line
  • Press up arrow to move back to the first line, but in first position
  • Press backspace. The text on the first line is duplicated.
  • Press backspace again to duplicate the whole line again
  • Keep backspace pressed for a few seconds for Yodine to crash

Crash when writing Yolol : UTF-8 Not enough space

Description of Issue
Yodine crashes when some UTF-8 characters are typed in the Yolol Editor.
Those characters includes (tested) : ² é è à ° € ñ

Error Dump

Error

lfeditor.lua:123: UTF-8 decoding error: Not enough space

Traceback

[C]: in function 'getWidth'
lfeditor.lua:123: in function 'draw'
libs/loveframes/objects/base.lua:83: in function 'draw'
libs/loveframes/objects/base.lua:83: in function 'draw'
libs/loveframes/init.lua:193: in function 'draw'
main.lua:137: in function 'draw'
[C]: in function 'xpcall'

UI Bug : Strange scrollbar Behavior

Description of the issue
When the Yodine window is small enough to show a scrollbar in the device list (right menu), scrolling move both the menu and the content of each category (see image below)

image

Steps to reproduce

  • Start Yodine
  • Reduce the window's size to the minimum
  • Move the scrollbar that appeared

Crash - Invalid save file crashes Yodine

Issue
The following save.yaml crashes Yodine when loaded.
This is due to the coordinates of the lamp being non-numerical

Save File

---
networks:
- &network_0
  extensions:
    fields:
      LampRange: 1
      ButtonStyle: 0
      ButtonOnStateValue: 1
      LampColorSaturation: 1
      ButtonOffStateValue: 0
      LampOn: 0
      LampColorHue: 0
      LampColorValue: 1
      LampLumens: 600
    color:
    - 0.003921568627451
    - 0.93333333333333
    - 0.22352941176471
  remark: No Remark.
  name: network_0
  devices:
  - !lamp
    LampRange: LampRange
    LampColorSaturation: LampColorSaturation
    extensions:
      y: y
      x: x
    LampLumens: LampLumens
    LampOn: LampOn
    LampColorValue: LampColorValue
    LampColorHue: LampColorHue
relays: []
...

Error Dump

Error

devices/init.lua:53: x is not a number

Traceback

[C]: in function 'assert'
devices/init.lua:53: in function 'create'
devices/init.lua:90: in function 'deserialize'
Network.lua:80: in function 'deserialize'
Map.lua:29: in function 'deserialize'
SaveSystem.lua:112: in function 'load'
menus/SavesMenu.lua:51: in function 'onclick'
libs/loveframes/objects/button.lua:162: in function 'mousereleased'
libs/loveframes/objects/frame.lua:628: in function 'mousereleased'
libs/loveframes/objects/base.lua:144: in function 'mousereleased'
libs/loveframes/init.lua:245: in function 'mousereleased'
main.lua:244: in function main.lua:243
[C]: in function 'xpcall'

Crash when writing Yolol : what ?

YOLOL Code
:a=b = =0

Error Dump

Error

yolol/parse.lua:46: Invalid op, was binary '= =' but expected a valid operator

Traceback

[C]: in function 'error'
yolol/parse.lua:46: in function '_climbPrecedence'
yolol/parse.lua:75: in function <yolol/parse.lua:73>
[C]: in function 'match'
yolol/parse.lua:312: in function 'parseLine'
devices/YololChip.lua:88: in function 'linesChanged'
menus/YololChipEditor.lua:32: in function 'linesChanged'
lfeditor.lua:274: in function 'textinput'
libs/loveframes/objects/base.lua:257: in function 'textinput'
libs/loveframes/objects/base.lua:257: in function 'textinput'
libs/loveframes/init.lua:295: in function 'textinput'
main.lua:356: in function main.lua:355
[C]: in function 'xpcall'

Crash when coping and pasting certain things in

When pasting in the following code:

if :ButtonState then goto 2 end goto 1
:test = 20
:jmp = 2 :from=1 :a=-1// Jump exe to "B" from this chip ("A")

The program gives the following error:

Error

yolol/parse.lua:28: Invalid op, was unary '/' but expected a valid operator


Traceback

[C]: in function 'error'
yolol/parse.lua:28: in function '_climbPrecedence'
yolol/parse.lua:66: in function '_climbPrecedence'
yolol/parse.lua:75: in function <yolol/parse.lua:73>
[C]: in function 'match'
yolol/parse.lua:312: in function 'parseLine'
devices/chip.lua:114: in function 'codeChanged'
devices/chip.lua:363: in function 'keypressedGUI'
main.lua:301: in function <main.lua:295>
[C]: in function 'xpcall'

The issue is repeatable

it appears that the error does not occur when the comment // Jump exe to "B" from this chip ("A") is not included

Messing around with the program some more I have found the more general problem.
When you have some valid code followed by the comment it will fail
[someValidCode] //comment <- fails

//comment
[someValidCode]                          
//comment
```                                                 <- passes

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.