I've added debug prints to cube extension. g_custom_cube_a_f8 and g_custom_cube_picksplit are the only called methods.
After that it prints:
ERROR: failed to add item to index page in "lc_idx"
Cube extension modifications:
#define MAX_DIM (512)
Python test source code has been attached to the letter.
P.S.
sorry for the previous letter, didn't configure plain text composition