[texworks] TeXworks crash on MacOS

Duncan Murdoch murdoch.duncan at gmail.com
Tue Sep 10 14:17:53 CEST 2024


I'm trying to add a long preamble to an existing .tex document that's 
open in TeXworks. When I cut and paste either from another application 
or from another window in TeXworks, it crashes.

The crash happens in two versions.  I first tried this unreleased 0.7:

> © 2007-2024 Stefan Löffler, Jonathan Kew, Charlie Sharpsteen
> Version 0.7 ("github") [r.ff91b87, 2024-01-30 4:02 PM]
> Distributed under the GNU General Public License, version 2 or (at your option) any later version.
> Qt application framework v6.5.3 by The Qt Company.
> Poppler PDF rendering library by Kristian Høgsberg, Albert Astals Cid and others.
> Hunspell spell checker by László Németh.
> Concept and resources from TeXShop by Richard Koch.
> SyncTeX technology by Jérôme Laurens.
> Some icons used are from the Tango Desktop Project.

I then went to the release with this version info:

> © 2007-2024 Stefan Löffler, Jonathan Kew, Charlie Sharpsteen
> Version 0.6.9 ("github") [r.68a2e99, 2024-02-12 12:48 AM]
> Distributed under the GNU General Public License, version 2 or (at your option) any later version.
> Qt application framework v6.5.3 by The Qt Company.
> Poppler PDF rendering library by Kristian Høgsberg, Albert Astals Cid and others.
> Hunspell spell checker by László Németh.
> Concept and resources from TeXShop by Richard Koch.
> SyncTeX technology by Jérôme Laurens.
> Some icons used are from the Tango Desktop Project.

My system is an M3 Mac, running MacOS 14.6.1. Since the binary is built 
for X86-64, it uses Rosetta when running TexWorks.

The sample code I was using is attached.  I first opened the test.tex 
file, then the R_code.tex file.  Both files opened.  Then I copied lines 
7 to 107 from R_code.tex, and tried to paste them into line 12 of 
test.tex.  This led to a crash, with this info:

> -------------------------------------
> Translated Report (Full Report Below)
> -------------------------------------
> 
> Process:               TeXworks [58512]
> Path:                  /Applications/TeXworks.app/Contents/MacOS/TeXworks
> Identifier:            org.tug.texworks
> Version:               0.6.9 (r.68a2e99) (0.6.9 (r.68a2e99))
> Code Type:             X86-64 (Translated)
> Parent Process:        launchd [1]
> User ID:               501
> 
> Date/Time:             2024-09-10 08:13:56.1110 -0400
> OS Version:            macOS 14.6.1 (23G93)
> Report Version:        12
> Anonymous UUID:        E4B481EC-23A5-884D-B698-CB211B26B988
> 
> Sleep/Wake UUID:       5815A7CC-BA66-4DBE-810F-4A697F4941FC
> 
> Time Awake Since Boot: 360000 seconds
> Time Since Wake:       1746 seconds
> 
> System Integrity Protection: enabled
> 
> Notes:
> PC register does not match crashing frame (0x0 vs 0x10F41BDCB)
> 
> Crashed Thread:        0  Dispatch queue: com.apple.main-thread
> 
> Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
> Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000008
> Exception Codes:       0x0000000000000001, 0x0000000000000008
> 
> Termination Reason:    Namespace SIGNAL, Code 11 Segmentation fault: 11
> Terminating Process:   exc handler [58512]
> 
> VM Region Info: 0x8 is not in any region.  Bytes before following region: 4311678968
>       REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
>       UNUSED SPACE AT START
> --->  
>       __TEXT                      100ff0000-101490000    [ 4736K] r-x/r-x SM=COW  /Applications/TeXworks.app/Contents/MacOS/TeXworks
> 
> Error Formulating Crash Report:
> PC register does not match crashing frame (0x0 vs 0x10F41BDCB)
> 
> Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
> 0   QtGui                         	       0x10f41bdcb QTextLine::textStart() const + 11
> 1   QtGui                         	       0x10f3d3eb3 0x10f0d8000 + 3129011
> 2   QtGui                         	       0x10f3d1841 0x10f0d8000 + 3119169
> 3   QtGui                         	       0x10f3cfb1e 0x10f0d8000 + 3111710
> 4   QtGui                         	       0x10f3e12d1 QTextDocumentLayout::draw(QPainter*, QAbstractTextDocumentLayout::PaintContext const&) + 753
> 5   QtWidgets                     	       0x10d540752 QWidgetTextControl::drawContents(QPainter*, QRectF const&, QWidget*) + 146
> 6   QtWidgets                     	       0x10d51323a 0x10d2ef000 + 2245178
> 7   QtWidgets                     	       0x10d5133ed QTextEdit::paintEvent(QPaintEvent*) + 61
> 8   QtWidgets                     	       0x10d34d92e QWidget::event(QEvent*) + 1262
> 9   QtWidgets                     	       0x10d3e4d2b QFrame::event(QEvent*) + 43
> 10  QtCore                        	       0x1104ddcb5 QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) + 229
> 11  QtWidgets                     	       0x10d2fdf93 QApplicationPrivate::notify_helper(QObject*, QEvent*) + 227
> 12  QtWidgets                     	       0x10d2fedcc QApplication::notify(QObject*, QEvent*) + 508
> 13  QtCore                        	       0x1104dda1a QCoreApplication::notifyInternal2(QObject*, QEvent*) + 170
> 14  QtWidgets                     	       0x10d33fa2d QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) + 3981
> 15  QtWidgets                     	       0x10d34766f QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) + 1007
> 16  QtWidgets                     	       0x10d34752a QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) + 682
> 17  QtWidgets                     	       0x10d34752a QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) + 682
> 18  QtWidgets                     	       0x10d33fb68 QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) + 4296
> 19  QtWidgets                     	       0x10d34766f QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) + 1007
> 20  QtWidgets                     	       0x10d33fb68 QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) + 4296
> 21  QtWidgets                     	       0x10d34766f QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) + 1007
> 22  QtWidgets                     	       0x10d33fb68 QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) + 4296
> 23  QtWidgets                     	       0x10d34766f QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) + 1007
> 24  QtWidgets                     	       0x10d34752a QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) + 682
> 25  QtWidgets                     	       0x10d34752a QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) + 682
> 26  QtWidgets                     	       0x10d34752a QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) + 682
> 27  QtWidgets                     	       0x10d33fb68 QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) + 4296
> 28  QtWidgets                     	       0x10d35fb8d QWidgetRepaintManager::paintAndFlush() + 5085
> 29  QtWidgets                     	       0x10d35fe6f QWidgetRepaintManager::sync() + 255
> 30  QtWidgets                     	       0x10d34db55 QWidget::event(QEvent*) + 1813
> 31  QtWidgets                     	       0x10d48ffa4 QMainWindow::event(QEvent*) + 276
> 32  QtWidgets                     	       0x10d2fdfa7 QApplicationPrivate::notify_helper(QObject*, QEvent*) + 247
> 33  QtWidgets                     	       0x10d2fedcc QApplication::notify(QObject*, QEvent*) + 508
> 34  QtCore                        	       0x1104dda1a QCoreApplication::notifyInternal2(QObject*, QEvent*) + 170
> 35  QtCore                        	       0x1104debec QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) + 1468
> 36  libqcocoa.dylib               	       0x10d080cd6 0x10d069000 + 97494
> 37  libqcocoa.dylib               	       0x10d08170d 0x10d069000 + 100109
> 38  CoreFoundation                	    0x7ff8040e97d6 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
> 39  CoreFoundation                	    0x7ff8040e9779 __CFRunLoopDoSource0 + 157
> 40  CoreFoundation                	    0x7ff8040e9548 __CFRunLoopDoSources0 + 215
> 41  CoreFoundation                	    0x7ff8040e81b8 __CFRunLoopRun + 919
> 42  CoreFoundation                	    0x7ff8040e7859 CFRunLoopRunSpecific + 557
> 43  HIToolbox                     	    0x7ff80efe0a09 RunCurrentEventLoopInMode + 292
> 44  HIToolbox                     	    0x7ff80efe0646 ReceiveNextEventCommon + 201
> 45  HIToolbox                     	    0x7ff80efe0561 _BlockUntilNextEventMatchingListInModeWithFilter + 66
> 46  AppKit                        	    0x7ff8076b9171 _DPSNextEvent + 880
> 47  AppKit                        	    0x7ff807fcdaf0 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1273
> 48  AppKit                        	    0x7ff8076aa585 -[NSApplication run] + 603
> 49  libqcocoa.dylib               	       0x10d080127 0x10d069000 + 94503
> 50  QtCore                        	       0x1104e7486 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 486
> 51  QtCore                        	       0x1104de007 QCoreApplication::exec() + 119
> 52  TeXworks                      	       0x1010342a7 main + 39
> 53  dyld                          	       0x20195f345 start + 1909

Duncan Murdoch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.tex
Type: application/x-tex
Size: 296 bytes
Desc: not available
URL: <https://tug.org/pipermail/texworks/attachments/20240910/efff30d4/attachment.tex>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: R_code.tex
Type: application/x-tex
Size: 5501 bytes
Desc: not available
URL: <https://tug.org/pipermail/texworks/attachments/20240910/efff30d4/attachment-0001.tex>


More information about the texworks mailing list.