Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when using sidebar / macOS 14.0 / M1 #190

Open
mslazynski opened this issue Oct 19, 2023 · 12 comments
Open

Crash when using sidebar / macOS 14.0 / M1 #190

mslazynski opened this issue Oct 19, 2023 · 12 comments

Comments

@mslazynski
Copy link

System: macOS 14.0
Arch: M1 arm64
MiniZincIDE: 2.7.6

MiniZincIDE crashes often when I'm using the project sidebar.
The most common case is when I want to open an .msc (compiled model checker file).

@cyderize
Copy link
Member

Would you be able to attach an example project and steps to reproduce? Or if you can't publicly share it, you can e-mail it to support [at] minizinc.dev. I haven't seen any crash from opening compiled checkers from the the project sidebar on macOS or on Windows so far.

@mslazynski
Copy link
Author

Sure, previously I thought it was my setup responsible. But my students using macOS 14.0 are having the same issue.
It is sad to see students coping with issues of this kind...

Here you have my repository (second lesson in Constraint Programming course) https://gitlab.com/agh-courses/23/cp/lab-02 .
How to reproduce:

  • open the project: lab-02.mzp
  • play with the sidebar for several seconds, try to open some files, check directories, etc.

@cyderize
Copy link
Member

Unfortunately I still can't seem to reproduce this (on an M1 mac running macOS 14.0).

Were you able to trigger this on a fresh clone of the lab-02.mzp project? I've tried opening/closing every file (model, data. checkers) and running each of them and combinations of them using the project panel, and it hasn't crashed so far.

@mslazynski
Copy link
Author

  1. I've been able to reproduce it on the fresh clone.
  2. my students (using macOS) also had the same issue.

Is there any preferable way to gather logs to send you?

Here is an output from terminal.

*** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndexedSubscript:]: index 15 beyond bounds [0 .. 5]'
*** First throw call stack:
(
	0   CoreFoundation                      0x00000001809bc8c0 __exceptionPreprocess + 176
	1   libobjc.A.dylib                     0x00000001804b5eb4 objc_exception_throw + 60
	2   CoreFoundation                      0x0000000180932f20 -[__NSCFString hasSuffix:] + 0
	3   libqcocoa.dylib                     0x0000000102fdc124 _ZN20QCocoaSystemTrayIcon13emitActivatedEv + 269336
	4   libqcocoa.dylib                     0x0000000102fdc1a8 _ZN20QCocoaSystemTrayIcon13emitActivatedEv + 269468
	5   libqcocoa.dylib                     0x0000000102fda77c _ZN20QCocoaSystemTrayIcon13emitActivatedEv + 262768
	6   QtWidgets                           0x0000000103fe90b0 _ZN9QTreeView14currentChangedERK11QModelIndexS2_ + 452
	7   QtCore                              0x0000000104fe1788 _ZN11QMetaObject8activateEP7QObjectPKS_iPPv + 3780
	8   QtCore                              0x00000001051a618c _ZN19QItemSelectionModel15setCurrentIndexERK11QModelIndex6QFlagsINS_13SelectionFlagEE + 324
	9   QtWidgets                           0x0000000103f7231c _ZN17QAbstractItemView15mousePressEventEP11QMouseEvent + 880
	10  QtWidgets                           0x0000000103fe1f7c _ZN9QTreeView15mousePressEventEP11QMouseEvent + 260
	11  QtWidgets                           0x0000000103d46330 _ZN7QWidget5eventEP6QEvent + 132
	12  QtWidgets                           0x0000000103dca060 _ZN6QFrame5eventEP6QEvent + 56
	13  QtWidgets                           0x0000000103f71f3c _ZN17QAbstractItemView13viewportEventEP6QEvent + 988
	14  QtWidgets                           0x0000000103fdf37c _ZN9QTreeView13viewportEventEP6QEvent + 328
	15  QtCore                              0x0000000104f9825c _ZN23QCoreApplicationPrivate29sendThroughObjectEventFiltersEP7QObjectP6QEvent + 244
	16  QtWidgets                           0x0000000103cfcfcc _ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent + 240
	17  QtWidgets                           0x0000000103cff03c _ZN12QApplication6notifyEP7QObjectP6QEvent + 5100
	18  QtCore                              0x0000000104f97f88 _ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent + 292
	19  QtWidgets                           0x0000000103cfd58c _ZN19QApplicationPrivate14sendMouseEventEP7QWidgetP11QMouseEventS1_S1_PS1_R8QPointerIS0_Ebb + 808
	20  QtWidgets                           0x0000000103d5a9b0 _ZNK21QWidgetRepaintManager3rhiEv + 9912
	21  QtWidgets                           0x0000000103d59c68 _ZNK21QWidgetRepaintManager3rhiEv + 6512
	22  QtWidgets                           0x0000000103cfcfec _ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent + 272
	23  QtWidgets                           0x0000000103cfde50 _ZN12QApplication6notifyEP7QObjectP6QEvent + 512
	24  QtCore                              0x0000000104f97f88 _ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent + 292
	25  QtGui                               0x000000010319a794 _ZN22QGuiApplicationPrivate17processMouseEventEPN29QWindowSystemInterfacePrivate10MouseEventE + 1748
	26  QtGui                               0x00000001031f1aa4 _ZN22QWindowSystemInterface22sendWindowSystemEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE + 396
	27  libqcocoa.dylib                     0x0000000102f7fd40 qt_plugin_instance + 54740
	28  CoreFoundation                      0x0000000180947d28 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
	29  CoreFoundation                      0x0000000180947cbc __CFRunLoopDoSource0 + 176
	30  CoreFoundation                      0x0000000180947a2c __CFRunLoopDoSources0 + 244
	31  CoreFoundation                      0x000000018094661c __CFRunLoopRun + 828
	32  CoreFoundation                      0x0000000180945c2c CFRunLoopRunSpecific + 608
	33  HIToolbox                           0x000000018ae9e448 RunCurrentEventLoopInMode + 292
	34  HIToolbox                           0x000000018ae9e0d8 ReceiveNextEventCommon + 220
	35  HIToolbox                           0x000000018ae9dfdc _BlockUntilNextEventMatchingListInModeWithFilter + 76
	36  AppKit                              0x0000000184120f90 _DPSNextEvent + 660
	37  AppKit                              0x00000001848f4b94 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 716
	38  AppKit                              0x000000018411443c -[NSApplication run] + 476
	39  libqcocoa.dylib                     0x0000000102f7e644 qt_plugin_instance + 48856
	40  QtCore                              0x0000000104fa18fc _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE + 532
	41  QtCore                              0x0000000104f98614 _ZN16QCoreApplication4execEv + 112
	42  MiniZincIDE                         0x0000000102a7b6d4 main + 492
	43  dyld                                0x00000001804f1058 start + 2224
)
libc++abi: terminating due to uncaught exception of type NSException

@mslazynski
Copy link
Author

mslazynski commented Oct 23, 2023

Another short update.
I've built MiniZincIDE from the master branch, and I can't reproduce the issue via my build.
The official 2.7.6 still crashes...

@cyderize
Copy link
Member

What version of Qt did you use to build? The official build used 6.5.1, so maybe this is actually a Qt bug which got fixed later. Although that still doesn't explain why I can't reproduce this using the official package.

@mslazynski
Copy link
Author

I've built it against Qt 6.5.2

@mslazynski
Copy link
Author

Hmm... I've removed all the MiniZinc related settings:

rm /Users/msl/Library/Preferences/org.minizinc.MiniZinc*

Since then, I can't reproduce the issue.
Sadly, I have no backup of the settings files…
Will ask students having similar issues about their settings.

@mslazynski
Copy link
Author

As I cannot reproduce it consistently, I close the issue :)

@mslazynski
Copy link
Author

OK, the issue came back again. I would debug it by myself, but... it does not happen with my own build from the master. For now, I assume it may be related to the different qt version used in the builds. I will come to this after the next release.

@mslazynski mslazynski reopened this Nov 10, 2023
@cyderize
Copy link
Member

Would you be able to try this build? This has been built by our CI system using the latest stable Qt, so if the issue persists here then we'll have some more investigation to do.

@mslazynski
Copy link
Author

It seems fine… I cannot reproduce the crash, will try harder in my spare time and then come back with some results ;)

BTW It's great OR-tools got into the bundle :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants