Welcome! Log In Create A New Profile

Advanced

[WM23] Repetitive exception in our application

Posted by pacomaral 
[WM23] Repetitive exception in our application
March 05, 2020 08:24AM
Hello.

We have been receiving this error for a long time, and we can't find out what's the cause of it. We can't even reproduce it.


Bad call parameters for 'Declaring the global variables of MyWindow' code: 1 parameters were expected while 0 parameters have been passed.


In the code, we don't open that window anywhere without parameters, so that can't be the problem.Also, it is strange because the stack shows the lines of our code that are the inicialization of project, but that Window is not the first one.


The only thing I can suppose, is that the application is auto-restarting for some reason and trying to open that window without passing any parameters.


Why could this be happening? Someone faced this error before?
could be coming from different things, by example the fact that your app went in background and came back to focus, and window was reopen...

In any case, make the parameters of your window optional by setting a default value for each of them. Make sure that this default value is "abnormal" and test it in your init code... at that point, when you get an abnormal value, you know that you are in the error case and you can code accordingly.
Re: [WM23] Repetitive exception in our application
March 05, 2020 05:52PM
Argus Wrote:
-------------------------------------------------------
> could be coming from different things, by example
> the fact that your app went in background and came
> back to focus, and window was reopen...
>
> In any case, make the parameters of your window
> optional by setting a default value for each of
> them. Make sure that this default value is
> "abnormal" and test it in your init code... at
> that point, when you get an abnormal value, you
> know that you are in the error case and you can
> code accordingly.

Thanks for your response.

I will give it a try and see if the error is doesn't happen again. Anyway, it would be nice to know what is the cause of that restarts, as I have a large amount of windows and it is a long work to implement that on every one.
Author:

Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: