You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First and foremost, I'm not 100% certain of what I'm going to say, but...
In AppComponent.hpp, you initialize the m_cmdArgs member in the contructor (line 28).
A bit later in the code (line 70), you use the OATPP_CREATE_COMPONENT macro to create a component, and in the associated lambda, you try to use that m_cmdArgs member.
I've been struggling with my own code and I suspect it's because the OATPP_CREATE_COMPONENT macro (and most of all the lambda) will be executed before the AppComponent constructor.
So I think that, in you code, you try to make use of a member that has not been initialized.
On a more generic note, I've been trying to pass a configuration structure to that constructor. If I'm right, all component members that depend on it must be initialized differently, like in the body of the constructor. Maybe it's worth mentioning somewhere.
The text was updated successfully, but these errors were encountered:
Hello,
First and foremost, I'm not 100% certain of what I'm going to say, but...
In AppComponent.hpp, you initialize the m_cmdArgs member in the contructor (line 28).
A bit later in the code (line 70), you use the OATPP_CREATE_COMPONENT macro to create a component, and in the associated lambda, you try to use that m_cmdArgs member.
I've been struggling with my own code and I suspect it's because the OATPP_CREATE_COMPONENT macro (and most of all the lambda) will be executed before the AppComponent constructor.
So I think that, in you code, you try to make use of a member that has not been initialized.
On a more generic note, I've been trying to pass a configuration structure to that constructor. If I'm right, all component members that depend on it must be initialized differently, like in the body of the constructor. Maybe it's worth mentioning somewhere.
The text was updated successfully, but these errors were encountered: