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 


stringToMD5String Error:Access violation

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
Pocoyo Engine
How do I cheat?
Reputation: 0

Joined: 03 Jan 2017
Posts: 3

PostPosted: Thu Sep 05, 2019 3:10 pm    Post subject: stringToMD5String Error:Access violation Reply with quote

When running this script in version 7.0, I get this error.
Code:
local hashstring = stringToMD5String('test')
print(hashstring)

Error:Access violation
Script Error
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 218

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Thu Sep 05, 2019 5:12 pm    Post subject: Reply with quote

32bit CE works
64bit CE doesn't

_________________
Back to top
View user's profile Send private message MSN Messenger
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Fri Sep 06, 2019 2:31 am    Post subject: Reply with quote

redownload CE from patreon or github

(the main website link still needs to be updated by a third party)

_________________
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
mgr.inz.Player
I post too much
Reputation: 218

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Fri Sep 06, 2019 4:50 am    Post subject: Reply with quote

CE from 6.IX.2019

64bit
Code:
return stringToMD5String('test')

Error:Access violation
Script Error
return stringToMD5String('')

Error:Access violation
Script Error
return stringToMD5String(nil)

Error:Access violation
Script Error


32bit
Code:
return stringToMD5String('test')

1:098f6bcd4621d373cade4e832627b4f6
return stringToMD5String('')

1:d41d8cd98f00b204e9800998ecf8427e
return stringToMD5String(nil)

1:d41d8cd98f00b204e9800998ecf8427e




Edit1:

compiling CE from current Git commit, build modes:
- "Release 64-Bit" - doesn't work
- "debug-nomt 64-bit" - works

I modified "debug-nomt 64-bit":
- added <SmartLinkUnit Value="True"/> - still works
- changed OptimizationLevel to 1 - still works
- changed OptimizationLevel to 2 - SIGSEGV in luaopen_utf8 ()
- set OptimizationLevel back to 0, added <VariablesInRegisters Value="True"/> - SIGSEGV in luaopen_utf8 ()



Edi2:
I rolled back to original cheatengine.lpi and modified "Release 64-Bit" build mode so it is: "OptimizationLevel = 1" and "VariablesInRegisters = False"
Code:
Index: cheatengine.lpi
===================================================================
--- cheatengine.lpi   (wersja 4415)
+++ cheatengine.lpi   (kopia robocza)
@@ -50,8 +50,8 @@
             <TargetCPU Value="x86_64"/>
             <TargetOS Value="win64"/>
             <Optimizations>
-              <OptimizationLevel Value="3"/>
-              <VariablesInRegisters Value="True"/>
+              <OptimizationLevel Value="1"/>
+              <VariablesInRegisters Value="False"/>
             </Optimizations>
           </CodeGeneration>
           <Linking>



and I compiled with this build mode. No more "Access violations"/SIGSEGV.

Probably we have to find different FPC? Will try current revision from "Fixes 3.2" and "trunk" branch.



EDIT3:
Lazarus 2.0.0 (official)

FPCs tested:
- Free Pascal Compiler version 3.3.1-r42929 [2019/09/06] for x86_64 (/trunk rev 42929)
- Free Pascal Compiler version 3.2.0-beta-r42922 [2019/09/06] for x86_64 (/branches/fixes_3_2 rev 42922)


CE clean&build with -O3 and -OoREGVAR - "Access violations"/SIGSEGV
CE clean&build with -O1 and without -OoREGVAR - "Access violations"/SIGSEGV

_________________


Last edited by mgr.inz.Player on Fri Sep 06, 2019 7:06 am; edited 1 time in total
Back to top
View user's profile Send private message MSN Messenger
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Fri Sep 06, 2019 7:02 am    Post subject: Reply with quote

it's fixed on github (size_t isn't cardinal but just size_t)


patreon and github have been updated, main page will take a few more days. They have Friday and Saturday off

_________________
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
mgr.inz.Player
I post too much
Reputation: 218

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Fri Sep 06, 2019 7:37 am    Post subject: Reply with quote

Why the hell GDB shows luaopen_utf8?
I thought new FPC are not compatible with lua53-64.dll when optimizations are used.

_________________
Back to top
View user's profile Send private message MSN Messenger
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Fri Sep 06, 2019 9:23 am    Post subject: Reply with quote

it's stack corruption.
The previous fpc would allocate 8 bytes in the stack for a 4 byte value, but this new one apparently only allocates 4 bytes on the stack for 4 byte values
so the return addres or stackframe pointer gets overwritten when writing 8 bytes to a 4 byte address

_________________
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
mgr.inz.Player
I post too much
Reputation: 218

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Fri Sep 06, 2019 4:36 pm    Post subject: Reply with quote

I think I got it. Thank you.
_________________
Back to top
View user's profile Send private message MSN Messenger
lampuiho
Expert Cheater
Reputation: 6

Joined: 16 Jan 2010
Posts: 122

PostPosted: Mon Jan 20, 2020 8:45 pm    Post subject: Reply with quote

Just redownloaded from the main site. The modified date of the exe shows 06/09/2019 but it still gives me this error.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Tue Jan 21, 2020 4:54 am    Post subject: Reply with quote

so:
Code:

if getCheatEngineFileVersion()<1970324836980599 then
print('too old')
else
print('ok')
end


prints out ok ?

And when you say :
Quote:

it still gives me this error.

Do you mean it give that error with the exact same script as posted here in the first post, or do you mean gives the same error with a completely unrelated random script ?

_________________
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
lampuiho
Expert Cheater
Reputation: 6

Joined: 16 Jan 2010
Posts: 122

PostPosted: Wed Jan 22, 2020 10:02 am    Post subject: Reply with quote

[quote="Dark Byte"]so:
prints out ok ?/quote]

Prints too old. I downloaded the manual rar.

Yes, the same error.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Wed Jan 22, 2020 12:27 pm    Post subject: Reply with quote

ah ok, the manual rar is a bit outdated
_________________
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
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