Page 7 of 7

Re: working Assembler memin workareound!!!

PostPosted: Wed Jun 25, 2014 7:02 pm
by Exo
KG_is_back wrote:
trogluddite wrote:Yes, they'll make a fine couple I think - always good to have a choice to suit the job at hand!Do you have any examples of how the Analyser code changes sometimes? I'm thinking that if we can compare them, it might be possible to use Ruby Regex'es to parse the code - they're really good at picking out specific patterns when you don't know the exact position of what you're looking for. Fast too, as the Ruby Regex engine is a C++ library.Not been able to get any good examples yet, though, as it all seems to work pretty reliably here so far!


I believe that will not solve the issue, because when the bug happens, the code string from the analyzer doesn't get updated anymore (it doesn't even change when you disconnect the modules form the analyzer or change/remove the mem). anyway here's the example of the buggy code:

Code: Select all
***** Init *****
push ebp;
mov ebp,edi;
pop ebp
ret;
cmp eax,1998;  //this line is extra - it shouldn't be here. the actual code is random: sometimes it's ret; sometimes mov ebp,edi; sometimes completely different.
***** Sample Rate *****
push ebp;
mov ebp,edi;
push eax;
push ebx;
mov eax,119761008;
mov eax,[eax];
cmp eax,0;
jz 241
mov eax,127344016;
movaps xmm0,dword ptr[ebp+0]
minps xmm0,dword ptr[eax]
maxps xmm0,dword ptr [ebp+4256]
movaps dword ptr[ebp+4240],xmm0
fld dword ptr[ebp+4240]
fistp dword ptr[ebp+4224]
fld dword ptr[ebp+4244]
fistp dword ptr[ebp+4228]
fld dword ptr[ebp+4248]
fistp dword ptr[ebp+4232]
fld dword ptr[ebp+4252]
fistp dword ptr[ebp+4236]
mov eax,dword ptr[ebp+4224]
shl eax,3;
mov ebx,eax;
mov eax,119761008;
mov eax,[eax];
add eax,ebx;
fld dword ptr[eax]
fstp dword ptr[ebp+4192]
add eax,4
fld dword ptr[eax]
fstp dword ptr[ebp+4208]
mov eax,dword ptr[ebp+4228]
shl eax,3;
mov ebx,eax;
mov eax,119761008;
mov eax,[eax];
add eax,ebx;
fld dword ptr[eax]
fstp dword ptr[ebp+4196]
add eax,4
fld dword ptr[eax]
fstp dword ptr[ebp+4212]
mov eax,dword ptr[ebp+4232]
shl eax,3;
mov ebx,eax;
mov eax,119761008;
mov eax,[eax];
add eax,ebx;
fld dword ptr[eax]
fstp dword ptr[ebp+4200]
add eax,4
fld dword ptr[eax]
fstp dword ptr[ebp+4216]
mov eax,dword ptr[ebp+4236]
shl eax,3;
mov ebx,eax;
mov eax,119761008;
mov eax,[eax];
add eax,ebx;
fld dword ptr[eax]
fstp dword ptr[ebp+4204]
add eax,4
fld dword ptr[eax]
fstp dword ptr[ebp+4220]
pop ebx
pop eax
pop ebp
ret;


Judging by your description of the problem wouldn't just splitting off everything before ***** Sample Rate ***** solve the issue? Like so....
MemToPointer.fsm
(1.05 KiB) Downloaded 992 times

Re: working Assembler memin workareound!!!

PostPosted: Wed Jun 25, 2014 7:26 pm
by KG_is_back
Exo wrote:Judging by your description of the problem wouldn't just splitting off everything before ***** Sample Rate ***** solve the issue? Like so....


No, because first of all, the "extra code lines" appear anywhere in the code randomly, when this glitch happens. Also the Analyzer gets sort of jammed - it shows the same code no matter what you do (even when you disconnect the wave read prim from it, which should normally cause update of the string). I believe only way to fix this issue is to fix the bug in the source-code (if it's really a bug) or somehow prevent it from happening (so far I have not even found the actual circumstances of what might be causing this).