Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when copying audio TCOs between LMMSs. #3862

Closed
husamalhomsi opened this issue Oct 7, 2017 · 4 comments
Closed

Crash when copying audio TCOs between LMMSs. #3862

husamalhomsi opened this issue Oct 7, 2017 · 4 comments
Labels

Comments

@husamalhomsi
Copy link
Member

husamalhomsi commented Oct 7, 2017

Using Windows 10 Pro, 64-bit OS, x64-based processor with LMMS 1.2.0-rc.4.

To reproduce:

  1. Open 2 LMMSs.
  2. In each LMMS, add either a sample track or an AFP.
  3. Add a TCO with info (not an empty sample track or AFP) to the track of a LMMS.
  4. Control and drag the TCO from one LMMS's track to the other to make a copy.

Once the copied TCO enters the track, LMMS will crash, the runtime error window will appear,
image
then the "LMMS has stopped working" window will appear.
image

@musikBear
Copy link

Could not recreate exactly on win32. rc4 xp3
However, for** AFP **the actual TCO is stripped and only the instrument is copied to 2. instance of LMMS
Copying a 3oc track with TCO went perfect
Copying a sample-track track with TCO went perfect

@PhysSong
Copy link
Member

Reproduced. It seems like TrackContentWidget::canPasteSelection assumes the source track is from the same instance of LMMS:

lmms/src/core/Track.cpp

Lines 1382 to 1394 in daa3f53

// Track must be in TrackContainer's tracks
if( finalTrackIndex < 0 || finalTrackIndex >= tracks.size() )
{
return false;
}
// Track must be of the same type
Track * startTrack = tracks.at( trackIndex );
Track * endTrack = tracks.at( finalTrackIndex );
if( startTrack->type() != endTrack->type() )
{
return false;
}

I guess saving track type in createTCODataFiles and using it in canPasteSelection will be enough.

@PhysSong
Copy link
Member

Note that the crash only happens if a track whose index equals to the index of source track doesn't exist in target LMMS instance.

@PhysSong
Copy link
Member

Should be fixed in #4862.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants