In larger scenes Blender could crash when duplicating frames in GPv3. This was caused by a dangling reference in `insert_duplicate_frame`. The source frame could become invalid when the frames map was reallocated due to `layer.add_frame(dst_frame_number, ...)` a few lines later in the code. The fix replaces the reference and assigns by value. Pull Request: https://projects.blender.org/blender/blender/pulls/121414