跳转至内容
  • 版块
  • 最新
  • 标签
  • 热门
  • Online Tools
  • 用户
  • 群组
折叠
品牌标识

D2Learn Forums

  1. 主页
  2. Open Courses | 公开课
  3. d2ds | 动手学数据结构
  4. dsx自动检测出现错误

dsx自动检测出现错误

已定时 已固定 已锁定 已移动 已解决 d2ds | 动手学数据结构
d2dsxlings
14 帖子 2 发布者 41 浏览
  • 从旧到新
  • 从新到旧
  • 最多赞同
登录后回复
此主题已被删除。只有拥有主题管理权限的用户可以查看。
  • dustchensD 离线
    dustchensD 离线
    dustchens
    编写于 最后由 编辑
    #2

    xlings版本为0.0.4

    1 条回复 最后回复
    0
    • dustchensD 离线
      dustchensD 离线
      dustchens
      编写于 最后由 编辑
      #3

      image.png
      退出前xmake build在高速运行

      1 条回复 最后回复
      0
      • SPeakS 离线
        SPeakS 离线
        SPeak d2learn-dev
        编写于 最后由 SPeak 编辑
        #4

        可能是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

        1 条回复 最后回复
        0
        • dustchensD 离线
          dustchensD 离线
          dustchens
          编写于 最后由 dustchens 编辑
          #5

          @SPeak 貌似还是在这个地方失败了
          image.png
          重新下载了文件后依旧只能执行到slist.1.cpp这一个,后续的无法检测,在我这边貌似是固定复现

          1 条回复 最后回复
          0
          • SPeakS 离线
            SPeakS 离线
            SPeak d2learn-dev
            编写于 最后由 编辑
            #6

            @dustchens 麻烦做以下两个验证

            1.在.xlings目录运行报错命令看是否也会报错(如果报错把报错贴一下报错信息

            cd .xlings
            xmake xlings -D --project=. J:\cpp_project\d2ds d2x checker
            

            2.先删除slist.1.cpp中main函数中的其他代码(只保留D2X_WAIT), 然后看是否会报错

            cd .xlings
            xmake xlings -D --project=. J:\cpp_project\d2ds d2x checker
            

            3.把百分百可以复现问题的代码提交到你fork的仓库, 并贴一下链接 我也尝试测试一下

            dustchensD 2 条回复 最后回复
            0
            • SPeakS 离线
              SPeakS 离线
              SPeak d2learn-dev
              编写于 最后由 编辑
              #7

              另外d2ds的最新版本, 下面的乱码应该没有了吧

              image.png

              1 条回复 最后回复
              0
              • dustchensD 离线
                dustchensD 离线
                dustchens
                回复了SPeak 最后由 编辑
                #8

                @SPeak

                删除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多然后结束

                1 条回复 最后回复
                0
                • dustchensD 离线
                  dustchensD 离线
                  dustchens
                  回复了SPeak 最后由 编辑
                  #9

                  @SPeak 乱码确实没有了。
                  是运行下一个检查没有成功,是否需要改slist.2.cpp里的内容?还是我把 .gitignore删掉上传全部内容?没有用过xmake,是不是我自己的代码出现了问题导致的这后面的运行不起来。。 我在修改slist.2.cpp里的内容,看看注释掉一部分后哪里有问题,定位到导致出错的语句,然后贴上自己SLinkedList.hpp里的代码,这样可以吗?

                  SPeakS dustchensD 2 条回复 最后回复
                  0
                  • SPeakS 离线
                    SPeakS 离线
                    SPeak d2learn-dev
                    回复了dustchens 最后由 编辑
                    #10

                    @dustchens 按你这样描述可能问题时 slist.2.cpp, 你可以试一试把这个里面只留一个D2X_WAIT看看呢, 然后你给一下你仓库的链接 我这里也测试一下

                    测试前运行一下下面命令更新一下, 就直接用d2x checker 就可以了(不用手动到.xlings运行

                    xlings self update
                    
                    1 条回复 最后回复
                    0
                    • dustchensD 离线
                      dustchensD 离线
                      dustchens
                      回复了dustchens 最后由 编辑
                      #11

                      @SPeak 大概定位到了问题,在我当前的代码下,slist.2.cpp里的 // d2ds::SLinkedList<int> intList2(intList1); 这些拷贝语句都会使得无法进入该练习
                      https://github.com/dustchens/my-d2ds/tree/main/dslings/exercises/linked-list
                      这是我出错的仓库链接

                      1 条回复 最后回复
                      0
                      • SPeakS 离线
                        SPeakS 离线
                        SPeak d2learn-dev
                        编写于 最后由 SPeak 编辑
                        #12

                        @dustchens 通过分析, 发现主要是程序中存在死循环, 导致程序卡死

                        • 死循环位置: 链表析构
                        • 原因: 对象拷贝语义未实现 (练习要求实现的
                        • 解决方法: 在分配器释放时, 如果异常立即退出程序, 避免crash导致检测中断

                        具体改动: https://github.com/d2learn/d2ds/commit/92275563edf26c1c413f50fa1b0fc542d94e24ec

                        尝试更新d2ds代码, 然后测试下是否还有这个问题

                        dustchensD 1 条回复 最后回复
                        0
                        • dustchensD 离线
                          dustchensD 离线
                          dustchens
                          回复了SPeak 最后由 编辑
                          #13

                          @SPeak 感谢大佬,已经解决了。不过我还是很疑惑,vector练习里也有自赋值的检测,为什么可以正常进入练习,也只是提示double free,为什么循环链表这里会出现死循环

                          SPeakS 1 条回复 最后回复
                          0
                          • SPeakS 离线
                            SPeakS 离线
                            SPeak d2learn-dev
                            回复了dustchens 最后由 编辑
                            #14

                            @dustchens 链表结构损坏, 不闭环了 (如果问题解决可以把帖子状态设置为已解决

                            1 条回复 最后回复
                            0
                            • ,dustchensD dustchens 将这个主题标记为已解决

                            • 登录

                            • 没有帐号? 注册

                            • 登录或注册以进行搜索。
                            d2learn forums Powered by NodeBB
                            • 第一个帖子
                              最后一个帖子
                            0
                            • 版块
                            • 最新
                            • 标签
                            • 热门
                            • Online Tools
                            • 用户
                            • 群组