https://bugs.documentfoundation.org/show_bug.cgi?id=173160

--- Comment #3 from Neil Roberts <[email protected]> ---
That commit changed TransformItems so that the items are returned as a
std::unordered_map of argument names to values instead of an ordered Sequence
of PropertyValues. The property values are converted into a Sequence to pass to
the script by iterating over the container. Before the patch the order of the
iteration would be consistent, but after the patch it is unreliable and
probably dependent on the compiler. That probably explains why the bug is not
reproducible in Windows even though it’s using a commit that is after the
bibisected commit.

The unpredictable order wouldn’t be a problem if the script had access to the
PropertyValues because then it could find the arguments it’s interested in by
iterating over them to find the one with the right name. However this can’t be
done because for some reason ScriptProtocolHandler::dispatchWithNotification
only passes the Value member of the PropertyValue and drops the Name on the
floor. So the only way a script can distinguish the different arguments is by
the order. It looks like it has always been like this since the argument
processing was added in 2003 in this commit:

commit 132fa90fc1df343c3a9334c303cb0fcb56f36f8e
Author: Noel Power <[email protected]>
Date:   Wed Feb 12 08:41:39 2003 +0000

    Added processing for arguments passed to dispatch

I guess we’ll have to either revert the patch or do something creative to
preserve the order and avoid breaking existing macros.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to