-
Notifications
You must be signed in to change notification settings - Fork 70
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
Odd Menu Bar behaviour causes Anathema to break on OS X #332
Comments
I rarely use the menu bar, so I didn't notice anything out of the ordinary despite noticing the error message. I thought it was another of those "will go away in J7u40" issues you mentioned earlier. I shouldn't trust Java that much. |
I rolled back to f1979a0, and the issue issue exists there as well; I just never noticed it due to the bigger issue with #330. The issue happens with any of the "dark yellow" tooltips (the ones where the bottom right corner 'curls' as if its made of paper). These are seen only in parts of equipment manager, and they're different from light yellow non-curl tooltips seen everywhere else (I do mean everywhere, I checked them all). I suspect that this is also a threading issue, like #330, that came about due to mixing and matching JavaFX and Swing. This is possibly relevant, possibly not: http://stackoverflow.com/questions/16421556/mac-os-x-java-menu-bar-disappears . I found that after the issue occurs, if you multitask to another app using cmd+tab, tab back, most of the time the menubar has entirely disappeared. Instead, it shows the menubar for the application you just came from. Sometimes it pops back to the issue's broken menubar instead, but not often. I'm still not sure if the error message listed in the main post is related; but it only happens after the issue occurs, so its likely. I dug up some an error message that looks similar: https://netbeans.org/bugzilla/show_bug.cgi?id=222684 |
The "curled page" tooltips are JavaFX tooltips, the "plain rectangle" ones are rendered by Swing. |
I surmise that JavaFX tooltips are top level windows. Thus, OS X detects a new window and changes the menu bar to the "appropriate" one. Don't know why it breaks afterwards, though. |
This is a workaround for #332. I am not sure if we can fix it properly without moving the entire system to JavaFX.
In efaec13, I have added a workaround that disables the tooltips if the application is running on a mac. I have written another simple demo to test the general workings of the tooltips in FX on OS X, and it shows that this is an issue in the JavaFX/Swing interop or our usage of it. A pure FX application does not show the issue, tooltips and system-wide menubars interact flawlessly. As such, one option would be to just sit the issue out. Another to find the root cause, but I don't have high hopes for that. |
@curttasker, does the workaround fix the issue for you as well? If so, do you still object to finally releasing this one? |
I'm fine with the workaround for the menubar. That said, you're gonna kill me; I found another bug. The create item and delete item buttons in the equipment manager don't work on mac. I just found it, and don't have time to document it tonight, I'll start up a new issue tomorrow. |
Actually, no, I'm loving you for it. I really appreciate your dedication and thoroughness. I have opened #335 and #336 for your discoveries, feel free to amend them as necessary. Should we leave this one open and look for a permanent solution before the entire UI is converted in #334, or do you think this covers it for now? |
I was just being sarcastic :) #335 and #336 seem fixed, but there's still some screwy behavior going on. Minor issue that got missed in the refactoring
Expected: A Warning dialog box pops up stating "You have unsaved changes. Discard them?" Same error as #332, different cause
Error produced2013-06-09 14:59:49.224 java[52777:707] *** Assertion failure in -[NSMenuItem setSubmenu:], /SourceCache/AppKit/AppKit-1187.37/Menus.subproj/NSMenuItem.m:757
2013-06-09 14:59:49.224 java[52777:707] Menu to be set as submenu is already a submenu of some menu.
2013-06-09 14:59:49.226 java[52777:707] (
0 CoreFoundation 0x00007fff86fcab06 __exceptionPreprocess + 198
1 libobjc.A.dylib 0x00007fff898263f0 objc_exception_throw + 43
2 CoreFoundation 0x00007fff86fca948 +[NSException raise:format:arguments:] + 104
3 Foundation 0x00007fff8f537c82 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 189
4 AppKit 0x00007fff8bfd99a0 -[NSMenuItem setSubmenu:] + 200
5 liblwawt.dylib 0x000000016d4d0862 -[CMenuBar nativeAddMenuAtIndex_OnAppKitThread:] + 312
6 liblwawt.dylib 0x000000016d4d0f88 +[CMenuBar activate:modallyDisabled:] + 981
7 liblwawt.dylib 0x000000016d4c2975 -[AWTWindow windowDidBecomeKey:] + 141
8 CoreFoundation 0x00007fff86f7ceda _CFXNotificationPost + 2554
9 Foundation 0x00007fff8f573e26 -[NSNotificationCenter postNotificationName:object:userInfo:] + 64
10 AppKit 0x00007fff8c0eca76 -[NSWindow becomeKeyWindow] + 1344
11 AppKit 0x00007fff8c0ebf34 -[NSWindow _changeKeyAndMainLimitedOK:] + 719
12 AppKit 0x00007fff8c1ca34c -[NSWindow _orderOutAndCalcKeyWithCounter:stillVisible:docWindow:] + 909
13 AppKit 0x00007fff8c0f4179 -[NSWindow _reallyDoOrderWindow:relativeTo:findKey:forCounter:force:isModal:] + 3218
14 AppKit 0x00007fff8c0f3068 -[NSWindow _doOrderWindow:relativeTo:findKey:forCounter:force:isModal:] + 940
15 AppKit 0x00007fff8c0f2c4f -[NSWindow orderWindow:relativeTo:] + 159
16 Foundation 0x00007fff8f5bdd3a __NSThreadPerformPerform + 225
17 CoreFoundation 0x00007fff86f49b31 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
18 CoreFounda 0x00007fff86f49455 __CFRunLoopDoSources0 + 245
19 CoreFoundation 0x00007fff86f6c7f5 __CFRunLoopRun + 789
20 CoreFoundation 0x00007fff86f6c0e2 CFRunLoopRunSpecific + 290
21 HIToolbox 0x00007fff8e671eb4 RunCurrentEventLoopInMode + 209
22 HIToolbox 0x00007fff8e671c52 ReceiveNextEventCommon + 356
23 HIToolbox 0x00007fff8e671ae3 BlockUntilNextEventMatchingListInMode + 62
24 AppKit 0x00007fff8c033563 _DPSNextEvent + 685
25 AppKit 0x00007fff8c032e22 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128
26 libosxapp.dylib 0x000000016d1f7b56 -[NSApplicationAWT nextEventMatchingMask:untilDate:inMode:dequeue:] + 124
27 AppKit 0x00007fff8c02a1d3 -[NSApplication run] + 517
28 libosxapp.dylib 0x000000016d1f79b9 +[NSApplicationAWT runAWTLoopWithApp:] + 156
29 liblwawt.dylib 0x000000016d4b281a -[AWTStarter starter:] + 1591
30 Foundation 0x00007fff8f5bdd3a __NSThreadPerformPerform + 225
31 CoreFoundation 0x00007fff86f49b31 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
32 CoreFoundation 0x00007fff86f49455 __CFRunLoopDoSources0 + 245
33 CoreFoundation 0x00007fff86f6c7f5 __CFRunLoopRun + 789
34 CoreFoundation 0x00007fff86f6c0e2 CFRunLoopRunSpecific + 290
35 java 0x000000010db6d42d CreateExecutionEnvironment + 871
36 java 0x000000010db67bdc JLI_Launch + 1952
37 java 0x000000010db6d78a main + 101
38 java 0x000000010db67434 start + 52
39 ??? 0x0000000000000005 0x0 + 5
) This also causes the menubar to disappear as in #332 I'm going to be down in LA for E3 next week, and I'm hanging around for a two weeks to spend time with family; So I'm not going to have a whole lot of time to spend on this, but I'll at least be available for testing. |
I know about the missing notification, it wasn't there before the refactoring either. I just didn't implement it yet. About the other issue, I guess we're screwed. I'll have a look. |
I ran the current build with 1.7.0_40:
Confirmed that everything is fine in windows under 1.7.0_21. |
Thanks. I'll probably won't have much energy to fix this in the next few days, but I have an idea on how to fix it (thanks to a short conversation with @vestrial). It will mix up the UI on OS X, but I figure that's better than killing the app or not delivering this version on OS X. |
Moved the minor issue to #337. |
* Allows to remove listeners on IObjectSelectionViews * Fixes some threading-issues
* Allows to remove listeners on IObjectSelectionViews * Fixes some threading-issues (cherry picked from commit c122ca9)
* Limits size of Lists that replace Comboboxes. * Fixes #332. Again.
@curttasker, we now have an OS X-specific UI that no longer shows the issue. I'll start preparing the release and wait for a word from you before I press the button. |
Sorry, been a little busy these past few days. Lists instead of Comboboxes on OSXThe new Lists are serviceable for the most part, but there's a few little things that bothered me. Selected Item Color #338 -- FixedSelected Item Visible #339 -- FixedWarning when discarding unsaved changes by selecting a different equipment item (#337)#337 still isn't closed, but its not a critical issue. While it does work in 5.0.1, I'm fine with letting it stay as-is for the last 2.5E release. It just causes a minor to moderate inconvenience to players frequently making changes to items. I did discover one additional issue, and I'm not sure if its a newly introduced one as a result of the osx changes done here, or if it was present before. Edit button not becoming inactive #340I'll work on the last one later tonight if I have time. |
Reported by @curttasker in #330:
Odd Menu Bar Behavior
You'll notice that the menu bar changed; All menus except a basic "Exit application" meny item have disappeared. cmd+q no longer works, and clicking the one menu bar item that still exists (the close cmd+q one) does not work. The only way to close the app is to click the X in the upper left corner of anathema's window.
While in this state, clicking around the app can cause this error to appear:
The text was updated successfully, but these errors were encountered: