Closed Rojetto closed 9 months ago
Hi, thanks for the report. I haven't been able to reproduce the issue on my Mac Mini, but looking at the crash dump I've attempted a very speculative fix, which I've pushed as v0.4.4:
https://github.com/machinewrapped/gpt-subtrans/releases/tag/v0.4.4
Can you give it a try and let me know if it helps?
I will add an option to auto-save after every batch, it's a good idea - better than losing successfully translated batches. You could try reducing the scene threshold so that there are more scenes with fewer batches as an interim measure :-)
Thanks for the quick fix! Just tried another full translation and nothing crashed 👍 I'll let you know if anything goes wrong again, but for now it looks like the change worked.
Great! I'll close the issue for now but let me know if it shows up again.
Thanks for the app! Unfortunately I keep having frequent, random crashes on macOS, running version 0.4.2, Python 3.11.5. Here's the error:
And the full error report macOS generated
``` ------------------------------------- Translated Report (Full Report Below) ------------------------------------- Process: Python [57147] Path: /opt/homebrew/*/Python.framework/Versions/3.11/Resources/Python.app/Contents/MacOS/Python Identifier: org.python.python Version: 3.11.5 (3.11.5) Code Type: ARM-64 (Native) Parent Process: Exited process [57146] Responsible: Terminal [56829] User ID: 501 Date/Time: 2023-10-07 14:03:40.8069 +0800 OS Version: macOS 14.0 (23A344) Report Version: 12 Anonymous UUID: 0E73F3BC-EA11-D235-13B7-82C7992F5AFA Sleep/Wake UUID: 307E2A73-1C35-4A7C-A973-0BD2E5CA912D Time Awake Since Boot: 69000 seconds Time Since Wake: 4275 seconds System Integrity Protection: enabled Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x0000b93fc2fe7960 -> 0x0000393fc2fe7960 (possible pointer authentication failure) Exception Codes: 0x0000000000000001, 0x0000b93fc2fe7960 Termination Reason: Namespace SIGNAL, Code 11 Segmentation fault: 11 Terminating Process: exc handler [57147] VM Region Info: 0x393fc2fe7960 is not in any region. Bytes after previous region: 62464980842849 Bytes before following region: 42607099086496 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL commpage (reserved) 1000000000-7000000000 [384.0G] ---/--- SM=NUL ...(unallocated) ---> GAP OF 0x5f9000000000 BYTES MALLOC_NANO 600000000000-600020000000 [512.0M] rw-/rwx SM=PRV Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 QtGui 0x1060ab76c 0x105dd8000 + 2963308 1 QtGui 0x1060ab708 0x105dd8000 + 2963208 2 QtGui 0x1060a3574 QTextEngine::itemize() const + 10040 3 QtGui 0x1060a8a34 QTextEngine::lineNumberForTextPosition(int) + 92 4 QtGui 0x1060c6140 QTextLayout::lineForTextPosition(int) const + 24 5 QtGui 0x10605d1e0 QTextCursorPrivate::setX() + 252 6 QtWidgets 0x106ba24a8 0x106998000 + 2139304 7 QtCore 0x108ad1bc0 QObject::event(QEvent*) + 612 8 QtWidgets 0x1069a5afc QApplicationPrivate::notify_helper(QObject*, QEvent*) + 272 9 QtWidgets 0x1069a6960 QApplication::notify(QObject*, QEvent*) + 512 10 QtCore 0x108a8fc54 QCoreApplication::notifyInternal2(QObject*, QEvent*) + 292 11 QtCore 0x108a90f04 QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) + 1428 12 libqcocoa.dylib 0x10d20b224 0x10d1f4000 + 94756 13 libqcocoa.dylib 0x10d20bcfc 0x10d1f4000 + 97532 14 CoreFoundation 0x18e21bd28 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 15 CoreFoundation 0x18e21bcbc __CFRunLoopDoSource0 + 176 16 CoreFoundation 0x18e21ba2c __CFRunLoopDoSources0 + 244 17 CoreFoundation 0x18e21a61c __CFRunLoopRun + 828 18 CoreFoundation 0x18e219c2c CFRunLoopRunSpecific + 608 19 HIToolbox 0x198772448 RunCurrentEventLoopInMode + 292 20 HIToolbox 0x198772284 ReceiveNextEventCommon + 648 21 HIToolbox 0x198771fdc _BlockUntilNextEventMatchingListInModeWithFilter + 76 22 AppKit 0x1919f4f90 _DPSNextEvent + 660 23 AppKit 0x1921c8b94 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 716 24 AppKit 0x1919e843c -[NSApplication run] + 476 25 libqcocoa.dylib 0x10d20a600 0x10d1f4000 + 91648 26 QtCore 0x108a995d4 QEventLoop::exec(QFlagsI realize that doesn't really help in pinning the issue down. Usually it happens when starting a translation, after a few seconds (maybe it's trying to save the project file?). Normally, if the first batch goes through successfully then it keeps running for the whole thing. Sometimes still crashes randomly after a few minutes though. Let me know if I can provide any other info.
Also, would be great if the app auto-saved much more frequently (maybe after every batch). When it crashes after having translated a lot of batches, I sometimes use a lot of progress (and API credit).