Errors printed to stdout with validation layers, but no callback - vulkan

I've followed this tutorial and when setting up validation layers the author says we have to setup debug callbacks so logs can be printed in stdout.
I didn't set them up and yet the application is printing various error messages in my terminal : Swapchain(ERROR): object 0x1cdd2d0 type: 1 location: 292 msgCode: 3: VkDestroyInstance() called before all of its associated VkSurfaceKHRs were destroyed for instance, when omitting the call to vkDestroySurfaceKHR.
I'm using VK_LAYER_LUNARG_standard_validation, and no particular extension (only VK_KHR_surface and VK_KHR_xcb_surface).
Is this expected behaviour?

The default logging behavior for the validation layers was changed back around June 1 because people wanted the messages to go to stdout without having to provide a callback or putting a vk_layer_settings.txt in the application's directory. The tutorial website might be out of date in this area.
If this is unwanted behavior, the easiest way to change it is to get a copy of vk_layer_settings.txt (shipped in SDK) and edit it to change the behavior to what you want, and then place it in what is the current directory when the application starts.
As an alternative, you can also code a debug callback.
For more info, please see the layer docs on the LunarXchange website.

Related

How to prevent MVC5 setting the fTrySkipCustomErrors flag to true automatically

Short Version
Please read at the very bottom for a short version of the question.
Situation
In a question I asked last week, I struggled in finding a solution, which makes our asp.net error visualization waterproof, since there are some edge cases where the asp.net exception handling fails and hence no proper exception visualizations can be created:
How to properly set up ASP.NET web.config to show application specific, safe and user friendly asp.net error messages in edge cases
Desired Solution
As an alternative to the way I described there, in my opinion the best way to make the exception visualization reliable, would be to use the httpErrors-element in system.webServer as a failsave so that any error which is not properly handled by asp.net, leads to a generic error page which is shown based on the settings of the httpErrors-element .
To accomplish this, there must be two things possible:
Error pages properly handled by the application must pass through iis without being replaced with a generic error message
Errors which could not be processed properly in asp.net, must be replaced through IIS.
It is my understanding, that this very behaviour is meant by the existingResponse="Auto" parameter in the httpErrors-element.
The ms documentation states:
Leaves the response untouched only if the SetStatus flag is set.
This is exactly what is necessary: Any successful error page creation in the application (through Application_Error or through an explicitly defined error handling page) can set
Response.TrySkipIisCustomErrors = true and IIS would let the error page pass through. However, every other error which was not successfully handled by the application in asp.net, would not set the flag and hence get the error page which is specified in the httpErrors-element.
The Problem
Sadly, it seems that in MVC5-applications (I don’t known whether the same behavior is true in other environments), the Response.TrySkipIisCustomErrors (fTrySkipCustomErrors) seems to be set automatically to [true], even if it is not set by the application.
Hence we are at the same place, as in my other post: If the error handling of the application blows, there is no way to show an application specific error with existingResponse="Auto", since its not possible to reset the fTrySkipCustomErrors flag.
As an alternative, one can set existingResponse="PassThrough". That's what we do currently, since we want to generate our error pages with a support-code and other helpfull information about the error to be shown to the user, or one can use existingResponse="Replace", but this is not an option, since it replaces any error page so that we don’t can show the user any error-specific information such as the support-code mentionen before.
Quesition in Short
The question is therefore, how to make sure that MVC5 (asp.net) does not set the fTrySkipCustomErrors flag automatically to [true], since there are situations, where no application code is executed and hence the Response.TrySkipIisCustomErrors (fTrySkipCustomErrors) cannot be set to false, what renders the existingResponse="Auto" parameter moot.
To check such a situation where the asp.net MVC5 exception handling blows but the fTrySkipCustomErrors flag is set to true, please request the following page from your MVC5 application:
http[s]://[yourWebsite]/com1
Please note: I'm not interested in disabling the above error. It's an example. I want the error visualization reliable and not to have to circumvent every error that possibly can blow asp.net's error handling mechanisms.

How can I run some code in the event that a watched folder does not exist?

I have a Mule 4 flow that uses the [File] On New or Updated File event source. This element is configured to wait for file changes within a specific folder.
When I deploy my flow, and the deployed application does not have access to the specified folder, a log message is generated and the flow terminates. However, I'd like to add some additional processing in this case. (I'd like to log a message to an alternative event log).
I tried adding an On Error Propagate element to the flow, but this is not triggered when the error occurs - I think this is because the error is a system error rather than a messaging error.
If I could add a step before the On New or Updated File element, then I could check for the existence of the folder, and execute that extra code there - but I see no way to do that either.
Well, I was able to do something that "works". I created another flow that runs on a (long) timer, which runs immediately and checks for the existence of the folder by attempting to list its contents. If that fails, then the On Error ... block of that flow is reached, because in this case the error is treated as a messaging error rather than a system error.
Not an ideal solution, but a solution nonetheless.
May I suggest that you monitor folder which should contain none existing folder?
For exmple you want to monitor /one/two/three/abc.txt. three does not exist. Watch two for new and updated files.

how to test a hotfolder that use channels in spring-integration?

in spring-integretion project,i have a hot folder that detects when a csv is placed in a folder and do some extra stuff, i have a inbound-channel-adapter connected with a channel.
inbound-channel-adapter -> channel.
detects when a csv its placed receive the mns its connected with
a service-activator
what i what to do its test only that the channel its receiving the mns when a file its created
i am using this tutorial
https://www.javacodegeeks.com/2013/05/spring-integration-file-polling-and-tests.html
its very useful, but i can create the context
Caught exception while allowing TestExecutionListener [org.springframework.test.context.support.DependencyInjectionTestExecutionListener#57a4d5ee] to prepare test instance [proyect.integration.hotFolderTest#5af5def9]
java.lang.IllegalStateException: Failed to load ApplicationContext
You need to show more stack trace on the matter, because right now it isn't clear what is your real issue.
Also would be great to share some code what you have so far and what you would like to do in the test case.
To verify a message presence in the channel you can configure a ChannelInterceptor and implement its preSend().
However we also suggest something like #SpringIntegrationTest with the MockIntegration features. That way you can replace your real service activator with some MockIntegration.mockMessageHandler() and perform verification on it.
You would need to configure a noAutoStartup on the mentioned annotation do not poll directory until you prepare your mock and call a this.mockIntegrationContext.substituteMessageHandlerFor().
See more info in the Reference Manual: https://docs.spring.io/spring-integration/docs/current/reference/html/testing.html#test-context

xero-api Initialise Problems

I have attempted to set up xero-node passing in the consumer key and consumer secret along with the app name as the user Agent. However when I do a test call e.g. xeroClient.core.users.getUsers() the code just seems to freeze not giving any errors however I cannot move any further.
Are you able to post a gist of the code you are using?
What App type are you using (Private, Public or Partner)?
Have you seen the code samples on the main GitHub page? There is also a sample app here: https://github.com/XeroAPI/xero-node-sample-app

$model->validate() method is printing 'test'

I am doing a website on YII and PostgreSQL. It is recurrently exiting inside $model->validate() method by printing 'test'. I have searched whole code, There is no exit code on controller , model, beforeValidate(), afterValidate(), even whole project.
Question
How can i debug on such scenario. I have only access to ftp, Netbean as IDE, but no localhost. How to find which file is printing exit code or do you have any idea ?
Thank you,
Ram
Messages can be logged by calling either Yii::log or Yii::trace. The difference between these two methods is that the latter logs a message only when the application is in debug mode.
Yii::log($message, $level, $category);
Yii::trace($message, $category);
When logging a message, we need to specify its category and level. Category is a string in the format of xxx.yyy.zzz which resembles to the path alias. For example, if a message is logged in CController, we may use the category system.web.CController. Message level should be one of the following values:
For more details, refer this YII Tutorial