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

divide by zero crashes tic80 #585

Closed
nesbox opened this issue Apr 23, 2018 · 5 comments
Closed

divide by zero crashes tic80 #585

nesbox opened this issue Apr 23, 2018 · 5 comments
Assignees
Labels

Comments

@nesbox
Copy link
Owner

nesbox commented Apr 23, 2018

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.

@nesbox nesbox added the bug label Apr 23, 2018
@planer28
Copy link

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?

@frenetic
Copy link
Contributor

frenetic commented Oct 9, 2018

@nesbox nesbox added this to the 0.80.0 milestone Sep 27, 2019
@nesbox nesbox self-assigned this Sep 27, 2019
@nesbox
Copy link
Owner Author

nesbox commented Apr 9, 2020

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.

@nesbox nesbox closed this as completed Apr 9, 2020
@nesbox nesbox removed this from the 0.80.0 milestone Jul 15, 2020
@12buntu
Copy link

12buntu commented Dec 27, 2020

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

image

Should I open a new issue?

@RobLoach
Copy link
Contributor

Maybe an issue for Wren?

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

No branches or pull requests

5 participants