Author Topic: 1.8 RC7 OSX crash  (Read 3539 times)

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
1.8 RC7 OSX crash
« on: 2013 May 15 22:02:59 »
the circumstances here were weird. i had a preview defined over the center of a galaxy. i accidentally clicked the preview, and somehow there was only a mouse-down event with no mouse-up. i see this a lot of times if i click on a process icon - the mouse just "picks up" the icon and i can't release the icon with the mouse. pressing the escape key releases the process icon.

anyway, i let go of my mouse, which is on a slanted surface. the mouse started moving down, taking the preview with it, and eventually i got a segmentation violation dialog box followed by this crash.


Code: [Select]
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        0x00007fff8d93f212 __pthread_kill + 10
1   libsystem_c.dylib              0x00007fff94e5faf4 pthread_kill + 90
2   libsystem_c.dylib              0x00007fff94ea3dce abort + 143
3   libc++abi.dylib                0x00007fff964e0a17 abort_message + 257
4   libc++abi.dylib                0x00007fff964de3c6 default_terminate() + 28
5   libobjc.A.dylib                0x00007fff8ec13887 _objc_terminate() + 111
6   libc++abi.dylib                0x00007fff964de3f5 safe_handler_caller(void (*)()) + 8
7   libc++abi.dylib                0x00007fff964de3ed __cxxabiv1::__terminate(void (*)()) + 9
8   libc++abi.dylib                0x00007fff964de7c3 __cxa_call_terminate + 56
9   libc++abi.dylib                0x00007fff964df04a __gxx_personality_v0 + 1274
10  libunwind.dylib                0x00007fff8e180860 unwind_phase2 + 186
11  libunwind.dylib                0x00007fff8e17fc6b _Unwind_RaiseException + 231
12  libc++abi.dylib                0x00007fff964df5aa __cxa_throw + 98
13  com.pleiades-astrophoto.PixInsight 0x0000000100eb4b16 pcl::CriticalSignalHandler(int) + 102
14  libsystem_c.dylib              0x00007fff94e4c8ea _sigtramp + 26
15  com.pleiades-astrophoto.PixInsight 0x00000001002608d2 pi::AbstractImageView::__EndPreviewEdit() + 108
16  com.pleiades-astrophoto.PixInsight 0x000000010026e37b pi::AbstractImageView::mouseReleaseEvent(QMouseEvent*) + 1911
17  QtGui                          0x000000010169adb0 QWidget::event(QEvent*) + 366
18  QtGui                          0x00000001019e51f2 QFrame::event(QEvent*) + 40
19  QtGui                          0x0000000101a5e484 QAbstractScrollArea::viewportEvent(QEvent*) + 126
20  com.pleiades-astrophoto.PixInsight 0x000000010026cdde pi::AbstractImageView::viewportEvent(QEvent*) + 50
21  QtGui                          0x0000000101a6084d 0x1015d7000 + 4757581
22  QtCore                        0x0000000103a4ca71 QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) + 155
23  QtGui                          0x00000001016506a8 QApplicationPrivate::notify_helper(QObject*, QEvent*) + 288
24  QtGui                          0x0000000101651008 QApplication::notify(QObject*, QEvent*) + 2346
25  QtCore                        0x0000000103a4e5e6 QCoreApplication::notifyInternal(QObject*, QEvent*) + 104
26  QtGui                          0x0000000101658c28 QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) + 432
27  QtGui                          0x000000010160d301 0x1015d7000 + 221953
28  com.apple.AppKit              0x00007fff8f0a86d6 -[NSWindow sendEvent:] + 7053
29  QtGui                          0x0000000101604ab2 0x1015d7000 + 187058
30  com.apple.AppKit              0x00007fff8f0a4744 -[NSApplication sendEvent:] + 5761
31  QtGui                          0x00000001016083c2 0x1015d7000 + 201666
32  com.apple.AppKit              0x00007fff8f20d76a -[NSApplication _realDoModalLoop:peek:] + 582
33  com.apple.AppKit              0x00007fff8f20de3e -[NSApplication runModalSession:] + 49
34  QtGui                          0x000000010161154f 0x1015d7000 + 238927
35  QtCore                        0x0000000103a4ba48 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 394
36  QtGui                          0x0000000101a8bee3 QDialog::exec() + 243
37  QtGui                          0x0000000101aad4be 0x1015d7000 + 5072062
38  QtGui                          0x0000000101aad585 QMessageBox::critical(QWidget*, QString const&, QString const&, QFlags<QMessageBox::StandardButton>, QMessageBox::StandardButton) + 39
39  com.pleiades-astrophoto.PixInsight 0x00000001000fbc30 main + 19248
40  com.pleiades-astrophoto.PixInsight 0x0000000100005b34 start + 52

i tried to reproduce it and could not. however, i did my 'undo/redo' thrash test and managed to get the segmentation violation dialog. i then kept undoing and redoing and eventually got this crash:

Code: [Select]
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        0x00007fff8d93f212 __pthread_kill + 10
1   libsystem_c.dylib              0x00007fff94e5faf4 pthread_kill + 90
2   libsystem_c.dylib              0x00007fff94ea3dce abort + 143
3   libc++abi.dylib                0x00007fff964e0a17 abort_message + 257
4   libc++abi.dylib                0x00007fff964de3c6 default_terminate() + 28
5   libobjc.A.dylib                0x00007fff8ec13887 _objc_terminate() + 111
6   libc++abi.dylib                0x00007fff964de3f5 safe_handler_caller(void (*)()) + 8
7   libc++abi.dylib                0x00007fff964de450 std::terminate() + 16
8   libc++abi.dylib                0x00007fff964df5b7 __cxa_throw + 111
9   com.pleiades-astrophoto.PixInsight 0x0000000100eb4b47 pcl::CriticalSignalHandler(int) + 151
10  libsystem_c.dylib              0x00007fff94e4c8ea _sigtramp + 26
11  ???                            0x0000000104006170 0 + 4362101104
12  com.pleiades-astrophoto.PixInsight 0x000000010034b028 non-virtual thunk to pi::ViewList::ImageCreated(pi::View const*) + 24
13  com.pleiades-astrophoto.PixInsight 0x0000000100c922e0 pi::BroadcastImageCreated(pi::View const*) + 80
14  com.pleiades-astrophoto.PixInsight 0x000000010027d60a pi::ImageWindow::LoadPreview(pi::PreviewState const*) + 484
15  com.pleiades-astrophoto.PixInsight 0x000000010027e4fb pi::ImageWindow::LoadPreviews(pcl::IndirectArray<pi::PreviewState, pcl::StandardAllocator> const&) + 69
16  com.pleiades-astrophoto.PixInsight 0x00000001002cd774 pi::SwapImageData::Read(pi::ImageWindow*, pcl::Flags<pcl::UndoFlag::mask_type>, bool) + 2370
17  com.pleiades-astrophoto.PixInsight 0x00000001002bf52d pi::MainView::UpdateHistoryIndex(unsigned long, bool) + 2089
18  com.pleiades-astrophoto.PixInsight 0x0000000100a38113 pi::PixInsightMainWindow::ImageRedo() + 115
19  com.pleiades-astrophoto.PixInsight 0x0000000100ce1f74 pi::PixInsightMainWindow::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) + 864
20  QtCore                        0x0000000103a63291 QMetaObject::activate(QObject*, QMetaObject const*, int, void**) + 2001
21  QtGui                          0x000000010164caa9 QAction::activate(QAction::ActionEvent) + 217
22  QtGui                          0x0000000101607337 0x1015d7000 + 197431
23  com.apple.AppKit              0x00007fff8f0b3a59 -[NSApplication sendAction:to:from:] + 342
24  com.apple.AppKit              0x00007fff8f1e944c -[NSMenuItem _corePerformAction] + 406
25  com.apple.AppKit              0x00007fff8f1e913a -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 133
26  com.apple.AppKit              0x00007fff8f1e7dc0 -[NSMenu performKeyEquivalent:] + 271
27  com.apple.AppKit              0x00007fff8f1e7283 -[NSApplication _handleKeyEquivalent:] + 829
28  com.apple.AppKit              0x00007fff8f0a4243 -[NSApplication sendEvent:] + 4480
29  QtGui                          0x00000001016083c2 0x1015d7000 + 201666
30  com.apple.AppKit              0x00007fff8efba2fa -[NSApplication run] + 636
31  QtGui                          0x00000001016115f0 0x1015d7000 + 239088
32  QtCore                        0x0000000103a4ba48 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 394
33  QtCore                        0x0000000103a4ed1b QCoreApplication::exec() + 175
34  com.pleiades-astrophoto.PixInsight 0x00000001000fb67d main + 17789
35  com.pleiades-astrophoto.PixInsight 0x0000000100005b34 start + 52

i think this rapid undo-redo test is not necessarily reflective of real-world usage, but i think it's exposing some kind of timing-related UI bug in PI. i can get PI to crash almost every time just by doing a few processing steps to an image and then pressing command-z and command-y as fast as i can.

i don't know if it's my system, but the "can't stop dragging a process icon" bug is 100% reproducible as well. this does not necessarily lead to any crashes but it's a very strange UI bug.


Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: 1.8 RC7 OSX crash
« Reply #1 on: 2013 May 20 02:39:41 »
Quote
...only a mouse-down event with no mouse-up. i see this a lot of times if i click on a process icon - the mouse just "picks up" the icon and i can't release the icon with the mouse. pressing the escape key releases the process icon.

There were some similar issues in 1.7, but I cannot reproduce this with 1.8.0 on our Mac Pro 2008 and iMac 2013 machines. I admit that moving icons is much slower on the Mac OS X version of PixInsight than on the rest of platforms. It is real-time fast on X11 even if you move a selection of several hundreds of icons; somewhat slower on Windows but still reasonably fast.

I'm working to see if I can figure out where the problem is with moving icons on the OS X version of PI Core. If necessary, I'll rewrite the relevant code bypassing Qt completely. I hope this will be sorted out in the final 1.8.0 release.

I cannot reproduce the other crash while editing/moving a preview either. Considering the weirdness of the event, let's put it inside the "strange things that happen" bag for now :)

Quote
i did my 'undo/redo' thrash test and managed to get the segmentation violation dialog.

The undo/redo problem in previous RC versions was perfectly identified and fixed, so it cannot happen anymore in RC7 (it was a problem with non-reentrant event handlers; all of them are now reentrant).

Actually this line in your crash report tells us that something very different has happened:

Quote
non-virtual thunk to pi::ViewList::ImageCreated(pi::View const*)

This suggests that I have declared a virtual function but haven't implemented it. Definitely, this is not true for the ViewList class, so we have either a compiler and/or linker error, or something very very strange, such that after the initial segmentation violation, the executable image in memory got corrupted. Thank you for your report, I'll investigate this.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/