Forum Discussion

Modesto's avatar
Modesto
Occasional Contributor
20 days ago

Debugging problem in TestComplete on Windows 11

Good afternoon!

We had to migrate our operating system to Windows 11 and are currently using TestComplete version 15.59.

With this update, when we try to debug the code, TestComplete freezes and closes automatically.

Has anyone else experienced this? If so, how can we resolve it?

Thank you very much.

27 Replies

    • sunnychopra's avatar
      sunnychopra
      Occasional Visitor

      we installed latest version but still facing the same issue. 

  • Modesto's avatar
    Modesto
    Occasional Contributor

    Good morning!!

    Even with the response from colleague sunnychopra, I followed rraghvani's suggestion and updated to version 15.81, and the result was the same as reported by sunnychopra.

    When I'm debugging and want to access the variable "var t = Project.Variables.varTableDadosPedidoComercial", the application freezes and closes automatically, something that doesn't happen in Windows version 10.

    • rraghvani's avatar
      rraghvani
      Icon for Champion Level 3 rankChampion Level 3

      Could you create a new project, with a new variable, and debug to see if it crashes please?

      What language are you using?

  • Modesto's avatar
    Modesto
    Occasional Contributor

    I did what was suggested, created a new project, changed the variable names to "var tst = Project.Variables.varTableDadosPedidoComercialTest" and the same problem occurred, it crashed and closed.

    I'm using JavaScript.

    I also did another test using the same project on Windows 10 and neither version 15.59 nor 15.81 of TestComplete had the problem.

    • rraghvani's avatar
      rraghvani
      Icon for Champion Level 3 rankChampion Level 3

      What version of Windows 11 are you using?

      Can you provide your code example, together with the crash dialog that appears please?

  • Modesto's avatar
    Modesto
    Occasional Contributor

    Just one additional note, sorry I forgot to mention it.

    This freezing and closing of TestComplete only occurs when I try to access the variable's content using the Alt+W, and also in some situations where it freezes/closes unexpectedly.

    • rraghvani's avatar
      rraghvani
      Icon for Champion Level 3 rankChampion Level 3

      I've followed similar steps, and it's working fine.

       

  • Hassan_Ballan's avatar
    Hassan_Ballan
    Icon for Champion Level 3 rankChampion Level 3

    Your variable name varTableDadosPedidoComercialTest suggests it might be a Table variable. These are more complex and can behave differently during debugging.

    Do you see the same issue when:

    • Using a simple variable (e.g., string or integer)?
    • Running the test normally (Run) vs only during Debug?

    This should help narrow down whether the issue is specific to:

    • Table variables
    • The debugger
    • Or a broader **TestComplete + Windows 11 interaction

    Since you’ve already confirmed it works on Windows 10 and also reproduced it in a clean project, I would recommend creating a support case with SmartBear. This looks like it could be a product-level issue rather than something project-specific.

    If this resolves your scenario, marking it as the solution helps future readers find it quickly.

  • Modesto's avatar
    Modesto
    Occasional Contributor

    I did a test like that and didn't have any problems either. Now try inserting data into the variable; in my test, this variable is a table that receives 20 columns, and data is inserted from the return of a procedure. In this scenario, when I try to access it, the application freezes/closes.

     

    • rraghvani's avatar
      rraghvani
      Icon for Champion Level 3 rankChampion Level 3

      What does your data structure look like, and how are you inserting the data?

      I'm guessing you're inserting data, that is not of the correct type!

      • Modesto's avatar
        Modesto
        Occasional Contributor

        rraghvani

        The data returned by the procedure is being inserted as a string into the table, but as I said, it works normally in Windows 10.

  • Modesto's avatar
    Modesto
    Occasional Contributor

    Hassan_Ballan

    That's right, as I said above, it's a table that receives data from a procedure that populates it to use that data in filling the fields in my application.

    I also did this test without debugging and no errors occurred, I also did it with TestExecute and no errors occurred in the test either.

    With a simple variable, this error does not occur when accessed via Alt+W.

  • Modesto's avatar
    Modesto
    Occasional Contributor

    I consulted with our Microsoft team and it was confirmed that the tool is not designed to run on Windows 11. This version has more secure memory access via the DM.dll file, causing TestComplete to close unexpectedly whenever I pause a debugging session or reach a breakpoint while testing Delphi and C# (.NET) applications. I am using JavaScript.

    We performed several tests to try and work around the problem, but all were unsuccessful.

    I disabled "Memory Integrity" (Core Isolation) in Windows 11.

    I added TestComplete.exe to the "Exploit Protection" exclusions (specifically disabling Hardware-Enhanced Stack Protection).

    I re-registered DM.dll.

    Attached is a screenshot of the error that occurs in the Windows event log.

    Since our company hasn't yet renewed the contract that allows us to open a support ticket with SmartBear, I can't proceed with the request. If anyone could do me this favor, I would appreciate it.

    All that's left for us to do here is revert to Windows 10 so as not to interrupt our work.

    Thank you all for your collaboration and help.

    Thank you.

     

    • rraghvani's avatar
      rraghvani
      Icon for Champion Level 3 rankChampion Level 3

      I'm using Windows 11 with Core Isolation enabled; this is managed by our corporate IT, so I cannot override it. Several other forum members are also on Windows 11, and we have not encountered this issue before.

      Variables of the Table Type need to be accessed in a specific way, and I am able to read and set values without issues. I suspect that the "data returned by the procedure is being inserted as a string into the table" might not be handled correctly. Additionally, characters such as diaeresis or umlaut (i.e., Unicode characters) could potentially cause issues as well.

      Going forward, please include details about the AUT (e.g., Delphi or C#/.NET applications), the scripting language being used in TestComplete, and any other relevant information that could help reproduce the issue.

      • Modesto's avatar
        Modesto
        Occasional Contributor

        rraghvani

        I'll share an example of how I'm using it. My application is in C# and I'm using the JavaScript language.

        Example of my function that creates the table and inserts the data.

        function addTableDadosPedidoComercial(Qry)
        {  
            createVariableTemporary('varTableDadosPedidoComercialTest', 'Table');
            
            var t = Project.Variables.VariableByName('varTableDadosPedidoComercialTest');

            //create colums of table temporary  
            t.AddColumn('nCdPedidoComercial');
            t.AddColumn('nCdUsuarioResponsavel');
            t.AddColumn('nCdEmpresa');
            t.AddColumn('nCdModalidadeBoleto');
            t.AddColumn('nCdTerceiro');
            t.AddColumn('nCdTpTerceiro');
            t.AddColumn('nCdTerceiroEntrega');
            t.AddColumn('nCdRepresentante');
            t.AddColumn('nCdProdutoCarregar');
            t.AddColumn('nPreco');
            t.AddColumn('nQtde');
            t.AddColumn('iLimiteMinimoEmbarqueDesembarque');
            t.AddColumn('iLimiteEmbarqueDesembarque');
            t.AddColumn('nCdTpFaturamento');
            t.AddColumn('nPercGorduraA');
            t.AddColumn('nPercGorduraB');
            t.AddColumn('nPercGorduraC');
            t.AddColumn('nPesoMedioGorduraA');
            t.AddColumn('nPesoMedioGorduraB');
            t.AddColumn('nPesoMedioGorduraC');
            t.AddColumn('nCdEmpresaCarga');

            //create rows    
            t.RowCount = Qry.RecordCount;""
         
            iRow = 0;
            while (!Qry.EOF)
            {   
              t('nCdPedidoComercial',iRow) = Qry.field(0).AsString;  
              t('nCdUsuarioResponsavel',iRow) = Qry.field(1).AsString;  
              t('nCdEmpresa',iRow) = Qry.field(2).AsString;  
              t('nCdModalidadeBoleto',iRow) = Qry.field(3).AsString;  
              t('nCdTerceiro',iRow) = Qry.field(4).AsString;  
              t('nCdTpTerceiro',iRow) = Qry.field(5).AsString;  
              t('nCdTerceiroEntrega',iRow) = Qry.field(6).AsString;  
              t('nCdRepresentante',iRow) = Qry.field(7).AsString;  
              t('nCdProdutoCarregar',iRow) = Qry.field(8).AsString;
              t('nPreco',iRow) = Qry.field(9).AsString;
              t('nQtde',iRow) = Qry.field(10).AsString;
              t('iLimiteMinimoEmbarqueDesembarque',iRow) = Qry.field(11).AsString;
              t('iLimiteEmbarqueDesembarque',iRow) = Qry.field(12).AsString;
              t('nCdTpFaturamento',iRow) = Qry.field(13).AsString;
              t('nPercGorduraA',iRow) = Qry.field(14).AsString;
              t('nPercGorduraB',iRow) = Qry.field(15).AsString;
              t('nPercGorduraC',iRow) = Qry.field(16).AsString;
              t('nPesoMedioGorduraA',iRow) = Qry.field(17).AsString;
              t('nPesoMedioGorduraB',iRow) = Qry.field(18).AsString;
              t('nPesoMedioGorduraC',iRow) = Qry.field(19).AsString;
              t('nCdEmpresaCarga',iRow) = Qry.field(20).AsString;
              iRow++;
              Qry.Next();
            } 
          
            createVariableTemporary('contTableDadosPedidoComercial', 'Integer');
            Project.Variables.contTableDadosPedidoComercial = 0;   
        }

        And I'm attaching the example return of the procedure.

        My environment: Windows 11, SQL Server v22

  • Hassan_Ballan's avatar
    Hassan_Ballan
    Icon for Champion Level 3 rankChampion Level 3

    As a workaround, avoid inspecting the table variable using Alt+W or the Watch/Evaluate window during debugging. Instead, log specific values (e.g., Log.Message(t('col', 0))) or copy small subsets of the data into simple variables or arrays for inspection, since normal execution and TestExecute runs are not impacted.

    From what’s been shared, this looks less like a data or scripting issue and more like a debugger-related problem on Windows 11. The crash only occurs when evaluating a populated table variable during a paused debug session, while the same code runs fine outside debug and on Windows 10. That strongly points to how TestComplete’s debugger is trying to evaluate or serialize the table object rather than how the data is being created or stored.

    To help others reproduce and narrow this down, it would be useful to isolate the exact trigger by simplifying the scenario step by step: try a table with just one column and one row, then gradually increase columns and rows to see when it starts failing; check whether accessing a single cell versus evaluating the whole table makes a difference; and confirm whether the crash only happens when using Alt+W versus hovering or logging values. This should help determine whether the issue is tied to table size, structure, or the debugger’s evaluation behavior.

    • Modesto's avatar
      Modesto
      Occasional Contributor

      Hassan_Ballan

      Let's go to the results.

      Regarding log.Message, I had already tried using it, but I can only get a value without a breakpoint in debug mode. If there's a breakpoint, it doesn't even return the value of the table field and freezes/closes TestComplete.

      I hadn't thought of leaving only one column, but I did it now leaving only one column of the table and the same problem occurs when accessing via Alt+W. Even with a breakpoint, without using Alt+W to inspect, the same problem occurs; TestComplete freezes/closes.

    • Modesto's avatar
      Modesto
      Occasional Contributor

      rraghvani

      Please, what version of Windows are you using? I'm using Windows 11 Pro 24H2 edition.

      Regarding the incorrect way we're using it, I discussed it internally and we couldn't agree that it's wrong, especially since we've been using this standard here for years, since we started automating the company, and we've never had this type of problem. We believe that if it were incorrect, it wouldn't have worked from the start.

      We also tried to reproduce the scenario you described (we copied your code exactly) and we couldn't get it to work in either Windows 10 or Windows 11, which gave the same error. We tried another way but were unsuccessful, as it always presented a similar error.

      We made changes and adjustments to work around the error and arrived at the code below. We also had to change the file extension to .xls, which prevented the print error, but we still couldn't inspect the variable via Alt+W. The same problem occurred: TestComplete froze and closed.

      Note: This same code caused the problem in Windows 11, but I didn't have the problem in Windows 10 and the inspection went through normally.

      function Test()
      {
          if (!Project.Variables.VariableExists("DadosPedidoComercial")) {
              Project.Variables.AddVariable("DadosPedidoComercial", "Table");
          }
        
          var t = Project.Variables.VariableByName("DadosPedidoComercial");
        
          if (t.ColumnCount == 0) {
              t.AddColumn('nCdPedidoComercial');
              t.AddColumn('nCdUsuarioResponsavel');
              t.AddColumn('nCdEmpresa');
              t.AddColumn('nCdModalidadeBoleto');
              t.AddColumn('nPreco');
              t.AddColumn('nQtde');
          }

          t.RowCount = 0;
          var row = 0;
          
          var caminho = "C:\\Temp\\Book1.xls";
          var nomeAba = "Dados"; 

          var excelDriver = DDT.ExcelDriver(caminho, nomeAba, true);
          
          if (excelDriver != null) {
              try {
                  while (!excelDriver.EOF())
                  {
                      t.RowCount = row + 1;
                      
                      t.$set("nCdPedidoComercial", row, excelDriver.Value(0));
                      t.$set("nCdUsuarioResponsavel", row, excelDriver.Value(1));
                      t.$set("nCdEmpresa", row, excelDriver.Value(2));
                      t.$set("nCdModalidadeBoleto", row, excelDriver.Value(3));
                      t.$set("nPreco", row, excelDriver.Value(4));
                      t.$set("nQtde", row, excelDriver.Value(5));
                      
                      row++; 
                      excelDriver.Next();
                  }
              } catch (e) {
                  Log.Error("Erro ao ler linha do Excel: " + e.message);
              }
              
              DDT.CloseDriver(excelDriver.Name);
          } else {
              Log.Error("Erro 'Sheet1$' detectado. Ação necessária: Abra o seu arquivo Excel e renomeie a aba de 'Sheet1' para 'Dados' e tente novamente.");
          }

          if (t.RowCount > 0) {
              Log.Message("Total de linhas importadas: " + t.RowCount);
          }
      }

      • rraghvani's avatar
        rraghvani
        Icon for Champion Level 3 rankChampion Level 3

        This is my version of Windows

        Could you try - change your Windows language settings to English. Create a new project in TestComplete, and try the example that I have provided please? Create an Excel spreadsheet with six columns with data.

        Excel 365