Image Picker 'Image access' limitations

Interestingly, in my test file, I cannot correctly get the media Block from image1's tray, but Image5's is not a problem (same media Block). Then, having had success via 5, I can go back to 1 and that works too, even though I have clocked-up several fails beforehand in the same session.

I think there is something not quite right with the media Block code - no other Block types fail.

MediaBlockIssue.aia (30.2 KB)

No problems with this either.

TimAI2 & Anke,

Anke, I may be just a tad older, but I trust you and TimAI2 to resolve this problem. It would be great if you keep me informed. Thanks Charles

I can / would only like to solve a problem if I actually have it. But I don't have it.

Hopefully Evan can identify the cause.

Work-around. First, from the tray you want to drag a media block from, drag any non-media block first. Hey presto, the media block will then drag out without issues. @ewpatton, hopefully this is a clue to discovering the root cause of the issue.

This behavior makes the media blocks act like quarks, elementary particles that are seen only as part of another elementary particle.

Maybe this is some kind of validation process, intended to avoid mismatches of Media block type (Screen name/sound file name/image file name) against their target sockets by insisting that there be a compatible target socket open in the Blocks Workspace before the Media block is allowed to appear on the Workspace?

1 Like

That sounds kind of plausible, but the question remains, why does it work for me on all computers / notebooks, browsers, Windows versions etc.

I too am unable to reproduce this problem, so my theory is inappropriate for finding the cause of this error.

As for individual user variations, that leaves:

  • browser extensions
  • web traffic filters from local anti-virus packages
  • transAtlantic latency differences
  • operating system level video driver support (grabbing at straws here)
3 Likes

It presets sound files in image blocks, so it does not differentiate media types.

If any of those were the culprit, surely it would affect other block types as well......

ABG,
Maybe my problem is latency. My computer is in California, but I have no idea where your servers are!
Charles :question:

Here's another hypothesis to try ...

  • How old is your mouse/trackball/touchpad? Is it acting like an amusement park claw machine, dropping its drags before they reach their intended pane? Does the distance to drag affect the problem frequency? Do different components' locations in their pallete extend their drag distance requirements?
3 Likes

All,
Probably another problem... but about six months ago
dragging blocks at first were not be visible, but visible again at the click point. I figured this was an AI2 enhancement, but the block dragging fix occasionally (rare) returns to the old visibility approach. Seems unusual!

I have had a long, drawn-out meeting with my mouse and it insists it has nothing to do with the issue.

2 Likes

Try to see if the problem also occurs here:

  1. http://code.appinventor.mit.edu/
  2. AI2Offline download | SourceForge.net (offline version of AI2).

If not, we might be able to isolate this issue...

OK, exactly the same issue here in AI2Offline. The work-around:

works.

Nothing immediately comes to mind as to why this is happening. @BeksOmega would you be able to take a quick look and file an issue with anything you learn?

2 Likes

@ChrisWard do you see any errors in the browser developer console when this happens? I think there is probably an exception being thrown by the drag handler based on your videos.

2 Likes

Honestly I have no idea why this is happening. I've never seen a block that's draggable but not rendered before.

I took a look at the relevant block definition, and everything seems to be in good working order. It's definitely doing some weird stuff with the asset filtering and whatnot, but nothing that should break rendering.

If there was an error trace or some repro steps I could help more, but at this point I'm stuck :confused:

1 Like