<div dir="ltr">Hello,<br><br>I'm having an interesting issue with 1 particular mp3. Below is my code:<br><br>







<p class="gmail-p1">TagLib::ID3v2::AttachedPictureFrame * frame = (TagLib::ID3v2::AttachedPictureFrame *)(*it);</p>
<p class="gmail-p1">if (frame!=nullptr && frame->size() > 0) {</p>
<p class="gmail-p1"><span class="gmail-Apple-converted-space">    </span>auto len = frame->picture().toBase64().size();</p>
<p class="gmail-p1"><span class="gmail-Apple-converted-space">    </span>if (len) { // size: 741376</p>
<p class="gmail-p1"><span class="gmail-Apple-converted-space">        </span>outfile << "generated apic" << '\n';</p>
<p class="gmail-p1"><span class="gmail-Apple-converted-space">        </span>outfile << frame->picture().toBase64() << '\n';<span class="gmail-Apple-converted-space">  </span>// <—— is okay</p>
<p class="gmail-p1"><span class="gmail-Apple-converted-space">        </span>outfile << frame->picture().toBase64().data() << '\n'; <—— CRASH</p><br clear="all">outfile is just some output file for debug data (std::ofstream outfile)<br><br>Is there any way to identify why this crashes, and why does .data() cause the crash?<br><br>--<div class="gmail_signature"><div dir="ltr">Timothy Stoyanovski - Developer<div><i>PHP + Frontend</i></div><div><i><br></i></div><div><i>Open Source Contributions: <a href="https://github.com/stoyvo" target="_blank">https://github.com/stoyvo</a></i></div></div></div>
</div>