You're copy-constructing the deque here:
channelData=deque<char>(*channel).begin()
Then, you take the begin() iterator, and the deque gets destroyed (invalidating the iterator).
And again here:
channelData!=deque<char>(*channel).end()
So now, you are comparing two iterators that not only have been invalidated, but you're comparing iterators from two different objects, which you cannot do either. Once an iterator is invalidated, the only legal operation on it is assignment.
You'll have to write the code as follows:
for(channel=instance.mdata.begin();channel!=instance.mdata.end();++channel)
{
for( channelData=channel->begin();channelData!= channel->end();++channelData)
{
fileData.push_back(*channelData);
}
}