jmoenig / Snap

a visual programming language inspired by Scratch
http://snap.berkeley.edu
GNU Affero General Public License v3.0
1.5k stars 745 forks source link

"Reporter Did Not Report" Error appearing often #712

Closed cycomachead closed 6 years ago

cycomachead commented 9 years ago

This week in class we've seen a lot of cases which give this error even though the blocks students are making definitely have a report statement inside. Some of them have been very simple (like a sum of 3 items block and others have been more complex), but I can't seem to find a link...

brianharvey commented 9 years ago

Post an example please!

cycomachead commented 9 years ago

Unfortunately, I'm not in lab that often so this is mainly from multiple reports by TAs.

I tried to reproduce one case but wasn't able to.

This was block: x + y + z: Report () + ( () + () )

jmoenig commented 9 years ago

Did this ever happen again?

cycomachead commented 9 years ago

I've seen it happen a few times recently, yes, but still no method of pinning it down.

cycomachead commented 9 years ago

@brianharvey @jmoenig

This has been happening again. Here's a project, with TA comments.

The bug is in the "merge tile at up simple return" block. You can call it with proper parameters by calling "merge up simple". Essentially I think it has to do with reporting inside an "if else". My second guess is reporting inside a "repeat until"

Project: https://s3.amazonaws.com/uploads.hipchat.com/121233/1137162/QffHCQbHM457ETi/reporter_error.xml

I've heard reports of the same thing in lab, and I'm trying to drill down on a Piazza post from today, but I don't have that code.

Today's issues seem to be related to if and if-else though, I definitely know this issue has existed in very simple "one liners" before.

cycomachead commented 9 years ago

These two images show blocks that exhibit the error when run

img-1

img-2

cycomachead commented 9 years ago

We appear to have a solution!

        I found what's happening.
        When you duplicate a "report" from block A to block B, block B will say "reporter didn't report".
[11:29 PM] Steven Traversi: I had duplicated the code in "merge tile at _ _ up simple return" from another block before refining it, including the returns. If you delete the returns and drag in new ones and fill them in exactly the same, all is good.
cycomachead commented 9 years ago

Tagging @straversi

jmoenig commented 9 years ago

Aha! that's a great hint, thank you very much! I'm investigating now...

jmoenig commented 9 years ago

So, I'm guessing if you save and re-open the project, the block will also work as intended without showing the error. I think I know what might me causing this...

jmoenig commented 9 years ago

Hmm.... still can't reproduce it... :-/

cycomachead commented 9 years ago

It does indeed work for me when I re-open in Snap!.

The piazza issue I was working earlier can back from the student as "I fixed it", which probably did involve something like reloading Snap! since she didn't say what fixed it.

I think duplication could make sense -- things definitely get serialized correctly, and it would explain the reporter issues in the lab where students are making blocks which are similar in functionality.

jmoenig commented 9 years ago

I'd love to be able to reproduce this, it's really important. My first thought was this could be related to caching inputs, but that doesn't seem to be the case.

cycomachead commented 9 years ago

Yeah, I tried duplicating some stuff and I couldn't get it to error.

jmoenig commented 9 years ago

dumb (and somewhat desparate) question, but are you sure the computers in the lab (I'm assuming that's where this happened) are all really up to date with the latest changes from last week?

jmoenig commented 9 years ago

another dumb question: Could it be that someone forgot to press the apply button before testing their reporters... (okay, really dumb, sorry)

cycomachead commented 9 years ago

Yeah, they should be all up to date -- though the original issue is still (almost) 6 months old and it had the same actions, so I think the change isn't related to anything recent.

But yes, definitely I know people are clicking apply -- or at least I could verify it in the lab one time a while ago.

jmoenig commented 9 years ago

Okay, thanks. Funny that it's the second time this happens right at the beginning of classes (am I right about that?). I wonder what's different in this setting. Duplication would at least make some kind of sense. Because if it were about a bug in the evaluator I'd expect this issue to come up all the time...

cycomachead commented 9 years ago

Okay, thanks. Funny that it's the second time this happens right at the beginning of classes (am I right about that?).

Yeah, that's right. I know, it's a little weird (and the current game assignment is something new we're working on, so that part is just a coincidence). The lab actives for the beginning of the class are basically the same.

For reference, it seems to be around these places in the labs: http://beautyjoy.github.io/bjc-r/cur/programming/functions/reporters.html?topic=berkeley_bjc%2Fsummer%2F2-loops-variables.topic&course=cs10_su15.html&novideo&noreading&noassignment And http://beautyjoy.github.io/bjc-r/cur/programming/conditionals/valid-date.html?topic=berkeley_bjc%2Fintro_pair%2F4-abstraction-testing.topic&course=cs10_su15.html&novideo&noreading&noassignment

jmoenig commented 9 years ago

Hmm... these labs seem totally harmless, except that it's the very first time they create a reporter (max). Are they always starting with all the tools pre-loaded? Are they copying parts of the definition from the tools? Not that it should matter, actually...

I'm somewhat at loss here. It would be fantastic if any of your students could find a way to reproduce this bug...

cycomachead commented 9 years ago

I don't think they're copying from tools. Though, to be fair -- I didn't see what happened in class yesterday and wasn't suspecting duplication until tonight so, I'm totally positive what people did.

It definitely seems to be related to duplication though because in the two images of the merge block, both the reporters that were having problems were the "duplicated" ones, and re-editing the script didn't fix it, but dragging in new reporters from the palette fixed it.

jmoenig commented 9 years ago

Well, thing is, everything in Snap is somehow related to duplication :-/

Anyway, I've been messing around with various duplication schemes building reporters that exhibited the issue on purpose, copying scripts over to others etc., even doing the excercises in those labs myself, and so far haven't been able to reproduce this...

cycomachead commented 9 years ago

Yeah...I was trying quite a few different things, but I haven't gotten this one to work.

SheilaBrady commented 9 years ago

Hi Jens, I came across this thread when I was trying to figure out why I was getting an Reporter Didn't Report error when I had exactly copied the code from the exercise in BJC Unit 3, Lesson 3, which is the lesson to develop a block that makes plurals.

My code looked exactly the same as the code in the exercise (see the image attached), but I got a clue from reading through this post. I HAD screwed up earlier and built the routine as a Predicate when it should have been a reporter. But then I fixed that, and was duplicating it various times and ways to make a block that worked.

It was after that duplication that the problem started to happen. The block, when dragged out onto the scripting area, and clicked, would not give a plural answer back. Instead it would be shaded in red, and the error "Reporter failed to report" would pop up.

I tried to duplicate this series of steps exactly but I couldn't get it to repeat, but I'd been duplicating things left and right and copying them and so I think I'm forgetting one step somewhere.

Anyway, if you are still looking for that problem, here is another "sighting". Maybe changing it from Predicate to Reporter, and duplicating that block caused the problem. And thanks for the clue of "Just start over" as that fixed my issue. Cheers! Sheila

plural no report issue

maryfries commented 8 years ago

Teachers in NYC have begun running into this bug.

I haven't reproduced it yet, and the teacher was able to get it to run on their own machine, but when the same project was running on a student machine, it threw the error.

I'll ask for system details...

jmoenig commented 8 years ago

could this possibly be related to @cycomachead's discovery regarding #942?

cycomachead commented 8 years ago

I don't think so.

I'm still fairly confident this is a result of some duplication mechanism, though to be honest, I can't explain how that could cause the error. The teaching running the code on their own computer is compatible with either of two things: 1) rebuilding a script fixes the issue, b/c there's a new reporter, OR 2) deserializing the project re-associates the reporter with the correct block.

jguille2 commented 8 years ago

Hi! I got this "reporter didn't report" error and I found this issue... After this, I find my bug... maybe is hepful for you?

I found my problem looking at xml file. The problem was 'default value' had html control code (invisible) in its field. Then, all 'if cases' were 'false' and there wasn't any report.

My problem code: <input type="%txt" readonly="true">joyX&#xD; <options>joyX joyY butZ butC accX accY accZ</options></input>

I don't know the origin of the &#xD; code... but it was there. It was strange because when you used the block (choosing an option) all went ok... but the 'default use' went wrong. Copying block produced confusion too, because some blocks went ok and other blocks went ko...

Maybe this does not apply in the cases of this issue... but for other cases I propose to take a look at the xml files ... and see if you have a surprise hidden in the graphical environment.

jmoenig commented 8 years ago

Hi @jguille2 , thank you very much for this analyis, looks like we have something to help us investigate into this further and maybe solve this issue for good!

regentgal commented 6 years ago

This happens quite reliably for me any time i change a block from a command to a reporter or try to move or copy code from a command to a reporter. Was tripping up my class pretty bad this morning.

cycomachead commented 6 years ago

when you copied code: Did that copy include a report block or did you drag in a new report block from the palette?

-- Michael Ball From my iPhone michaelball.co

On Dec 20, 2017, at 6:13 AM, Jessica Nebgen notifications@github.com wrote:

This happens quite reliably for me any time i change a block from a command to a reporter or try to move or copy code from a command to a reporter. Was tripping up my class pretty bad this morning.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

ToonTalk commented 6 years ago

A student project is seeing this but only when the tracer is enabled. You can reproduce this by running the attached with 'right wrist' open and tracing enabled. Sorry it is reproduced here in a large complex project but at least it reliably says reporter didn't report.

When tracing isn't enabled there is no indication of a problem however setting a breakpoint on Process.prototype.expectReport indicates there is an error but the reporting isn't seen (perhaps it appears for a small fraction of a second).

It is not clear if this error has any effect on the execution of the program.

Could the error message mention which reporter it thinks didn't report?

reporter didnt report - Project 2.3.zip

ToonTalk commented 6 years ago

You perhaps may want to ignore this example since I discovered it is caused by using postMessage in a repeat block without waiting for the corresponding message reply. But it still doesn't explain why it says reporter didn't report.

jmoenig commented 6 years ago

Thank, Ken. That's a really fascinating project! I wasn't able to reproduce the "reporter didn't report" error, though. I there any block in particular I should look at?

ToonTalk commented 6 years ago

Yes it is the "right wrist" that frequently reports that the reporter didn't report.

jmoenig commented 6 years ago

Okay, I think I'm onto something... I can reproduce it in places where it shouldn't occur. Investigating...

jmoenig commented 6 years ago

I think I've fixed this, @ToonTalk . Can you maybe test the current dev version:

https://snap.berkeley.edu/snapsource/dev

and see if these errors still occur? If not I'll make another minor release tomorrow. Thanks!

ToonTalk commented 6 years ago

Working fine now, thanks!

By the way, when I first tested it I didn't see the trace for 'right wrist' (but did see the trace for the main program that was calling 'right wrist'). Closing the editor for 'right wrist' and reopening fixed it. I then tried unsuccessfully to find a way to recreate the problem.

jmoenig commented 6 years ago

Thanks for the quick testing. I'll release a patch later today along with another little change to localization. You only see the visible stepping in block editors that you open after you turn "visible stepping" on, because that requires a slightly different way to edit custom blocks (one where we can't deep-copy the definition body first, but instead directly edit the real thing, which is why it doesn't give you a "cancel" option in visible stepping mode)

charlyecastro commented 2 years ago

We appear to have a solution!

        I found what's happening.
        When you duplicate a "report" from block A to block B, block B will say "reporter didn't report".
[11:29 PM] Steven Traversi: I had duplicated the code in "merge tile at _ _ up simple return" from another block before refining it, including the returns. If you delete the returns and drag in new ones and fill them in exactly the same, all is good.

Turns out duplicate report blocks is still an issue. I was able to fix the problem by removing duplicate report blocks and manually adding each report block

jmoenig commented 2 years ago

@charlyecastro do you have a way for me to replicate the issue you're encountering? I'd love to investigate, tnx