Wt: fatal error: caught unknown exception.
Added by Mark Travis over 2 years ago
This is driving me crazy! I've rebuilt my whole environment and project from scratch at least 3 times today, boost, Wt, etc and I can't get rid of this exception. This is a project that was working earlier this year. The only change I made was upgrading to the new version of Xcode 13. It worked on 12. Before I back level to 12 (who knows if it will still work), is this something simple I'm missing? I'm guessing something around std:: libraries.
Here's the code:
SOutputModel::SSOutputModel(const std::shared_ptr<Wt::WStandardItemModel> &sourceSeries) : inputLayer(0,0){
int numRows = sourceSeries->rowCount();
int numColumns = sourceSeries->columnCount();
int i,j = 0;
for(i=0; i<numRows; i++){
for(j=0;j<numColumns;j++) {
// make sure you skip the header row in sourceSeries
inputLayer(i,j) = asNumber(sourceSeries->data(i+1,j,ItemDataRole::Display));
}
}
}
It crashes when it gets to the inputLayer(i,j) line.
It "crashes" by destroying the current session, then immediately starts a new session.
Another clue is the IDE spits out the following strange message.
error: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/string:1630:10: 'std::basic_string, std::allocator>::move_assign' from module 'std.iosfwd' is not present in definition of 'std::basic_string, std::allocator>' provided earlier
void __move_assign(basic_string& __str, false_type)
^
note: declaration of 'move_assign' does not match
note: declaration of '__move_assign' does not match
If I step "in to" the inputLayer line above, it crashes right after it gets out of the asNumber library routine (double asNumber(const cpp17::any& v)) when it enters matrix.h and does a range check. (matrix.h is Stroustrup's library template header)
Replies (4)
RE: Wt: fatal error: caught unknown exception. - Added by Mark Travis over 2 years ago
oh, forgot to add that this code worked fine earlier this year. The next thing it should do is return a filled out ChartsWidget with table view and graphs, which it did perfectly earlier this year.
could it be the addition of matrix.h??
RE: Wt: fatal error: caught unknown exception. - Added by Mark Travis over 2 years ago
Maybe nevermind. This is what happens when you don't program for months. You forget to initialize the matrix to accept a value. (Headslap)
Would be nice if my environment gave me a more precise warning.
RE: Wt: fatal error: caught unknown exception. - Added by Christian Meyer over 2 years ago
Hey, sorry for late reply and I'm not even sure it helps
But I had some trouble getting wt apps Running after MacOs updates a while ago.
what helped then was the reinstall of the devtools. Cant remember excact what to look for and a quick search didn't turn up much ...
I switched from MacOs to Linux a while ago ... this to be one of the reasons...
Good Luck!
RE: Wt: fatal error: caught unknown exception. - Added by Mark Travis over 2 years ago
Thanks Christian!
I submitted a bug report to Apple on it. Basically, they changed up how they consume the C++ libraries and it was calling an older library by accident as it appeared first in the search path. Initially, I renamed the subdirectory, which worked. The next point release they fixed it.
At least in the process of this, as mentioned earlier, I did find a bug of my own making. It's never simple, is it? :)