-
Notifications
You must be signed in to change notification settings - Fork 44
fix network receive panic issue #34
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
base: main
Are you sure you want to change the base?
Conversation
|
放在类成员会更好,在分配 tcp / udp 对象的时候就报内存不足,而不是在启动 task 后报错。 |
done 帮忙重新 review 下 |
|
还是有点问题,从读取到申请的内存,到后面封装成 std::string,比之前多了一次内存复制操作。 |
|
这里就是要多一次内存 copy, |
不过这个库,使用一直没有问题 |
|
(base) m4:mm-esp32-voice hushi.hs$ xtensa-esp32-elf-addr2line -pfiaC -e build/mm-audio.elf 0x4038fb52 |
|
提供最近奔溃的一个堆栈 |
|
我让 Cursor 根据你提供的出错日志,修复了导致崩溃的问题,稍后提交一个PR。 [13 tools called] 基于您提供的堆栈信息,我分析了 崩溃原因分析
已完成的修改
代码修复详情
这些改动解决了堆内存非法增长和多线程竞态的问题,应该能解决您遇到的运行错误。建议您重新编译并观察运行情况。 |
|
ok 不得不说 Cursor 比我用的 Copilot 要强哈 |
解决某些情况下,内存奔溃的问题
比如接收的数据在某个异步 task 中执行,数据又超过了 1500 字节