Hacking TCP Gecko.NET Memory Reading Exception

BullyWiiPlaza

Nintendo Hacking <3
Member
Joined
Aug 2, 2014
Messages
1,932
Trophies
0
XP
2,433
Country
Germany
I'm sorry for opening yet another topic about this TCP Gecko.NET issue but it has to catch some attention since many people are suffering from this. I also spent some time trying to debug the issue. Luckily, exception logs have been written. I'm referring to the TCP Gecko.NET build by wj44 in case you want to follow along so let's get started with the analysis. :)

The following appears to be the first exception that is being thrown:
Code:
12/12/2015 2:34:08 AM: Opened log
2:34:08 AM: Exception occured!
Message: Exception of type 'TCPTCPGecko.ETCPGeckoException' was thrown.
Stack Trace:
   at TCPTCPGecko.TCPGecko.Dump(UInt32 startdump, UInt32 enddump, Stream[] saveStream) in d:\Consoles\WiiU\Applications\TCP Gecko.NET\Source\Gecko dNet\TCPGecko.cs:line 525
   at TCPTCPGecko.TCPGecko.Dump(UInt32 startdump, UInt32 enddump, Stream saveStream) in d:\Consoles\WiiU\Applications\TCP Gecko.NET\Source\Gecko dNet\TCPGecko.cs:line 492
   at GeckoApp.MemoryViewer.Update(Boolean fast) in d:\Consoles\WiiU\Applications\TCP Gecko.NET\Source\Gecko dNet\MemViewer.cs:line 136
Inner Exception:
This stack trace must be read from the bottom to the top meaning that the function calls at the bottom were called first and then the one above. In this case we can see that the function
Code:
public void Update(bool fast)
in the file
Code:
MemViewer.cs
has been called and it threw an exception in line 136. What happens in this line? The gecko handler dumps memory for the memory viewer cells. The called function looks as follows:
Code:
gecko.Dump(sAddress, sAddress + 0x100, miniDump);
Let's follow that in the TCPGecko.cs file and we find the function definition:
Code:
public void Dump(UInt32 startdump, UInt32 enddump, Stream saveStream)
{
    Stream [] tempStream = { saveStream };
    Dump(startdump, enddump, tempStream);
}
The second lowest entry in the stack trace says that in this function, the second line has thrown the exception which obviously is
Code:
Dump(startdump, enddump, tempStream);
This overloaded function can be found right below in the source code.

The final stack trace points to line 525 but it only contains a Byte assignment:
Code:
Byte retry = 0;
It's quite obvious that reading memory somehow fails but how does this make sense? It works on some games but not on others. Also it seems to work flawlessly on static screens like the main screen for any game but not everywhere after. As you might have noticed, I indeed tried switching to the memory viewer when the crash occurred but as we know, the feature isn't broken by default.

I will go over the second exception much quicker now:
Code:
2:38:22 AM: Exception occured!
Message: Exception of type 'TCPTCPGecko.ETCPGeckoException' was thrown.
Stack Trace:
   at TCPTCPGecko.TCPGecko.Dump(UInt32 startdump, UInt32 enddump, Stream[] saveStream) in d:\Consoles\WiiU\Applications\TCP Gecko.NET\Source\Gecko dNet\TCPGecko.cs:line 533
   at TCPTCPGecko.TCPGecko.Dump(UInt32 startdump, UInt32 enddump, Stream saveStream) in d:\Consoles\WiiU\Applications\TCP Gecko.NET\Source\Gecko dNet\TCPGecko.cs:line 492
   at GeckoApp.MemoryViewer.Update(Boolean fast) in d:\Consoles\WiiU\Applications\TCP Gecko.NET\Source\Gecko dNet\MemViewer.cs:line 136
Inner Exception:
Line 535 contains
Code:
GameNameStored = false;
, line 566 is empty (wtf?), line 1400 calls
Code:
Dump(paddress, paddress + 4, stream);
, line 492 calls
Code:
Dump(startdump, enddump, tempStream);
again and finally line 631 executes
Code:
Byte reply = response[0];
. Is the read response possibly invalid?
Code:
Byte[] response = new Byte[1];
if (GeckoRead(response, 1) != FTDICommand.CMD_OK)
{
    //Major fail, give it up
    GeckoWrite(BitConverter.GetBytes(GCFAIL), 1);
    throw new ETCPGeckoException(ETCPErrorCode.FTDIReadDataError);
}
I'm not really sure how this can be fixed therefore. :( Anyway, I'm looking forward to you guys' opinions.

@Mr. Mysterio
@NWPlayer123
@Marionumber1
@Chadderz
 

icw35

Well-Known Member
Member
Joined
Sep 22, 2010
Messages
542
Trophies
0
XP
683
Country
Wish I'd seen your youtube post before trying to dump BO II with TCPGecko. So I just went ahead and bought the game. Selling for £2.95 with free delivery in UK. Bargain.
 

FaTaL_ErRoR

AKA ŦƕƎ ƠṀƐƝ
Member
Joined
Mar 9, 2014
Messages
491
Trophies
0
XP
423
Country
United States
If I had to wager a guess...(and by guess it's just that a guess)
I would say it looks like the boolean modifier is crashing because it is too complex. Someone should add cork to tcp gecko...(if it's not already)
Maybe it could handle more complex stuff.
 

Site & Scene News

General chit-chat
Help Users
    Stash23 @ Stash23: test