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

Close button disappeared #4509

Closed
simeon052 opened this Issue Jul 26, 2018 · 114 comments

Comments

Projects
None yet
9 participants
@simeon052

simeon052 commented Jul 26, 2018

Steps to Reproduce

  1. Instal Mac OS 10.14 Beta(18A336e)
  2. Build this sample.
    ¥https://github.com/xamarin/mac-samples/tree/master/yosemite/VisualEffectPlayground
  3. Build and Run as attached

Expected Behavior

Close button appeared any time.

Actual Behavior

Close button disappear some times.
Screen shot are there < https://forums.xamarin.com/discussion/129703/is-this-a-bug-of-10-14-beta-4#latest >

Environment

=== Visual Studio Community 2017 for Mac ===

Version 7.5.4 (build 3)
Installation UUID: 064307da-9059-45c8-a951-3647e8ac6ac0
Runtime:
Mono 5.10.1.57 (2017-12/ea8a24b1bbf) (64-bit)
GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac 4.4.1.178 (master / eeaeb7e)

Package version: 510010057

=== NuGet ===

Version: 4.3.1.4445

=== .NET Core ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
2.1.1
2.0.5
2.0.0
SDK: /usr/local/share/dotnet/sdk/2.1.301/Sdks
SDK Versions:
2.1.301
2.1.4
2.0.0
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.10.1/lib/mono/msbuild/15.0/bin/Sdks

=== Xamarin.Profiler ===

Version: 1.6.2
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Apple Developer Tools ===

Xcode 9.4.1 (14161)
Build 9F2000

=== Xamarin.Mac ===

Version: 4.4.1.193 (Visual Studio Community)

=== Xamarin.iOS ===

Version: 11.12.0.4 (Visual Studio Community)
Hash: 64fece5
Branch: d15-7
Build date: 2018-05-29 20:00:44-0400

=== Xamarin.Android ===

Version: 8.3.3.2 (Visual Studio Community)
Android SDK: /Users/matsussa/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
6.0 (API level 23)
7.0 (API level 24)
7.1 (API level 25)

SDK Tools Version: 25.2.5
SDK Platform Tools Version: 25.0.3
SDK Build Tools Version: 25.0.1

Java SDK: /usr
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Xamarin Inspector ===

Version: 1.4.0
Hash: b3f92f9
Branch: master
Build date: Fri, 19 Jan 2018 22:00:34 GMT
Client compatibility: 1

=== Build Information ===

Release ID: 705040003
Git revision: 6ae731889c896d6733efb8ff5117f5bf5b17b509
Build date: 2018-07-19 13:07:45-04
Xamarin addins: 417fed09624e1e1f76ab0a11e8b97ffd8bbf91e1
Build lane: monodevelop-lion-d15-7

=== Operating System ===

Mac OS X 10.14.0
Darwin 18.0.0 Darwin Kernel Version 18.0.0
Thu Jul 12 19:03:47 PDT 2018
root:xnu-4903.200.304.41.2~2/RELEASE_X86_64 x86_64

=== Enabled user installed addins ===

Internet of Things (IoT) development (Preview) 7.5

Build Logs

No error on Log

Example Project (If Possible)

https://github.com/xamarin/mac-samples/tree/master/yosemite/VisualEffectPlayground

@therealjohn therealjohn added the macOS label Jul 26, 2018

@therealjohn therealjohn added this to the Future milestone Jul 26, 2018

@therealjohn

This comment has been minimized.

Show comment
Hide comment
@therealjohn

therealjohn Jul 26, 2018

Contributor

Brad was able to reproduce a similar issue. Might be related to 10.14.

Contributor

therealjohn commented Jul 26, 2018

Brad was able to reproduce a similar issue. Might be related to 10.14.

@therealjohn therealjohn added the bug label Jul 26, 2018

@simeon052

This comment has been minimized.

Show comment
Hide comment
@simeon052

simeon052 Jul 30, 2018

simeon052 commented Jul 30, 2018

@lemonmojo

This comment has been minimized.

Show comment
Hide comment
@lemonmojo

lemonmojo Sep 19, 2018

Hi there,

I'm suffering from more or less the same issues on Mojave DP (build 18A389).
Here's what I did to reproduce the problem:

Here's how this looks:
mono mojave bug

Note that the window is not resized correctly, there are visual artifacts (kind of a shadow) around the areas where it's resized and various error log messages by WindowServer (CoreAnimation: Context ID mismatch).

Now the really interesting part: I'm 100% certain that this is not an issue in Xamarin.Mac but probably in the mono runtime. The reason I'm so sure about that is that my app, Royal TSX suffers from the very same problems. Royal TSX is based on mono and custom fork of Monobjc. It doesn't use Xamarin.Mac at all. Unfortunately, the issues appear randomly and are not as easily reproducible as with the VisualEffectPlayground. I also struggled to provide a reduced test case until I found this thread. With the sample project the problem is reproducible 100% of the time which is at least something.

I previously filed a radar with Apple about this because I suspected some defect in the OS. Instead, they pointed to mono's use of thread_suspend. I'm not sure what's wrong with it but they seem to believe it's somehow related. Unfortunately the radar was closed as it appeared that upgrading to a newer mono release fixes the issue. This doesn't seem to be the case though.

I will also post this in the mono bug tracker and hope that someone from the Xamarin or mono teams can look into it as it appears to effect every single application built using mono on Mojave.

thx,
felix

lemonmojo commented Sep 19, 2018

Hi there,

I'm suffering from more or less the same issues on Mojave DP (build 18A389).
Here's what I did to reproduce the problem:

Here's how this looks:
mono mojave bug

Note that the window is not resized correctly, there are visual artifacts (kind of a shadow) around the areas where it's resized and various error log messages by WindowServer (CoreAnimation: Context ID mismatch).

Now the really interesting part: I'm 100% certain that this is not an issue in Xamarin.Mac but probably in the mono runtime. The reason I'm so sure about that is that my app, Royal TSX suffers from the very same problems. Royal TSX is based on mono and custom fork of Monobjc. It doesn't use Xamarin.Mac at all. Unfortunately, the issues appear randomly and are not as easily reproducible as with the VisualEffectPlayground. I also struggled to provide a reduced test case until I found this thread. With the sample project the problem is reproducible 100% of the time which is at least something.

I previously filed a radar with Apple about this because I suspected some defect in the OS. Instead, they pointed to mono's use of thread_suspend. I'm not sure what's wrong with it but they seem to believe it's somehow related. Unfortunately the radar was closed as it appeared that upgrading to a newer mono release fixes the issue. This doesn't seem to be the case though.

I will also post this in the mono bug tracker and hope that someone from the Xamarin or mono teams can look into it as it appears to effect every single application built using mono on Mojave.

thx,
felix

@marek-safar

This comment has been minimized.

Show comment
Hide comment
@marek-safar

marek-safar Sep 19, 2018

Contributor

I am not sure who mono threading could interfere with this but it might be possible. @chamons could you guys to try to reproduce the issue?

Contributor

marek-safar commented Sep 19, 2018

I am not sure who mono threading could interfere with this but it might be possible. @chamons could you guys to try to reproduce the issue?

@lemonmojo

This comment has been minimized.

Show comment
Hide comment
@lemonmojo

lemonmojo Sep 19, 2018

When launching the app without VS (from Finder or the dock), not even the main window appears and the same log entries are present in Console.app. I also observed similar behavior in my app.

mono mojave dock bug

lemonmojo commented Sep 19, 2018

When launching the app without VS (from Finder or the dock), not even the main window appears and the same log entries are present in Console.app. I also observed similar behavior in my app.

mono mojave dock bug

@lemonmojo

This comment has been minimized.

Show comment
Hide comment
@lemonmojo

lemonmojo Sep 19, 2018

Here's another one:

macxibless bug

In this case you can see the original missing stoplights issue. But there's more: The animation when entering full screen is also incorrect and there are additional log entries.

This is the "MacXibless" sample project from the same repo. I didn't touch any of the code, just compiled and ran it.

lemonmojo commented Sep 19, 2018

Here's another one:

macxibless bug

In this case you can see the original missing stoplights issue. But there's more: The animation when entering full screen is also incorrect and there are additional log entries.

This is the "MacXibless" sample project from the same repo. I didn't touch any of the code, just compiled and ran it.

@lemonmojo

This comment has been minimized.

Show comment
Hide comment
@lemonmojo

lemonmojo Sep 19, 2018

And one more: This is the NSOutlineViewAndTableView sample from the same repo.

First, when started from VS, the window resizing issue:

mono mojave outlineview bug

When started via Dock, the outline view items cannot be expanded but window resizing works properly:

mono mojave outlineview bug 2

lemonmojo commented Sep 19, 2018

And one more: This is the NSOutlineViewAndTableView sample from the same repo.

First, when started from VS, the window resizing issue:

mono mojave outlineview bug

When started via Dock, the outline view items cannot be expanded but window resizing works properly:

mono mojave outlineview bug 2

@Rogister

This comment has been minimized.

Show comment
Hide comment
@Rogister

Rogister Sep 20, 2018

I test my application on MacOS Mojave for 3 weeks and there are problems.

My application works perfectly on MacOS High Sierra but Mojave, there are problems refresh. Boxes of messages that appears but completely empty (we see nothing). With datagrids, I also see problems.

I click on a line of the datagrid, it works normally a few times then I do not know why, the clique does not answer anymore, the datagrid refreshes itself.

I tried to debug and see what happens but it's impossible, there is no logic to the problem. For me, there is a problem Mono or MacOS because it is incomprehensible.

it joins the problem that I read above.

Alain

Rogister commented Sep 20, 2018

I test my application on MacOS Mojave for 3 weeks and there are problems.

My application works perfectly on MacOS High Sierra but Mojave, there are problems refresh. Boxes of messages that appears but completely empty (we see nothing). With datagrids, I also see problems.

I click on a line of the datagrid, it works normally a few times then I do not know why, the clique does not answer anymore, the datagrid refreshes itself.

I tried to debug and see what happens but it's impossible, there is no logic to the problem. For me, there is a problem Mono or MacOS because it is incomprehensible.

it joins the problem that I read above.

Alain

@lemonmojo

This comment has been minimized.

Show comment
Hide comment
@lemonmojo

lemonmojo Sep 20, 2018

Here's a demo repo I just set up: https://github.com/lemonmojo/MonoOnMojave
Basically it contains 3 projects:

  • A Xamarin.Mac app
  • A native Cocoa app
  • A native Cocoa framework

All of the actual code lives in the .framework which both, the native as well as the Xamarin.Mac apps use. While the native app works just fine, the Xamarin.Mac app shows the issues previously described.

There are instructions included on how to reproduce the problem.

lemonmojo commented Sep 20, 2018

Here's a demo repo I just set up: https://github.com/lemonmojo/MonoOnMojave
Basically it contains 3 projects:

  • A Xamarin.Mac app
  • A native Cocoa app
  • A native Cocoa framework

All of the actual code lives in the .framework which both, the native as well as the Xamarin.Mac apps use. While the native app works just fine, the Xamarin.Mac app shows the issues previously described.

There are instructions included on how to reproduce the problem.

@lemonmojo

This comment has been minimized.

Show comment
Hide comment
@lemonmojo

lemonmojo Sep 20, 2018

I just updated the demo repo with additional information. The issues don't seem to occur when the app is not activated by launch services. So when starting it from the console with open -g XamarinMacMojaveTest2/bin/Debug/XamarinMacMojaveTest2.app it works fine.

lemonmojo commented Sep 20, 2018

I just updated the demo repo with additional information. The issues don't seem to occur when the app is not activated by launch services. So when starting it from the console with open -g XamarinMacMojaveTest2/bin/Debug/XamarinMacMojaveTest2.app it works fine.

@lemonmojo

This comment has been minimized.

Show comment
Hide comment
@lemonmojo

lemonmojo Sep 20, 2018

Can anyone from Xamarin/MS at least confirm that you can reproduce the problem? @chamons @rolfbjarne @marek-safar @therealjohn? Anyone?
If you cannot reproduce it, I'd be happy to provide additional information.

lemonmojo commented Sep 20, 2018

Can anyone from Xamarin/MS at least confirm that you can reproduce the problem? @chamons @rolfbjarne @marek-safar @therealjohn? Anyone?
If you cannot reproduce it, I'd be happy to provide additional information.

@rolfbjarne

This comment has been minimized.

Show comment
Hide comment
@rolfbjarne

rolfbjarne Sep 20, 2018

Member

@lemonmojo Yes, I can reproduce strangeness with your MonoOnMojave sample.

This really smells like a macOS bug though 😒

Member

rolfbjarne commented Sep 20, 2018

@lemonmojo Yes, I can reproduce strangeness with your MonoOnMojave sample.

This really smells like a macOS bug though 😒

@lemonmojo

This comment has been minimized.

Show comment
Hide comment
@lemonmojo

lemonmojo Sep 20, 2018

@rolfbjarne Well, yeah, that's why I originally filed a radar with Apple. At the same time I was using a 4.x version of Mono and thought that this might be the issue. Upgrading to Mono 5.x took me around two months in total and for quite some time it seemed like this did indeed fix the issue. As we know now, it unfortunately doesn't.

Here's a snippet from the radar:

We can’t reproduce the backtrace you showed above but the attached basically says we’re waiting for the GPU to finish. Usually, this means you have too many things to render. Metal or driver does not generate any work, Application or CI generates the workload.

And in a later reply:

We’ve addressed several issues possibly related to this report. It would be interesting if you could check if either your old or new version of mono is using thread_suspend.

Then the radar got closed because it looked like updating mono did fix the issue.

lemonmojo commented Sep 20, 2018

@rolfbjarne Well, yeah, that's why I originally filed a radar with Apple. At the same time I was using a 4.x version of Mono and thought that this might be the issue. Upgrading to Mono 5.x took me around two months in total and for quite some time it seemed like this did indeed fix the issue. As we know now, it unfortunately doesn't.

Here's a snippet from the radar:

We can’t reproduce the backtrace you showed above but the attached basically says we’re waiting for the GPU to finish. Usually, this means you have too many things to render. Metal or driver does not generate any work, Application or CI generates the workload.

And in a later reply:

We’ve addressed several issues possibly related to this report. It would be interesting if you could check if either your old or new version of mono is using thread_suspend.

Then the radar got closed because it looked like updating mono did fix the issue.

@marek-safar

This comment has been minimized.

Show comment
Hide comment
@marek-safar
Contributor

marek-safar commented Sep 20, 2018

/cc @luhenry

@chamons

This comment has been minimized.

Show comment
Hide comment
@chamons

chamons Sep 20, 2018

Member

I'm attempting to reproduce the repro here: https://github.com/lemonmojo/MonoOnMojave

It would not build due to a bad xcode project path until I did this: https://git.io/fAQbr

Member

chamons commented Sep 20, 2018

I'm attempting to reproduce the repro here: https://github.com/lemonmojo/MonoOnMojave

It would not build due to a bad xcode project path until I did this: https://git.io/fAQbr

@chamons

This comment has been minimized.

Show comment
Hide comment
@chamons

chamons Sep 20, 2018

Member
Member

chamons commented Sep 20, 2018

@lemonmojo

This comment has been minimized.

Show comment
Hide comment
@lemonmojo

lemonmojo Sep 20, 2018

@chamons I just fixed the Info.plist path and now use PROJECT_DIR instead of SRCROOT.
I can reproduce the issue on a 2016 MacBook Pro 13" and a 2018 MacBook Pro 15". I've also had many users that reported these issues since the very first Mojave DP.
Here's my VS about info.

Did you try the other sample projects I mentioned previously (VisualEffectPlayground, NSOutlineViewAndTableView and MacXibless)?

Also, did you launch the app from the dock (not from VS)?

lemonmojo commented Sep 20, 2018

@chamons I just fixed the Info.plist path and now use PROJECT_DIR instead of SRCROOT.
I can reproduce the issue on a 2016 MacBook Pro 13" and a 2018 MacBook Pro 15". I've also had many users that reported these issues since the very first Mojave DP.
Here's my VS about info.

Did you try the other sample projects I mentioned previously (VisualEffectPlayground, NSOutlineViewAndTableView and MacXibless)?

Also, did you launch the app from the dock (not from VS)?

@chamons

This comment has been minimized.

Show comment
Hide comment
@chamons

chamons Sep 20, 2018

Member

Update, I can reproduce it (managed XM app doing strange things) with xcode 9.4 locally.

Member

chamons commented Sep 20, 2018

Update, I can reproduce it (managed XM app doing strange things) with xcode 9.4 locally.

@lemonmojo

This comment has been minimized.

Show comment
Hide comment
@lemonmojo

lemonmojo Sep 20, 2018

@chamons So you cannot reproduce it with Xcode 10 GM?

lemonmojo commented Sep 20, 2018

@chamons So you cannot reproduce it with Xcode 10 GM?

@chamons

This comment has been minimized.

Show comment
Hide comment
@chamons

chamons Sep 20, 2018

Member

I haven't gotten that far yet. I have found an additional console log in the failing use case:

error 12:50:39.558801 -0500 XamarinMacMojaveTest2 AEGetDescData of non-desc type 'reco' not a good idea

I have no clue yet what it means.

https://gist.github.com/chamons/2d3e8b3225d1aef3751dbc81d1b40477

Member

chamons commented Sep 20, 2018

I haven't gotten that far yet. I have found an additional console log in the failing use case:

error 12:50:39.558801 -0500 XamarinMacMojaveTest2 AEGetDescData of non-desc type 'reco' not a good idea

I have no clue yet what it means.

https://gist.github.com/chamons/2d3e8b3225d1aef3751dbc81d1b40477

@chamons

This comment has been minimized.

Show comment
Hide comment
@chamons

chamons Sep 20, 2018

Member

Ok, that log is a red herring. With Xcode 10 GM I see the log but don't see the bad behavior. Going to try a number of different combinations and report back.

Member

chamons commented Sep 20, 2018

Ok, that log is a red herring. With Xcode 10 GM I see the log but don't see the bad behavior. Going to try a number of different combinations and report back.

@chamons

This comment has been minimized.

Show comment
Hide comment
@chamons

chamons Sep 20, 2018

Member

🤔 Hmm, setting the xcode to use in VSfM to anything before Xcode 10 gives me a managed app that has no "buttons". Swapping it to Xcode 10 works.

I can then open the unmanaged sample with xcode 9.4 and it works.

Trying to find a difference now.

Member

chamons commented Sep 20, 2018

🤔 Hmm, setting the xcode to use in VSfM to anything before Xcode 10 gives me a managed app that has no "buttons". Swapping it to Xcode 10 works.

I can then open the unmanaged sample with xcode 9.4 and it works.

Trying to find a difference now.

@chamons

This comment has been minimized.

Show comment
Hide comment
@chamons

chamons Sep 20, 2018

Member

So, assuming Xcode 9.4 for a moment, I can trigger\prevent the strange behavior by commenting out this one line in the unmanaged code:

//    scrollView.documentView = outlineView;

Without it, I get the "buttons" in my window in my XM app, which makes zero sense. More digging....

edit
I can simplify the obj-c to this: https://gist.github.com/chamons/3aa36d78649e775436db3146989e1569

and still reproduce the buttons disappering.... 🤔

Member

chamons commented Sep 20, 2018

So, assuming Xcode 9.4 for a moment, I can trigger\prevent the strange behavior by commenting out this one line in the unmanaged code:

//    scrollView.documentView = outlineView;

Without it, I get the "buttons" in my window in my XM app, which makes zero sense. More digging....

edit
I can simplify the obj-c to this: https://gist.github.com/chamons/3aa36d78649e775436db3146989e1569

and still reproduce the buttons disappering.... 🤔

@chamons

This comment has been minimized.

Show comment
Hide comment
@chamons

chamons Sep 20, 2018

Member

Ok...I've gotten it reduce to a single C# file in your managed project

https://gist.github.com/chamons/b6bc277c78ca60198e8567ea74dd3f58

I'm going to try it in a new project \ try to figure out what's special about that.

Somehow it appears to be related to MainMenu.xib . If I replace main with:

			NSApplication.Init ();
			NSApplication.SharedApplication.Delegate = new AppDelegate ();
			NSApplication.SharedApplication.Run ();

I have buttons again it seems? Why does ObjC work with it?

Member

chamons commented Sep 20, 2018

Ok...I've gotten it reduce to a single C# file in your managed project

https://gist.github.com/chamons/b6bc277c78ca60198e8567ea74dd3f58

I'm going to try it in a new project \ try to figure out what's special about that.

Somehow it appears to be related to MainMenu.xib . If I replace main with:

			NSApplication.Init ();
			NSApplication.SharedApplication.Delegate = new AppDelegate ();
			NSApplication.SharedApplication.Run ();

I have buttons again it seems? Why does ObjC work with it?

@lemonmojo

This comment has been minimized.

Show comment
Hide comment
@lemonmojo

lemonmojo Sep 20, 2018

@chamons I intentionally set up this repo project to have 99% native code and only the bare bones app startup in C# so that it's clear that the problem does not have anything to do with Xamarin's ObjC bindings. That's also why I've chosen to share the xib file between the native app and Xamarin.Mac app. When compiled with Xcode, there's no problem with the xib so I really don't think the xib is the reason.

Also, I've been through what you're currently doing multiple times since DP1 was released. I changed something in code or IB and magically the problem went away only to re-occur in a slightly different form after another set of changes. I'm not saying that you should stop digging, but don't get excited too soon. ;)

The big question here is, why does all of this work just fine when only ObjC is involved but as soon as mono is in the game, the strange behavior occurs?

lemonmojo commented Sep 20, 2018

@chamons I intentionally set up this repo project to have 99% native code and only the bare bones app startup in C# so that it's clear that the problem does not have anything to do with Xamarin's ObjC bindings. That's also why I've chosen to share the xib file between the native app and Xamarin.Mac app. When compiled with Xcode, there's no problem with the xib so I really don't think the xib is the reason.

Also, I've been through what you're currently doing multiple times since DP1 was released. I changed something in code or IB and magically the problem went away only to re-occur in a slightly different form after another set of changes. I'm not saying that you should stop digging, but don't get excited too soon. ;)

The big question here is, why does all of this work just fine when only ObjC is involved but as soon as mono is in the game, the strange behavior occurs?

@lemonmojo

This comment has been minimized.

Show comment
Hide comment
@lemonmojo

lemonmojo Sep 26, 2018

@chamons Just duplicated the radar.

lemonmojo commented Sep 26, 2018

@chamons Just duplicated the radar.

@Rogister

This comment has been minimized.

Show comment
Hide comment
@Rogister

Rogister Sep 26, 2018

Sorry but I did not understand everything in your search for the bug.

I saw that you posted a radar at APPLE but what should we do now to make it work in our Xamarin.MAC application.

Currently, I put the following lines of code and the problem seems solved:

  [DllImport ("/ System / Library / Frameworks / Cocoa.framework / Cocoa", EntryPoint = "NSApplicationLoad")]
          private static extern bool NSApplicationLoad ();

          static void Main (string [] args)
{
              NSApplicationLoad ();

   NSApplication.Init ();
NSApplication.Main (args);

          }

But by pushing further tests, I still sometimes have empty alertsview.

So, my question, will this be solved and fixed in a future Xamarin.MAC version?

Thank you

Alain

Rogister commented Sep 26, 2018

Sorry but I did not understand everything in your search for the bug.

I saw that you posted a radar at APPLE but what should we do now to make it work in our Xamarin.MAC application.

Currently, I put the following lines of code and the problem seems solved:

  [DllImport ("/ System / Library / Frameworks / Cocoa.framework / Cocoa", EntryPoint = "NSApplicationLoad")]
          private static extern bool NSApplicationLoad ();

          static void Main (string [] args)
{
              NSApplicationLoad ();

   NSApplication.Init ();
NSApplication.Main (args);

          }

But by pushing further tests, I still sometimes have empty alertsview.

So, my question, will this be solved and fixed in a future Xamarin.MAC version?

Thank you

Alain

@lemonmojo

This comment has been minimized.

Show comment
Hide comment
@lemonmojo

lemonmojo Sep 26, 2018

@Rogister What exactly are you doing to get empty NSAlerts with the NSApplicationLoad workaround in place?

lemonmojo commented Sep 26, 2018

@Rogister What exactly are you doing to get empty NSAlerts with the NSApplicationLoad workaround in place?

@lilleydnSub

This comment has been minimized.

Show comment
Hide comment
@lilleydnSub

lilleydnSub Sep 26, 2018

I am presuming we are going to get a Mono update pretty soon with a work around ?

lilleydnSub commented Sep 26, 2018

I am presuming we are going to get a Mono update pretty soon with a work around ?

@Rogister

This comment has been minimized.

Show comment
Hide comment
@Rogister

Rogister Sep 26, 2018

I try to reproduce but it does not happen anymore. I was in a modaldialog and I display the alertview.

Rogister commented Sep 26, 2018

I try to reproduce but it does not happen anymore. I was in a modaldialog and I display the alertview.

@Rogister

This comment has been minimized.

Show comment
Hide comment
@Rogister

Rogister Sep 26, 2018

I can have the problem. It's every time I'm in a modal dialog box and want to display the alertview. BUT it does not happen all the time. Sometimes I do it, I have the empty alertview and then I redo it afterwards, I have the correct [box.](url
AlertView.pdf
)

Rogister commented Sep 26, 2018

I can have the problem. It's every time I'm in a modal dialog box and want to display the alertview. BUT it does not happen all the time. Sometimes I do it, I have the empty alertview and then I redo it afterwards, I have the correct [box.](url
AlertView.pdf
)

@lemonmojo

This comment has been minimized.

Show comment
Hide comment
@lemonmojo

lemonmojo Sep 26, 2018

@Rogister and you have that with the NSApplicationLoad workaround in place?

lemonmojo commented Sep 26, 2018

@Rogister and you have that with the NSApplicationLoad workaround in place?

@Rogister

This comment has been minimized.

Show comment
Hide comment
@Rogister

Rogister Sep 26, 2018

Yes, here is my code below:

static class MainClass
{

         [DllImport ("/ System / Library / Frameworks / Cocoa.framework / Cocoa", EntryPoint = "NSApplicationLoad")]
         private static extern bool NSApplicationLoad ();

         static void Main (string [] args)
{
AppDomain.CurrentDomain.UnhandledException + = AppDomain_CurrentDomain_UnhandledException;

             NSApplicationLoad ();

             NSApplication.Init ();
NSApplication.Main (args);

           

         }

static void AppDomain_CurrentDomain_UnhandledException (object sender, UnhandledExceptionEventArgs e)
     {
System.Diagnostics.Process.Start ( "/ Applications / Medinect.app");

     }
}

Rogister commented Sep 26, 2018

Yes, here is my code below:

static class MainClass
{

         [DllImport ("/ System / Library / Frameworks / Cocoa.framework / Cocoa", EntryPoint = "NSApplicationLoad")]
         private static extern bool NSApplicationLoad ();

         static void Main (string [] args)
{
AppDomain.CurrentDomain.UnhandledException + = AppDomain_CurrentDomain_UnhandledException;

             NSApplicationLoad ();

             NSApplication.Init ();
NSApplication.Main (args);

           

         }

static void AppDomain_CurrentDomain_UnhandledException (object sender, UnhandledExceptionEventArgs e)
     {
System.Diagnostics.Process.Start ( "/ Applications / Medinect.app");

     }
}

@lemonmojo

This comment has been minimized.

Show comment
Hide comment
@lemonmojo

lemonmojo Sep 26, 2018

@Rogister Try moving NSApplicationLoad above your unhandled exception handler. Does that help?

lemonmojo commented Sep 26, 2018

@Rogister Try moving NSApplicationLoad above your unhandled exception handler. Does that help?

@Rogister

This comment has been minimized.

Show comment
Hide comment
@Rogister

Rogister Sep 26, 2018

I did what you say but it does not change anything.

I still have the problem sometimes.

What I'm sure of is that your solution solves a lot of things because before I had any sort of problem that was going on what I do not have anymore, but here there is still this little problem

Rogister commented Sep 26, 2018

I did what you say but it does not change anything.

I still have the problem sometimes.

What I'm sure of is that your solution solves a lot of things because before I had any sort of problem that was going on what I do not have anymore, but here there is still this little problem

@chamons

This comment has been minimized.

Show comment
Hide comment
@chamons

chamons Sep 26, 2018

Member

@Rogister Please provide a full sample showing your issue, saying "I still have the problem sometimes" with the snippets of code you are posting \ screenshot is not helpful.

Also, please stop spamming this issue. You've posted 5 times in 4 hours, and it notifies every single person on the thread.

Member

chamons commented Sep 26, 2018

@Rogister Please provide a full sample showing your issue, saying "I still have the problem sometimes" with the snippets of code you are posting \ screenshot is not helpful.

Also, please stop spamming this issue. You've posted 5 times in 4 hours, and it notifies every single person on the thread.

@Rogister

This comment has been minimized.

Show comment
Hide comment
@Rogister

Rogister Sep 26, 2018

It's just to show that there is still a small problem and that this solution does not solve everything.

Rogister commented Sep 26, 2018

It's just to show that there is still a small problem and that this solution does not solve everything.

@chamons

This comment has been minimized.

Show comment
Hide comment
@chamons

chamons Sep 26, 2018

Member

Then please provide a sample or steps to reproduce.

All issues I personally can reproduce right now are covered by radar://44763485 mono/mono#10802

Member

chamons commented Sep 26, 2018

Then please provide a sample or steps to reproduce.

All issues I personally can reproduce right now are covered by radar://44763485 mono/mono#10802

@Rogister

This comment has been minimized.

Show comment
Hide comment
@Rogister

Rogister Sep 27, 2018

Hi,

I installed yesterday the BETA 1 of MacOS Mojave.

I tested my application and I see that everything is working properly. I have no problem (AlertView, ...)

I then tested by removing the line of code NSApplicationLoad (); in main.cs to try and I see everything is working fine now without this line.

Can you on your side confirm that?

Thank you

Alain

Rogister commented Sep 27, 2018

Hi,

I installed yesterday the BETA 1 of MacOS Mojave.

I tested my application and I see that everything is working properly. I have no problem (AlertView, ...)

I then tested by removing the line of code NSApplicationLoad (); in main.cs to try and I see everything is working fine now without this line.

Can you on your side confirm that?

Thank you

Alain

@lemonmojo

This comment has been minimized.

Show comment
Hide comment
@lemonmojo

lemonmojo Sep 27, 2018

@Rogister Interesting. I posted in the other thread yesterday that I also updated to 10.14.1 beta and can still reproduce the problem. Did you test with any of the repo cases I or @chamons provided?

lemonmojo commented Sep 27, 2018

@Rogister Interesting. I posted in the other thread yesterday that I also updated to 10.14.1 beta and can still reproduce the problem. Did you test with any of the repo cases I or @chamons provided?

@Rogister

This comment has been minimized.

Show comment
Hide comment
@Rogister

Rogister Sep 27, 2018

No, I only tested with my application. I will try this

Rogister commented Sep 27, 2018

No, I only tested with my application. I will try this

@Rogister

This comment has been minimized.

Show comment
Hide comment
@Rogister

Rogister Sep 27, 2018

I confirm that with my application, I have no problem with BETA 1 anymore.

I work with Xcode 10 and Xamarin.MAC 4.99 under MacOS Mojave 10.14.1

I will test Chris's app.

Rogister commented Sep 27, 2018

I confirm that with my application, I have no problem with BETA 1 anymore.

I work with Xcode 10 and Xamarin.MAC 4.99 under MacOS Mojave 10.14.1

I will test Chris's app.

@Rogister

This comment has been minimized.

Show comment
Hide comment
@Rogister

Rogister Sep 27, 2018

@lemonmojo: I just tested Chris's app and for me it works fine too.

At home, it does not work ?

Rogister commented Sep 27, 2018

@lemonmojo: I just tested Chris's app and for me it works fine too.

At home, it does not work ?

@Rogister

This comment has been minimized.

Show comment
Hide comment
@Rogister

Rogister Sep 28, 2018

I come back to you for this problem.

I'm going crazy. Today, I'm still testing my application and everything is working properly. I'm not doing anything special.

And then, I do not know why, all the problems come back. Blank alertview, ...

I restart my macbook and I try again with the lines of code in Main.cs and it works again correctly. I then remove these lines of code and now it works fine.

Rogister commented Sep 28, 2018

I come back to you for this problem.

I'm going crazy. Today, I'm still testing my application and everything is working properly. I'm not doing anything special.

And then, I do not know why, all the problems come back. Blank alertview, ...

I restart my macbook and I try again with the lines of code in Main.cs and it works again correctly. I then remove these lines of code and now it works fine.

@chamons

This comment has been minimized.

Show comment
Hide comment
@chamons

chamons Oct 5, 2018

Member

See #4848 for a package to test with a potential fix

Member

chamons commented Oct 5, 2018

See #4848 for a package to test with a potential fix

@projectgoav

This comment has been minimized.

Show comment
Hide comment
@projectgoav

projectgoav Oct 8, 2018

I'm experiencing an issue where the contents of an NSPopover fail to render. The controls inside exist and respond to scroll and click events but the contents aren't rendered.

Here is an example:
screenshot 2018-10-03 at 14 56 07

What I have found is:

  • Running from Visual Studio in ANY configuration (Debug, Release) the popover will always appear and render content.
  • Running from <project>.app bundle I always see what happens in the screenshot. If I toggle between the system themes, generally the content will start to render.
  • Running the <project>.app bundle from the command line <project>.app/Contents/MacOS/<project> will always render the content.

Is this something similiar, or should I raise a new issue?

Edit:
I'm using the latest Visual Studio for Mac from the 'Stable' channel and am running Mac OSX Mojave. This still occurs on Mojave Developer Beta 2.

projectgoav commented Oct 8, 2018

I'm experiencing an issue where the contents of an NSPopover fail to render. The controls inside exist and respond to scroll and click events but the contents aren't rendered.

Here is an example:
screenshot 2018-10-03 at 14 56 07

What I have found is:

  • Running from Visual Studio in ANY configuration (Debug, Release) the popover will always appear and render content.
  • Running from <project>.app bundle I always see what happens in the screenshot. If I toggle between the system themes, generally the content will start to render.
  • Running the <project>.app bundle from the command line <project>.app/Contents/MacOS/<project> will always render the content.

Is this something similiar, or should I raise a new issue?

Edit:
I'm using the latest Visual Studio for Mac from the 'Stable' channel and am running Mac OSX Mojave. This still occurs on Mojave Developer Beta 2.

@chamons

This comment has been minimized.

Show comment
Hide comment
@chamons

chamons Oct 8, 2018

Member

Have you tried using the package linked from #4848 (comment) and seeing if that changes behavior?

Member

chamons commented Oct 8, 2018

Have you tried using the package linked from #4848 (comment) and seeing if that changes behavior?

@projectgoav

This comment has been minimized.

Show comment
Hide comment
@projectgoav

projectgoav Oct 8, 2018

Sorry, I was linked here from another project and didn't see the other issue. Downloaded and installed that patch and I'm now seeing the popover render everytime! :)

projectgoav commented Oct 8, 2018

Sorry, I was linked here from another project and didn't see the other issue. Downloaded and installed that patch and I'm now seeing the popover render everytime! :)

@chamons

This comment has been minimized.

Show comment
Hide comment
@chamons

chamons Oct 8, 2018

Member

No worries, there are a sea of github issues about this :)

Glad to hear another 👍 on that fix working. It will go out at some point to a stable channel, subscribe to #4848 (comment) for notification when that happens.

Member

chamons commented Oct 8, 2018

No worries, there are a sea of github issues about this :)

Glad to hear another 👍 on that fix working. It will go out at some point to a stable channel, subscribe to #4848 (comment) for notification when that happens.

@chamons

This comment has been minimized.

Show comment
Hide comment
@chamons

chamons Oct 8, 2018

Member

I'm going to close this as a duplicate of #4848 as everyone here appears to have the same exact issue, with different "strange" drawing behaviors.

Member

chamons commented Oct 8, 2018

I'm going to close this as a duplicate of #4848 as everyone here appears to have the same exact issue, with different "strange" drawing behaviors.

@chamons chamons closed this Oct 8, 2018

@Rogister

This comment has been minimized.

Show comment
Hide comment
@Rogister

Rogister Oct 9, 2018

@chamons

I installed the fix and everything seems to work properly. Thank you very much

I note that sometimes I still have empty boxes. It's almost impossible to reproduce. Sometimes (extremely rarely, the box is empty and if I do it again soon after, no problem).

Rogister commented Oct 9, 2018

@chamons

I installed the fix and everything seems to work properly. Thank you very much

I note that sometimes I still have empty boxes. It's almost impossible to reproduce. Sometimes (extremely rarely, the box is empty and if I do it again soon after, no problem).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment