Skip to content

divide by zero crashes tic80 #585

Closed
Closed

Description

@nesbox

I was doing some tweetcart experiments and accidentally did a divide-by-zero which crashed the app. pico-8 handles this quietly, which IMO is a double edged sword, but a run-time error would be fine I think.

Activity

  1. planer28 commented on Jun 29, 2018

    @planer28

    I tried this in JavaScript:

    // title:  game title
    // author: game developer
    // desc:   short description
    // script: js
    
    var x=96
    
    function TIC()
    {
    	x=x/0
    }

    And nothing happened, it didn't crash and didn't throw an error.
    So I'm guessing it's Lua-exclusive?

  2. frenetic commented on Oct 9, 2018

    @frenetic
    Contributor
  3. added this to the milestone on Sep 27, 2019
  4. self-assigned this
    on Sep 27, 2019
  5. nesbox commented on Apr 9, 2020

    @nesbox
    OwnerAuthor

    I tested the code

    -- title:  game title
    -- author: game developer
    -- desc:   short description
    -- script: lua
    
    t=0
    x=96
    y=24
    
    test=y/0
    trace(test)
    function TIC()end
    exit()

    and got inf output without any crash
    image
    Seems, the crash occurred in the other situation, closing.

  6. removed this from the milestone on Jul 15, 2020
  7. 12buntu commented on Dec 27, 2020

    @12buntu

    This issue still occurs while using Wren and the line function:

    image

    Should I open a new issue?

  8. RobLoach commented on Dec 27, 2020

    @RobLoach
    Contributor

    Maybe an issue for Wren?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions