[FALSE ALARM] Why is replicator::onReplicate called twice?

Hi,

I have an observation about the behavior of onReplicate which I’m struggling to understand. I’ve added an example file to illustrate the problem.

As of 2020.25380:

PROBLEM

when a replicator’s input table is updated, the onReplicate method is called
twice.

EXPECTED BEHAVIOR

perhaps onReplicate should only be called once

REPRODUCING THE ISSUE

open the python console

type ‘1’ to refresh the table that drives the replicator

observe the message ‘onReplicate…’ which appears twice in the console each
time the ‘1’ key is pressed

WHY THIS IS A PROBLEM

I’d like to put some relatively heavy code into onReplicate, to be called only
when the table is updated. I don’t want this code to run twice.

onreplicate called twice.toe (4.2 KB)

I tried this in 25380 and only got one on replicate call! Are you on a Mac maybe? Not sure what else would be different.

NOT A PROBLEM ANY MORE

The problem was seen on Windows 8.1, I’ve got a bluetooth keyboard runing through a logitech driver I think. But that was yesterday.

Today it just works fine. Which is equal parts annoying and embarrassing. I’ll put it down to ‘gremlins’.

1 Like