dsx自动检测出现错误
-
可能是msvc构建的时候卡住了. 这个问题是必现, 还是偶现啊
尝试更新d2ds最新代码, 然后使用xlings安装mingw工具链看是否能解决
- 1.更新d2ds到最新的代码
- 2.安装mingw/gcc
xim --update index xlings install mingw-w64- 3.重新测试验证
d2x checker
https://github.com/d2learn/d2ds/commit/f7de9275b958d72267cece7d1055729985501c34
-
@dustchens 麻烦做以下两个验证
1.在.xlings目录运行报错命令看是否也会报错(如果报错把报错贴一下报错信息
cd .xlings xmake xlings -D --project=. J:\cpp_project\d2ds d2x checker2.先删除slist.1.cpp中main函数中的其他代码(只保留D2X_WAIT), 然后看是否会报错
cd .xlings xmake xlings -D --project=. J:\cpp_project\d2ds d2x checker3.把百分百可以复现问题的代码提交到你fork的仓库, 并贴一下链接 我也尝试测试一下
-
另外d2ds的最新版本, 下面的乱码应该没有了吧

-
删除main之前在 .xlings里执行命令的完整输出
xmake xlings -D --project=. J:\cpp_project\d2ds d2x checker ✅ Successfully ran dslings\tests\dslings.0.cpp 🎉 The code is compiling! 🎉 ---------C-Output--------- 🌏Progress: [===>----------------------------------------------] 3/49 [Target: 0-dslings-B-1] - normal ✅ Successfully ran dslings\tests\dslings.1.cpp 🎉 The code is compiling! 🎉 ---------C-Output--------- [D2DS LOGI]: - ✅ | mVal.get() == 2 (2 == 2) 🌏Progress: [====>---------------------------------------------] 4/49 [Target: 0-dslings-B-2] - normal ✅ Successfully ran dslings\tests\dslings.2.cpp 🎉 The code is compiling! 🎉 ---------C-Output--------- [D2DS LOGI]: - ✅ | mVal.get() == 2 (2 == 2) [D2DS LOGI]: - ✅ | mVal.get() == 2 (2 == 2) 🌏Progress: [=====>--------------------------------------------] 5/49 [Target: 1-array-A-0] - normal ✅ Successfully ran dslings\useage\array\array.u0.cpp 🎉 The code is compiling! 🎉 🌏Progress: [======>-------------------------------------------] 6/49 [Target: 1-array-B-0] - normal ✅ Successfully ran dslings\tests\array\array.0.cpp 🎉 The code is compiling! 🎉 🌏Progress: [=======>------------------------------------------] 7/49 [Target: 1-array-B-1] - normal ✅ Successfully ran dslings\tests\array\array.1.cpp 🎉 The code is compiling! 🎉 🌏Progress: [========>-----------------------------------------] 8/49 [Target: 1-array-B-2] - normal ✅ Successfully ran dslings\tests\array\array.2.cpp 🎉 The code is compiling! 🎉 ---------C-Output--------- [D2DS LOGI]: - ✅ | BigFiveTest::destructor() [D2DS LOGI]: - ✅ | BigFiveTest::copy_assignment() [D2DS LOGI]: - ✅ | BigFiveTest::move_assignment() 🌏Progress: [=========>----------------------------------------] 9/49 [Target: 1-array-B-3] - normal ✅ Successfully ran dslings\tests\array\array.3.cpp 🎉 The code is compiling! 🎉 ---------C-Output--------- [D2DS LOGI]: - ✅ | intArr[0] == 5 (5 == 5) 🌏Progress: [==========>---------------------------------------] 10/49 [Target: 1-array-B-4] - normal ✅ Successfully ran dslings\tests\array\array.4.cpp 🎉 The code is compiling! 🎉 ---------C-Output--------- [D2DS LOGI]: - ✅ | i == intArr[i] (0 == 0) [D2DS LOGI]: - ✅ | i == intArr[i] (1 == 1) [D2DS LOGI]: - ✅ | i == intArr[i] (2 == 2) [D2DS LOGI]: - ✅ | i == intArr[i] (3 == 3) 🌏Progress: [===========>--------------------------------------] 11/49 [Target: 1-array-B-5] - normal ✅ Successfully ran dslings\tests\array\array.5.cpp 🎉 The code is compiling! 🎉 ---------C-Output--------- [D2DS LOGI]: - ✅ | intArr.begin() != intArr.end() [D2DS LOGI]: - ✅ | data == val (0 == 0) [D2DS LOGI]: - ✅ | data == val (1 == 1) [D2DS LOGI]: - ✅ | data == val (2 == 2) 🌏Progress: [============>-------------------------------------] 12/49 [Target: 1-array-B-6] - normal ✅ Successfully ran dslings\tests\array\array.6.cpp 🎉 The code is compiling! 🎉 ---------C-Output--------- [D2DS LOGI]: - ✅ | intArr[0] == intArr[-4] (100 == 100) [D2DS LOGI]: - ✅ | intArr[1] == intArr[-3] (50 == 50) 🌏Progress: [=============>------------------------------------] 13/49 [Target: 2-vector-B-0-0] - normal ✅ Successfully ran dslings\tests\vector\vector.0.0.cpp 🎉 The code is compiling! 🎉 🌏Progress: [==============>-----------------------------------] 14/49 [Target: 2-vector-B-0-1] - normal ✅ Successfully ran dslings\tests\vector\vector.0.1.cpp 🎉 The code is compiling! 🎉 ---------C-Output--------- [D2DS LOGI]: allocate: dslings\tests\vector\vector.0.1.cpp:24 - StackMemAllocator: try to allocate 4 bytes 🌏Progress: [===============>----------------------------------] 15/49 [Target: 2-vector-B-0-all] - normal ✅ Successfully ran dslings\tests\vector\vector.0.cpp 🎉 The code is compiling! 🎉 ---------C-Output--------- [D2DS LOGI]: allocate: dslings\tests\vector\vector.0.cpp:19 - StackMemAllocator: try to allocate 10 bytes [D2DS LOGI]: allocate: dslings/common/common.hpp:64 - DefaultAllocator: try to allocate 24 bytes [D2DS LOGI]: - ✅ | d2ds::DefaultAllocator::allocate_counter() == 1 (1 == 1) 🌏Progress: [================>---------------------------------] 16/49 [Target: 2-vector-B-1-0] - normal ✅ Successfully ran dslings\tests\vector\vector.1.0.cpp 🎉 The code is compiling! 🎉 ---------C-Output--------- [D2DS LOGI]: allocate: dslings/common/common.hpp:64 - DefaultAllocator: try to allocate 4 bytes [D2DS LOGI]: deallocate: dslings/common/common.hpp:73 - DefaultAllocator: free addr 000001a86f578f80, bytes 4 🌏Progress: [=================>--------------------------------] 17/49 [Target: 2-vector-B-1-1] - normal ✅ Successfully ran dslings\tests\vector\vector.1.1.cpp 🎉 The code is compiling! 🎉 ---------C-Output--------- [D2DS LOGI]: allocate: dslings/common/common.hpp:64 - DefaultAllocator: try to allocate 20 bytes [D2DS LOGI]: allocate: dslings/common/common.hpp:64 - DefaultAllocator: try to allocate 20 bytes [D2DS LOGI]: allocate: dslings/common/common.hpp:64 - DefaultAllocator: try to allocate 20 bytes [D2DS LOGI]: - ✅ | BigFiveTest::copy_constructor() [D2DS LOGI]: deallocate: dslings/common/common.hpp:73 - DefaultAllocator: free addr 000001cc22a81790, bytes 20 [D2DS LOGI]: allocate: dslings/common/common.hpp:64 - DefaultAllocator: try to allocate 20 bytes [D2DS LOGI]: deallocate: dslings/common/common.hpp:73 - DefaultAllocator: free addr 000001cc22a817f0, bytes 20 [D2DS LOGI]: deallocate: dslings/common/common.hpp:73 - DefaultAllocator: free addr 000001cc22a819b0, bytes 20 [D2DS LOGI]: deallocate: dslings/common/common.hpp:73 - DefaultAllocator: free addr 000001cc22a81770, bytes 20 🌏Progress: [==================>-------------------------------] 18/49 [Target: 2-vector-B-1-2] - normal ✅ Successfully ran dslings\tests\vector\vector.1.2.cpp 🎉 The code is compiling! 🎉 ---------C-Output--------- [D2DS LOGI]: allocate: dslings/common/common.hpp:64 - DefaultAllocator: try to allocate 20 bytes [D2DS LOGI]: allocate: dslings/common/common.hpp:64 - DefaultAllocator: try to allocate 40 bytes [D2DS LOGI]: deallocate: dslings/common/common.hpp:73 - DefaultAllocator: free addr 000001a914b20e50, bytes 20 [D2DS LOGI]: - ✅ | d2ds::DefaultAllocator::allocate_counter() == 2 (2 == 2) [D2DS LOGI]: deallocate: dslings/common/common.hpp:73 - DefaultAllocator: free addr 000001a914b21070, bytes 40 [D2DS LOGI]: - ✅ | d2ds::DefaultAllocator::deallocate_counter() == 2 (2 == 2) [D2DS LOGI]: - ✅ | BigFiveTest::self_assignment() 🌏Progress: [===================>------------------------------] 19/49 [Target: 2-vector-B-1-all] - normal ✅ Successfully ran dslings\tests\vector\vector.1.cpp 🎉 The code is compiling! 🎉 ---------C-Output--------- [D2DS LOGI]: allocate: dslings/common/common.hpp:64 - DefaultAllocator: try to allocate 4 bytes [D2DS LOGI]: deallocate: dslings/common/common.hpp:73 - DefaultAllocator: free addr 00000179b2ff8fa0, bytes 4 [D2DS LOGI]: - ✅ | BigFiveTest::destructor() [D2DS LOGI]: allocate: dslings/common/common.hpp:64 - DefaultAllocator: try to allocate 20 bytes [D2DS LOGI]: allocate: dslings/common/common.hpp:64 - DefaultAllocator: try to allocate 20 bytes [D2DS LOGI]: allocate: dslings/common/common.hpp:64 - DefaultAllocator: try to allocate 20 bytes [D2DS LOGI]: - ✅ | BigFiveTest::copy_constructor() [D2DS LOGI]: deallocate: dslings/common/common.hpp:73 - DefaultAllocator: free addr 00000179b2fe1040, bytes 20 [D2DS LOGI]: allocate: dslings/common/common.hpp:64 - DefaultAllocator: try to allocate 20 bytes [D2DS LOGI]: deallocate: dslings/common/common.hpp:73 - DefaultAllocator: free addr 00000179b2fe11c0, bytes 20 [D2DS LOGI]: deallocate: dslings/common/common.hpp:73 - DefaultAllocator: free addr 00000179b2fe13c0, bytes 20 [D2DS LOGI]: deallocate: dslings/common/common.hpp:73 - DefaultAllocator: free addr 00000179b2fe13a0, bytes 20 [D2DS LOGI]: allocate: dslings/common/common.hpp:64 - DefaultAllocator: try to allocate 20 bytes [D2DS LOGI]: allocate: dslings/common/common.hpp:64 - DefaultAllocator: try to allocate 40 bytes [D2DS LOGI]: deallocate: dslings/common/common.hpp:73 - DefaultAllocator: free addr 00000179b2fe1060, bytes 20 [D2DS LOGI]: - ✅ | d2ds::DefaultAllocator::allocate_counter() == 2 (2 == 2) [D2DS LOGI]: deallocate: dslings/common/common.hpp:73 - DefaultAllocator: free addr 00000179b2fe0f30, bytes 40 [D2DS LOGI]: - ✅ | 2 == d2ds::DefaultAllocator::deallocate_counter() (2 == 2) [D2DS LOGI]: - ✅ | BigFiveTest::self_assignment() 🌏Progress: [====================>-----------------------------] 20/49 [Target: 2-vector-B-2] - normal ✅ Successfully ran dslings\tests\vector\vector.2.cpp 🎉 The code is compiling! 🎉 ---------C-Output--------- [D2DS LOGI]: - ✅ | intArr1.empty() [D2DS LOGI]: - ✅ | intArr2.size() == 10 (10 == 10) 🌏Progress: [=====================>----------------------------] 21/49 [Target: 2-vector-B-3-0] - normal ✅ Successfully ran dslings\tests\vector\vector.3.0.cpp 🎉 The code is compiling! 🎉 ---------C-Output--------- [D2DS LOGI]: - ✅ | intArr1.capacity() == intArr2.capacity() (0 == 0) [D2DS LOGI]: - ✅ | intArr1.size() == intArr2.capacity() (0 == 0) [D2DS LOGI]: - ✅ | intArr.capacity() == 10 (10 == 10) [D2DS LOGI]: - ✅ | intArr.capacity() == 4 (4 == 4) [D2DS LOGI]: - ✅ | intArr1.capacity() == intArr2.capacity() (4 == 4) [D2DS LOGI]: - ✅ | intArr3.capacity() == intArr2.capacity() (4 == 4) [D2DS LOGI]: - ✅ | intArr1.capacity() == 0 (0 == 0) [D2DS LOGI]: - ✅ | intArr2.capacity() == 10 (10 == 10) 🌏Progress: [======================>---------------------------] 22/49 [Target: 2-vector-B-3-all] - normal ✅ Successfully ran dslings\tests\vector\vector.3.cpp 🎉 The code is compiling! 🎉 ---------C-Output--------- [D2DS LOGI]: - ✅ | intArr[0] == 1 (1 == 1) [D2DS LOGI]: - ✅ | intArr.capacity() == 2 (2 == 2) [D2DS LOGI]: - ✅ | intArr[1] == 2 (2 == 2) [D2DS LOGI]: - ✅ | intArr[2] == 3 (3 == 3) [D2DS LOGI]: - ✅ | intArr.size() == 3 (3 == 3) [D2DS LOGI]: - ✅ | intArr.capacity() == 4 (4 == 4) [D2DS LOGI]: - ✅ | intArr[1] == 2 (2 == 2) [D2DS LOGI]: - ✅ | intArr[0] == 1 (1 == 1) [D2DS LOGI]: - ✅ | intArr.capacity() == 8 (8 == 8) [D2DS LOGI]: - ✅ | intArr[intArr.size() - 1] == 2 (2 == 2) 🌏Progress: [=======================>--------------------------] 23/49 [Target: 2-vector-B-4] - normal ✅ Successfully ran dslings\tests\vector\vector.4.cpp 🎉 The code is compiling! 🎉 🌏Progress: [========================>-------------------------] 24/49 [Target: 2-vector-B-5] - normal ✅ Successfully ran dslings\tests\vector\vector.5.cpp 🎉 The code is compiling! 🎉 ---------C-Output--------- 🌏Progress: [=========================>------------------------] 25/49 [Target: 3-embedded-slist-B-0] - normal ✅ Successfully ran dslings\tests\embedded-list\embedded-slist.0.cpp 🎉 The code is compiling! 🎉 🌏Progress: [==========================>-----------------------] 26/49 [Target: 3-embedded-slist-B-1] - normal ✅ Successfully ran dslings\tests\embedded-list\embedded-slist.1.cpp 🎉 The code is compiling! 🎉 🌏Progress: [===========================>----------------------] 27/49 [Target: 3-embedded-slist-B-2] - normal ✅ Successfully ran dslings\tests\embedded-list\embedded-slist.2.cpp 🎉 The code is compiling! 🎉 🌏Progress: [============================>---------------------] 28/49 [Target: 3-embedded-slist-B-3] - normal ✅ Successfully ran dslings\tests\embedded-list\embedded-slist.3.cpp 🎉 The code is compiling! 🎉 🌏Progress: [=============================>--------------------] 29/49 [Target: 3-embedded-slist-B-4] - normal ✅ Successfully ran dslings\tests\embedded-list\embedded-slist.4.cpp 🎉 The code is compiling! 🎉 🌏Progress: [==============================>-------------------] 30/49 [Target: 4-slinked-list-B-0] - normal ✅ Successfully ran dslings\tests\slinked-list\slist.0.cpp 🎉 The code is compiling! 🎉 🌏Progress: [===============================>------------------] 31/49 [Target: 4-slinked-list-B-1] - normal ✅ Successfully ran dslings\tests\slinked-list\slist.1.cpp 🎉 The code is compiling! 🎉 ---------C-Output--------- [D2DS LOGI]: allocate: dslings/common/common.hpp:64 - DefaultAllocator: try to allocate 16 bytes [D2DS LOGI]: allocate: dslings/common/common.hpp:64 - DefaultAllocator: try to allocate 16 bytes [D2DS LOGI]: allocate: dslings/common/common.hpp:64 - DefaultAllocator: try to allocate 16 bytes [D2DS LOGI]: - ✅ | d2ds::DefaultAllocator::allocate_counter() == 3 (3 == 3) [D2DS LOGI]: deallocate: dslings/common/common.hpp:73 - DefaultAllocator: free addr 000001d6a91d1270, bytes 16 [D2DS LOGI]: deallocate: dslings/common/common.hpp:73 - DefaultAllocator: free addr 000001d6a91d11b0, bytes 16 [D2DS LOGI]: deallocate: dslings/common/common.hpp:73 - DefaultAllocator: free addr 000001d6a91d14f0, bytes 16 [D2DS LOGI]: - ✅ | d2ds::DefaultAllocator::allocate_counter() == d2ds::DefaultAllocator::deallocate_counter() (3 == 3) AI-Tips-Config: https://d2learn.org/docs/xlings ---------E-Files--------- dslings\tests\slinked-list\slist.1.cpp ------------------------- Homepage: https://github.com/d2learn/xlings error: wait events in poller failed!删除main里的内容之后再次执行的输出
xmake xlings -D --project=. J:\cpp_project\d2ds d2x checker ✅ Successfully ran dslings\tests\dslings.0.cpp 🎉 The code is compiling! 🎉 ---------C-Output--------- 🌏Progress: [===>----------------------------------------------] 3/49 [Target: 0-dslings-B-1] - normal ✅ Successfully ran dslings\tests\dslings.1.cpp 🎉 The code is compiling! 🎉 ---------C-Output--------- 🌏Progress: [==============================>-------------------] 30/49 [Target: 4-slinked-list-B-1] - normal ✅ Successfully ran dslings\tests\slinked-list\slist.1.cpp 🎉 The code is compiling! 🎉 🌏Progress: [===============================>------------------] 31/49 [Target: 4-slinked-list-B-1] - normal ✅ Successfully ran dslings\tests\slinked-list\slist.1.cpp 🎉 The code is compiling! 🎉 ---------C-Output--------- AI-Tips-Config: https://d2learn.org/docs/xlings ---------E-Files--------- dslings\tests\slinked-list\slist.1.cpp ------------------------- Homepage: https://github.com/d2learn/xlings error: wait events in poller failed!删掉config.xlings里 checker 的 vscode,在终端中运行的输出依旧一致
🌏Progress: [===============================>------------------] 31/49 [Target: 4-slinked-list-B-1] - normal ✅ Successfully ran dslings\tests\slinked-list\slist.1.cpp 🎉 The code is compiling! 🎉 ---------C-Output--------- AI-Tips-Config: https://d2learn.org/docs/xlings ---------E-Files--------- dslings\tests\slinked-list\slist.1.cpp ------------------------- Homepage: https://github.com/d2learn/xlings error: wait events in poller failed!观察了一下xmake build,结束slist.1.cpp 要运行下一个的时候,cpu占用率迅速提升了,本来只有5-6这样,然后提升到了18,然后等待一段时间,大概十几秒二十秒,结束的时候内存占用从60mb突然提升到200多然后结束
-
@dustchens 按你这样描述可能问题时 slist.2.cpp, 你可以试一试把这个里面只留一个D2X_WAIT看看呢, 然后你给一下你仓库的链接 我这里也测试一下
测试前运行一下下面命令更新一下, 就直接用
d2x checker就可以了(不用手动到.xlings运行xlings self update -
@dustchens 通过分析, 发现主要是程序中存在死循环, 导致程序卡死
- 死循环位置: 链表析构
- 原因: 对象拷贝语义未实现 (练习要求实现的
- 解决方法: 在分配器释放时, 如果异常立即退出程序, 避免crash导致检测中断
具体改动: https://github.com/d2learn/d2ds/commit/92275563edf26c1c413f50fa1b0fc542d94e24ec
尝试更新d2ds代码, 然后测试下是否还有这个问题
-
@dustchens 链表结构损坏, 不闭环了 (如果问题解决可以把帖子状态设置为已解决
-
,
D dustchens 将这个主题标记为已解决

