Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Bug Reports

Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 10-15-2018, 08:51 PM   #1
Human being with feelings
Moy's Avatar
Join Date: Oct 2017
Location: China
Posts: 32
Default [5.96] Crash when using “SetMediaItemTake_Source” function (FIXED)

[Steps How to Reproduce]
1. Open a Project with at least 1 item.
2. Run this Script:


-- Get other information
local pos = reaper.GetCursorPosition()

-- Get information from an item
item = reaper.GetMediaItem(0, 0)

item_sel = reaper.GetSelectedMediaItem(0, 0)
item = item_sel

take = reaper.GetMediaItemTake(item, 0)
take_num = reaper.GetMediaItemNumTakes(item)

file = reaper.GetMediaItemTake_Source(take)
length = reaper.GetMediaItemInfo_Value(item, "D_LENGTH")
track = reaper.GetMediaItemTrack(item)

-- Create new item based on the first one
item_new = reaper.AddMediaItemToTrack(track)
reaper.SetMediaItemInfo_Value(item_new, "D_LENGTH", length)
reaper.SetMediaItemInfo_Value(item_new, "D_POSITION", pos)

take_new = reaper.AddTakeToMediaItem(item_new)

reaper.SetMediaItemTake_Source(take_new, file)



It could set the source to new take, but after a while(1 or 2 seconds), reaper will crash.
Some times with this ERROR:

[Microsoft Visual C++ Runtime Library]

Runtime Error!
Program: D:\Apps\REAPER\reaper.exe

- pure virtual function call
Attached Images
File Type: png ERROR.png (5.0 KB, 15 views)

Last edited by Moy; 10-15-2018 at 08:57 PM.
Moy is offline   Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -7. The time now is 07:03 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.