Thread: Need a some help spotting the cause of an issue

  1. #1
    Registered User awsdert's Avatar
    Join Date
    Jan 2015
    Posts
    1,733

    Need a some help spotting the cause of an issue

    First a link to the code:
    GitHub - awsdert/gasp at 6d6ed79f6653fec9509fe69a5edfd2276f1993c7

    Second is the names of the relevant functions to look at:
    Code:
    proc_handle_dumper()
    proc_handle_dump() - I suggest starting with this one
    proc_handle_aobscan() - I suggest this one as next function to check if the trail of last one leads nowhere
    proc_handle__aobscan_next()
    proc_handle__aobscan_test()
    glance_dump()
    change_dump()
    lua_proc_handle__get_scan_list()
    That should be all of them, now for a description of what I do to encounter the problem:
    Code:
    1. I run the default target "run" by simply running make (it auto selects when no target is provided)
    2. I hook the process (in this case I load the cheat file for it to auto-hook but manual should produce same result)
    3. I scan for known value of a previously found address via GameConqueror, gasp reports the dump progress just fine but as soon as it enters the scan state it quits real quick
    Assuming the scan had actually found results then line 176-177 in scan.lua should retrieve up to 100 results and display them but it does not retrieve any.

    If you find a function not readable enough please just raise an issue for it so I can target it while you look at other functions, for now I have no further ideas on what is causing the lack of results so I'm gonna make myself dinner.
    Last edited by awsdert; 03-09-2020 at 02:31 PM. Reason: Left a function outside the box

  2. #2
    Registered User awsdert's Avatar
    Join Date
    Jan 2015
    Posts
    1,733
    After some decent shuteye I spotted a few issues and fixed them, I also added a few "fprintf( stderr" statements to make sure I was getting into the loop that at least reads through each region's dumped data, the issues in question were a mis-written region count (was writing to wrong spot) and write where there should've been reads of the scan number and region count (probably an un-edited copy/paste), I also simplified proc_handle_aobscan more so that it is easier to read/identify what it's doing. I'm still however not getting any results back after the scan so I still need help there, the narrowed down list of functions to look at is now:
    Code:
    glance_dump()
    change_dump()
    proc_handle_aobscan()
    proc_handle__aobscan_test()
    Edit: Forgot to add link to updated tree
    GitHub - awsdert/gasp at ffa18eca1bab13424e93cd55810168978f0df28d
    Last edited by awsdert; 03-10-2020 at 05:23 AM.

  3. #3
    Registered User awsdert's Avatar
    Join Date
    Jan 2015
    Posts
    1,733
    Fixed a lock up caused by incorrect pipe usage, still can't get the results showing however, could really use the help in identifying the cause of that (besides the commented out draw call, I'll wait until I get a count reported before I go back to that call)

    Edit: Forgot the link:
    GitHub - awsdert/gasp at 18e97cbf8067fa44eec75af07796c9018253721b

  4. #4
    Registered User awsdert's Avatar
    Join Date
    Jan 2015
    Posts
    1,733
    Managed to fix it, can't remember all the possible causes I found but among them a definite cause would be forgetting to shift the file offset back before writing the data (although that should've caused all addresses to be treated as "located"). Just trying to fix a couple of oddities now (and what I'm assuming is a memory leak via the file because after the scan is already finished the results somehow increased - anyone wanting to look into that while I take a break and do some restock of supplies, start with 'lua_proc_handle__get_scan_list' and bottom of scan.lua file since that is where everything is retrieved for display) such as incorrect addresses recorded
    GitHub - awsdert/gasp at 0423b93ecd430798c5e33825c18407eba7992d6f

  5. #5
    Registered User awsdert's Avatar
    Join Date
    Jan 2015
    Posts
    1,733
    Well addresses are fixed, now I just gotta figure out that leak, turned out I had messed up somehow right before I started dumping, now I use a container function to sort that out consistently at both start and end of dump
    GitHub - awsdert/gasp at fd2668d20c49cb007a5bbe308e693604dcc57757

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Beginner having difficulty spotting problem
    By Neverender! in forum C Programming
    Replies: 6
    Last Post: 03-23-2016, 09:53 AM
  2. Bulls and Cows Program - Spotting the Problem
    By YannB in forum C Programming
    Replies: 8
    Last Post: 12-19-2013, 10:37 AM
  3. bandwidth issue / network issue with wireless device communication
    By vlrk in forum Networking/Device Communication
    Replies: 0
    Last Post: 07-05-2010, 11:52 PM
  4. Spotting the error...
    By Enegis in forum C++ Programming
    Replies: 3
    Last Post: 11-17-2008, 05:51 AM
  5. winHTTP : spotting a 404 (and other server errors)
    By reanimated in forum Windows Programming
    Replies: 1
    Last Post: 05-28-2004, 05:58 PM

Tags for this Thread