4

我在 Win 7 上使用 Qt 5.7 进行编码。我的应用程序运行正确。但是当我使用调试器时,出现一个错误对话框:GDB 进程意外终止(退出 code3)。调试器日志的最后一部分:

>~"../../../../src/gdb-7.10.1/gdb/utils.c:1071: internal-error: virtual memory exhausted.\nA problem internal to GDB has been detected,\nfurther debugging may prove unreliable.\nCreate a core file of GDB? "
>~"(y or n) [answered Y; input not from terminal]\n"
dUNEXPECTED GDB STDERR: 
dThis application has requested the Runtime to terminate it in an unusual way.
dPlease contact the application's support team for more information.

dGDB PROCESS FINISHED, status 0, exit code 3
dNOTE: ENGINE ILL ******
dFORWARDING STATE TO InferiorShutdownFailed
dState changed BY FORCE from InferiorStopOk(14) to InferiorShutdownFailed(17) [master]
dState changed from InferiorShutdownFailed(17) to EngineShutdownRequested(19) [master]
dQUEUE: SHUTDOWN ENGINE
dCALL: SHUTDOWN ENGINE
dPLAIN ADAPTER SHUTDOWN 19
dINITIATE GDBENGINE SHUTDOWN IN STATE 14, PROC: 0
dNOTE: ENGINE SHUTDOWN OK
dState changed from EngineShutdownRequested(19) to EngineShutdownOk(21) [master]
dState changed from EngineShutdownOk(21) to DebuggerFinished(22) [master]
dQUEUE: FINISH DEBUGGER
dNOTE: FINISH DEBUGGER
dHANDLE RUNCONTROL FINISHED
sDebugger finished.

在我的部分代码中,我使用了 QVector:

       int logic_points_number=5;
       int logic_input_points[16][logic_points_number] ;
       QVector<double> x1_1(2*logic_points_number);
       QVector<double> y1_1(32*logic_points_number);

       x1_position=x1_last_position_logic;//start from last drawn point
       for(int logic_channel=0;logic_channel<16;logic_channel++){
          for (int i=0;i<logic_points_number ;i++){
          if (logic_channel==0)// set x1_1 only for first channel
            x1_1[2*i]= x1_position;
         y1_1[(2*logic_channel*logic_points_number)+(2*i)]=(16.2-logic_channel)+(0.6*logic_input_points[logic_channel][i]);
         if (logic_channel==0){// set x1_1 and x1_position only for first channel
            x1_position = x1_position + x1_step_logic;
            x1_1[(2*i)+1]= x1_position;
          }
         y1_1[(2*logic_channel*logic_points_number)+(2*i)+1]=(16.2-logic_channel)+(0.6*logic_input_points[logic_channel][i]);
         }
       }
       x1_last_position_logic= x1_position;//Set new last drawn point
}

在运行中没有问题。当我删除上面的代码时,调试器没有问题。google 中没有有用的答案。我该怎么办?谢谢

4

1 回答 1

2

在我的情况下,错误代码是“cdb 进程意外终止(代码 -805306181)”。将调试器从 32 位应用程序调试器更改为 64 位应用程序调试器修复了此问题

于 2019-04-23T19:44:01.623 回答