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

[Corrective Sky Surgery Q3]: Incorrect array length returned #119

Open
cyr123456789 opened this issue Oct 16, 2021 · 2 comments
Open

[Corrective Sky Surgery Q3]: Incorrect array length returned #119

cyr123456789 opened this issue Oct 16, 2021 · 2 comments
Labels
Bug [Category] minor [Priority]

Comments

@cyr123456789
Copy link

Prerequisites

Expected Behavior

Running display(array_length(src)) should return the height of the video/image.

Current Behavior

Correct values are only returned when HEIGHT is set between 300 and 500. For any values <300 or >500, display(array_length(src)) returns 300.

Failure Information (for bugs)

Steps to Reproduce

Run the code in Q3 of the mission: Expected result: 150, Actual result: 300

const WIDTH = 400;
const HEIGHT = 150;

function zoom(factor) {
    
    return (src, dest) => display(array_length(src));
}

install_filter(zoom(2));

set_dimensions(WIDTH, HEIGHT);
start();

Context

  • Version used: -
  • Browser Name and version: Firefox v93.0
  • Operating System and version (desktop or mobile): macOS Big Sur V11.6
@cyr123456789 cyr123456789 added the Bug [Category] label Oct 16, 2021
@cyr123456789 cyr123456789 changed the title [Corrective Sky Surgery Q3]: [Corrective Sky Surgery Q3]: Incorrect array length returned Oct 16, 2021
@Cloud7050
Copy link
Contributor

I am still able to reproduce this issue. The displayed output does not match the actual canvas dimensions.

Also, the REPL only updates with all the accumulated display values after rerunning the program. I am not sure if this was always the case.

@Cloud7050 Cloud7050 added the minor [Priority] label Sep 7, 2023
@martin-henz
Copy link
Member

This issue persists. Here is a link that does not require SA @ NUS: https://share.sourceacademy.org/ubyxy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug [Category] minor [Priority]
Projects
None yet
Development

No branches or pull requests

3 participants