- C 68%
- Python 22.9%
- Roff 4.8%
- Shell 2.2%
- M4 1.3%
- Other 0.8%
* gui: drive GTK from the main thread, not the scan worker Fixes the segfault-on-scan family: #427, #413, #435, #450. GameConqueror is from the PyGTK era and still used Gdk.threads_enter() / Gdk.threads_leave() to let a background thread touch widgets. That global lock is gone from GTK. On a modern GTK3 the calls no longer serialize anything, so the scan worker thread mutating widgets races the main loop and corrupts it, which is the "Gtk-CRITICAL ... assertion failed" spew and then the segfault people keep reporting. There were three enter/leave sites but only one real background thread: - progress_watcher and data_worker run on the main loop already, via GLib.timeout_add. Their enter/leave was dead. Removed. - scan_thread_func is the actual worker thread. It now does only the blocking backend.send_command, then hands the widget updates back to the main loop with GLib.idle_add(self._on_scan_finished). No widget is touched off the main thread anymore. command_lock is released before the idle callback, so update_scan_result re-taking it runs on the main thread without deadlocking. source_remove of the progress watcher also moves to the main thread where it belongs. Also dropped the GObject.threads_init / Gdk.threads_init calls in main. No-ops since PyGObject 3.11, they only warned on every launch (#434), and nothing needs them once the worker is off the GTK path. This also clears the way for GTK4, where threads_enter/leave do not exist at all. Reproduced the crash locally with a headless driver that runs 40 scans in a row against a memfake target while a locked cheat row makes data_worker poll: the old code dies 4/4 runs (SIGSEGV or SIGABRT), this code is clean 3/3, zero Gtk-CRITICAL, all 40 scans finishing and returning 202 matches each. No behaviour change to scanning, locking, or the cheat list. * gui: address review - trim comments, use with-lock consistently Cut the comments that only described the old threaded code, keeping the forward-looking ones a future reader needs. Move the remaining manual command_lock.acquire()/release() pairs to with self.command_lock:, matching the scan worker. data_worker keeps its non-blocking acquire(0) since with cannot express skip-if-busy, but its held region is now under try/finally so the lock is released if the body raises. |
||
|---|---|---|
| .github | ||
| gui | ||
| po | ||
| test | ||
| .clang-format | ||
| .gitignore | ||
| AUTHORS | ||
| autogen.sh | ||
| build_for_android.sh | ||
| ChangeLog | ||
| commands.c | ||
| commands.h | ||
| common.c | ||
| common.h | ||
| configure.ac | ||
| COPYING | ||
| endianness.h | ||
| getline.c | ||
| getline.h | ||
| gpl-3.0.txt | ||
| handlers.c | ||
| handlers.h | ||
| interrupt.c | ||
| interrupt.h | ||
| lgpl-3.0.txt | ||
| licence.h | ||
| list.h | ||
| main.c | ||
| Makefile.am | ||
| maps.c | ||
| maps.h | ||
| menu.c | ||
| menu.h | ||
| NEWS | ||
| ptrace.c | ||
| readline.c | ||
| readline.h | ||
| README | ||
| README.md | ||
| scanmem.1 | ||
| scanmem.c | ||
| scanmem.h | ||
| scanroutines.c | ||
| scanroutines.h | ||
| sets.c | ||
| sets.h | ||
| show_message.c | ||
| show_message.h | ||
| targetmem.c | ||
| targetmem.h | ||
| TODO | ||
| value.c | ||
| value.h | ||
scanmem & GameConqueror
scanmem is a debugging utility designed to isolate the address of an arbitrary variable in an executing process. scanmem simply needs to be told the pid of the process and the value of the variable at several different times.
After several scans of the process, scanmem isolates the position of the variable and allows you to modify its value.
GUI
GameConqueror is a GUI front-end for scanmem, providing more features, such as:
- Flexible syntax for searching
- Easier and multiple variable locking
- Better process finder
- Memory browser/editor
See gui/README.md for more details.
Requirements
scanmem requires libreadline to read commands interactively, and /proc must be
mounted. GameConqueror requirements are documented in gui/README.md.
Documentation
To read documentation:
man scanmemman gameconquerorscanmem --help- enter
helpat the scanmem prompt - use the interactive help of GameConqueror
Build Requirements
The build requires autotools-dev, libtool, libreadline-dev, intltool, and python.
Build and Install
To generate files required for the build:
./autogen.sh
To build with GUI:
./configure --prefix=/usr --enable-gui && make
sudo make install
To build without GUI:
./configure --prefix=/usr && make
sudo make install
scanmem and GameConqueror use static paths to libscanmem. So executing
ldconfig is not required. Consider setting --libdir=/usr/lib/scanmem or
--libdir=/usr/lib64/scanmem to avoid that libscanmem is in a library
search path.
Run ./configure --help for more details.
Android Build
You need a standalone toolchain of Android NDK (Advanced method) to build interactive capabilities for Android. For more information, run:
./build_for_android.sh help
License:
GPLv3, LGPLv3 for libscanmem