Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


7.2: TTreeNodes.GetNodeFromIndex - Error

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
Bavarian
Cheater
Reputation: 0

Joined: 28 Feb 2018
Posts: 30

PostPosted: Sat Dec 12, 2020 3:53 pm    Post subject: 7.2: TTreeNodes.GetNodeFromIndex - Error Reply with quote

TTreeNodes.GetNodeFromIndex: Consistency Error - Count too big

i'm working with dynamic memrecs creation and deletion from CE table on Async script activation.

the following table either generates an error "TTreeNodes.GetNodeFromIndex: Consistency Error - Count too big" or CE window becomes grey.


To reproduce: enable/wait/disable 5-7 times the script attached
As a workaround I need to disable the option "Execute asynchronous", then scrip works. Would be great if there are other workarounds or fixes.


Code:

<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="34">
  <CheatEntries>
    <CheatEntry>
      <ID>25994</ID>
      <Description>"Create children on Enable and Delete them all on Disable"</Description>
      <Options moDeactivateChildrenAsWell="1"/>
      <LastState/>
      <Color>000000</Color>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript Async="1">{$lua}
[ENABLE]
   mr = AddressList.createMemoryRecord();
   mr.Description   = "header temp - "
   mr.Options       = "[moHideChildren],[moDeactivateChildrenAsWell]"
   mr.IsGroupHeader = true;
   mr.DontSave      = true;
   mr.appendToEntry(memrec);

   for i=1,500,1 do
      mr_child = AddressList.createMemoryRecord();
      mr_child.Type           = vtDword;
      mr_child.Address        = addr;
      mr_child.Description    = "child - "..i;
      mr_child.DontSave       = true;
      mr_child.appendToEntry(mr);

      mr.Description = "header temp - "..i
   end

[DISABLE]
  if mr then mr.Delete(); end;
  mr = nil


</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>25996</ID>
          <Description>"header permanent"</Description>
          <LastState Value="" RealAddress="00000000"/>
          <GroupHeader>1</GroupHeader>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
  </CheatEntries>
  <UserdefinedSymbols/>
</CheatTable>




Screenshot 2020-12-13 004652.png
 Description:
 Filesize:  148.65 KB
 Viewed:  2195 Time(s)

Screenshot 2020-12-13 004652.png




Last edited by Bavarian on Sat Dec 12, 2020 10:30 pm; edited 1 time in total
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25860
Location: The netherlands

PostPosted: Sat Dec 12, 2020 4:15 pm    Post subject: Reply with quote

only the main thread is allowed to touch the GUI, to make sure of that you must encapsulate GUI access in
Code:

synchronize(function() xxx end)

blocks when using an async memory record

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Bavarian
Cheater
Reputation: 0

Joined: 28 Feb 2018
Posts: 30

PostPosted: Sat Dec 12, 2020 10:29 pm    Post subject: Reply with quote

it did the trick, thanx
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites