的确如此。我怎么能这样做,整个事情太大而无法发布,但 为什么它是相关的。正如我所说,我可以发布更多但为什么? DEBUG_LOG(" fn1"); rv.resize(n); //错误发生在这里 DEBUG_LOG(" fn2"); 我知道错误发生在rv.resize(n)因为我不'从第二个DEBUG_LOG获得输出 。Indeed. How can I do that the whole thing is too large to post, butwhy is it relevant. As I said I can post more but why ?DEBUG_LOG("fn1");rv.resize(n); // error happens hereDEBUG_LOG("fn2");I know the error happens at rv.resize(n) because I don''t get the outputfrom the second DEBUG_LOG. 的确如此。我怎么能这样做,整个事情太大而无法发布,但为什么它是相关的。正如我所说,我可以发布更多但为什么? DEBUG_LOG(" fn1"); rv.resize(n); //错误发生在这里 DEBUG_LOG(" fn2"); 我知道错误发生在rv.resize(n)因为我没有得到输出来自第二个DEBUG_LOG。 Indeed. How can I do that the whole thing is too large to post, butwhy is it relevant. As I said I can post more but why ?DEBUG_LOG("fn1");rv.resize(n); // error happens hereDEBUG_LOG("fn2");I know the error happens at rv.resize(n) because I don''t get the outputfrom the second DEBUG_LOG. 总线错误通常源于未对齐的对象,而不是来自您发布的代码 。您是否使用自定义内存分配器?A bus error usually stems from misaligned objects, not from the codeyou posted. Do you use a custom memory allocator? 这篇关于总线错误,调整大小矢量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 09-05 09:45