Discussion:
assertion failure
Alan Snyder
2018-04-07 16:24:43 UTC
Permalink
I am getting an assertion failure notice on the console when running a small test program:

Assertion failure in -[AWTWindow_Panel _validateCollectionBehavior:], /Library/Caches/com.apple.xbs/Sources/AppKit/AppKit-1504.83.101/AppKit.subproj/NSWindow.m:14741

(This message is on 10.12.6, the details are different on 10.13.)

When run under Xcode, there is more information: utility panels cannot be fullscreen primary

My question—does this represent a bug in AppKit that I should report, or is it trying to help me by explaining that my program provided an unsupported set of style bits when creating a window?

Alan

_______________________________________________

Cocoa-dev mailing list (Cocoa-***@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/gegs%40ml-in.narkiv
Rob Petrovec
2018-04-07 19:04:22 UTC
Permalink
It’s saying that you are doing it wrong. Utility windows cannot go full screen. You have yours set to go full screen. It shouldn’t be.

—Rob
Post by Alan Snyder
Assertion failure in -[AWTWindow_Panel _validateCollectionBehavior:], /Library/Caches/com.apple.xbs/Sources/AppKit/AppKit-1504.83.101/AppKit.subproj/NSWindow.m:14741
(This message is on 10.12.6, the details are different on 10.13.)
When run under Xcode, there is more information: utility panels cannot be fullscreen primary
My question—does this represent a bug in AppKit that I should report, or is it trying to help me by explaining that my program provided an unsupported set of style bits when creating a window?
Alan
_______________________________________________
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
https://lists.apple.com/mailman/options/cocoa-dev/petrock%40mac.com
_______________________________________________

Cocoa-dev mailing list (Cocoa-***@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/gegs%40ml-in.narkive.net

This email sent
Alan Snyder
2018-04-07 20:18:01 UTC
Permalink
I understand that my program is doing it wrong. But is it normal to have an assertion failure, rather than an error return?
Post by Rob Petrovec
It’s saying that you are doing it wrong. Utility windows cannot go full screen. You have yours set to go full screen. It shouldn’t be.
—Rob
Post by Alan Snyder
Assertion failure in -[AWTWindow_Panel _validateCollectionBehavior:], /Library/Caches/com.apple.xbs/Sources/AppKit/AppKit-1504.83.101/AppKit.subproj/NSWindow.m:14741
(This message is on 10.12.6, the details are different on 10.13.)
When run under Xcode, there is more information: utility panels cannot be fullscreen primary
My question—does this represent a bug in AppKit that I should report, or is it trying to help me by explaining that my program provided an unsupported set of style bits when creating a window?
Alan
_______________________________________________
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
https://lists.apple.com/mailman/options/cocoa-dev/petrock%40mac.com
_______________________________________________

Cocoa-dev mailing list (Cocoa-***@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/gegs%40ml-in.narkive.net

This em
Steve Christensen
2018-04-07 22:06:57 UTC
Permalink
It's not uncommon to have a method throw an exception when you make a programming error so that you get immediate feedback. Not knowing offhand which method(s) were called, my guess would be that they're designed to always succeed if you specify the correct parameter values, so the assertion is letting you know that your parameters aren't correct.

It's not like the case where, for example, you're trying to delete a file that may or may not be there. In general usage either of those cases is just as valid so the file system reports the error, if any, and lets your app decide what to do.
Post by Alan Snyder
I understand that my program is doing it wrong. But is it normal to have an assertion failure, rather than an error return?
Post by Rob Petrovec
It’s saying that you are doing it wrong. Utility windows cannot go full screen. You have yours set to go full screen. It shouldn’t be.
—Rob
Post by Alan Snyder
Assertion failure in -[AWTWindow_Panel _validateCollectionBehavior:], /Library/Caches/com.apple.xbs/Sources/AppKit/AppKit-1504.83.101/AppKit.subproj/NSWindow.m:14741
(This message is on 10.12.6, the details are different on 10.13.)
When run under Xcode, there is more information: utility panels cannot be fullscreen primary
My question—does this represent a bug in AppKit that I should report, or is it trying to help me by explaining that my program provided an unsupported set of style bits when creating a window?
Alan
_______________________________________________

Cocoa-dev mailing list (Cocoa-***@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/gegs%40ml-in.narkive.net

This ema
Alex Zavatone
2018-04-08 18:58:02 UTC
Permalink
Do you mind putting the program up on Github or something similar so any of us can take a look?

Do you check for existence of the file before deleting, or check its properties to see if it is deletable? I don’t know if this is required or not, just submitting these as an option.

Cheers.

Alex Zavatone
Post by Steve Christensen
It's not uncommon to have a method throw an exception when you make a programming error so that you get immediate feedback. Not knowing offhand which method(s) were called, my guess would be that they're designed to always succeed if you specify the correct parameter values, so the assertion is letting you know that your parameters aren't correct.
It's not like the case where, for example, you're trying to delete a file that may or may not be there. In general usage either of those cases is just as valid so the file system reports the error, if any, and lets your app decide what to do.
Post by Alan Snyder
I understand that my program is doing it wrong. But is it normal to have an assertion failure, rather than an error return?
Post by Rob Petrovec
It’s saying that you are doing it wrong. Utility windows cannot go full screen. You have yours set to go full screen. It shouldn’t be.
—Rob
Post by Alan Snyder
Assertion failure in -[AWTWindow_Panel _validateCollectionBehavior:], /Library/Caches/com.apple.xbs/Sources/AppKit/AppKit-1504.83.101/AppKit.subproj/NSWindow.m:14741
(This message is on 10.12.6, the details are different on 10.13.)
When run under Xcode, there is more information: utility panels cannot be fullscreen primary
My question—does this represent a bug in AppKit that I should report, or is it trying to help me by explaining that my program provided an unsupported set of style bits when creating a window?
Alan
_______________________________________________
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
https://lists.apple.com/mailman/options/cocoa-dev/zav%40mac.com
_______________________________________________

Cocoa-dev mailing list (Cocoa-***@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/gegs%40ml-in.na
Alex Zavatone
2018-04-08 19:04:54 UTC
Permalink
Post by Alex Zavatone
Do you mind putting the program up on Github or something similar so any of us can take a look?
Do you check for existence of the file before deleting, or check its properties to see if it is deletable? I don’t know if this is required or not, just submitting these as an option.
Cheers.
Alex Zavatone
Apologies. I misread the second half of Steve’s reply and thought that applied to the actual problem mentioned, trying to make a utility window fullscreen.

Happy Sunday.

Alex Zavatone
_______________________________________________

Cocoa-dev mailing list (Cocoa-***@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/gegs%40ml-in.narkive.net

This email sent to ***@ml-in.na

Loading...