Open boverhof opened 1 year ago
I have a vague recollection of running into a similar error a few years ago, although not in the context of FOQUS OUU. As I remember (disclaimer: all of this might be completely off-track):
I'd say that the first steps would be:
Josh and I were able to reproduce this with stack trace:
variable 1 BFB.BFBRGN.GasIn.F
2023-04-21 12:50:30.251 python[24187:1488008] WARNING: NSWindow drag regions should only be invalidated on the Main Thread! This will throw an exception in the future. Called from (
0 AppKit 0x00007ff80ac6c40e -[NSWindow(NSWindow_Theme) _postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 338
1 AppKit 0x00007ff80ac588e4 -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1227
2 AppKit 0x00007ff80adf13fd -[NSPanel _initContent:styleMask:backing:defer:contentView:] + 50
3 AppKit 0x00007ff80ac58412 -[NSWindow initWithContentRect:styleMask:backing:defer:] + 42
4 AppKit 0x00007ff80adf13b6 -[NSPanel initWithContentRect:styleMask:backing:defer:] + 59
5 AppKit 0x00007ff80af23493 -[NSWindow initWithContentRect:styleMask:backing:defer:screen:] + 50
6 libqcocoa.dylib 0x0000000128d85745 -[QNSPanel initWithContentRect:styleMask:backing:defer:screen:platformWindow:] + 197
7 libqcocoa.dylib 0x0000000128d71cac _ZN12QCocoaWindow14createNSWindowEb + 1324
8 libqcocoa.dylib 0x0000000128d6b672 _ZN12QCocoaWindow22recreateWindowIfNeededEv + 1266
9 libqcocoa.dylib 0x0000000128d6b0fe _ZN12QCocoaWindow10initializeEv + 318
10 QtGui 0x0000000128513eb7 _ZN14QWindowPrivate6createEby + 151
11 QtWidgets 0x0000000127ed3771 _ZN14QWidgetPrivate6createEv + 1185
12 QtWidgets 0x0000000127ed2414 _ZN7QWidget6createEybb + 324
13 QtWidgets 0x0000000127ee581d _ZN14QWidgetPrivate10setVisibleEb + 189
14 QtWidgets 0x00000001280ac57d _ZN7QDialog10setVisibleEb + 269
15 QtWidgets.abi3.so 0x00000001279a8adf _ZN14sipQMessageBox10setVisibleEb + 111
16 QtWidgets 0x00000001280abd80 _ZN7QDialog4execEv + 240
17 QtWidgets.abi3.so 0x0000000127b4aab4 _ZL18meth_QDialog_exec_P7_objectS0_ + 164
18 python3.9 0x0000000100f3d11a cfunction_call + 90
19 python3.9 0x0000000100ff992d _PyEval_EvalFrameDefault + 49901
20 python3.9 0x0000000100ee36d9 _PyFunction_Vectorcall + 5849
21 python3.9 0x0000000100ff6712 _PyEval_EvalFrameDefault + 37074
22 python3.9 0x0000000100ee36d9 _PyFunction_Vectorcall + 5849
23 python3.9 0x0000000100ff6712 _PyEval_EvalFrameDefault + 37074
24 python3.9 0x0000000100ee24ec _PyFunction_Vectorcall + 1260
25 python3.9 0x0000000100ff4c11 _PyEval_EvalFrameDefault + 30161
26 python3.9 0x0000000100ee21a4 _PyFunction_Vectorcall + 420
27 python3.9 0x0000000100ee783f method_vectorcall + 479
28 QtCore.abi3.so 0x0000000124cf8118 _ZNK8PyQtSlot4callEP7_objectS1_ + 40
29 QtCore.abi3.so 0x0000000124cf801d _ZNK8PyQtSlot6invokeEPPvP7_objectS0_b + 381
30 QtCore.abi3.so 0x0000000124cf8c45 _ZN13PyQtSlotProxy7unislotEPPv + 85
31 QtCore.abi3.so 0x0000000124cf8bba _ZN13PyQtSlotProxy11qt_metacallEN11QMetaObject4CallEiPPv + 58
32 QtCore 0x0000000125788f6e _Z10doActivateILb0EEvP7QObjectiPPv + 1118
33 QtCore 0x000000012557ede8 _ZN7QThread7startedENS_14QPrivateSignalE + 56
34 QtCore 0x000000012557f5ff _ZN14QThreadPrivate5startEPv + 303
35 libsystem_pthread.dylib 0x00007ff807ad91d3 _pthread_start + 125
36 libsystem_pthread.dylib 0x00007ff807ad4bd3 thread_start + 15
)
QPainter::begin: A paint device can only be painted by one painter at a time.
QPainter::setCompositionMode: Painter not active
QBackingStore::endPaint() called with active painter; did you forget to destroy it or call QPainter::end() on it?
This was using the following (dramatically shortened) as the z3Samples.smp
file:
2 1 0
-2.11503
0.696938
Maybe this is a simple as adding a QPainter::end()
call (or equivalent in python) somewhere?
Here's how to reproduce:
./examples/test_files/OUU_Remote_Turbine_BFB/BFB_OUU_06_09_2020.foqus
turbine_oregon.cfg
(this is a file that you'll need to get from Josh B. since it uses his AWS instance)z3Samples.smp
from the previous comment above.Boom!
First line in the .smp file is (sample size, number of inputs, number of outputs). I got this information from the PSUADE manual, page 3, read_std command.
We should try to reproduce this and capture the python stacktrace, not just the C++ stack.
@sotorrio1 needs a config file from @boverhof to reproduce this.
Here's how to reproduce:
- Start foqus
- Open Session:
./examples/test_files/OUU_Remote_Turbine_BFB/BFB_OUU_06_09_2020.foqus
In Settings, change "FOQUS Flowsheet Run Method" to Remote
- In Turbine tab, in lower "Turbine Gateway (Remote)" section, click Browse and open
turbine_oregon.cfg
(this is a file that you'll need to get from Josh B. since it uses his AWS instance)- Click Test there to make sure it works
- Back in Flowsheet, click on the one and only "BFB" node. It should turn green.
Now in OUU:
Choose Flowsheet Node: Full flowsheet
Set the first 3 vars to Z1:
BFBadsB.Cr
BFBadsB.Dt
BFBadsB.dx
Scroll down and set one var to Z3:
BFB.fg_flow
Click on lower "UQ Setup" tab and load a file with the contents of
z3Samples.smp
from the previous comment above.Click on "Launch/Progress" tab and hit "Run OUU"
Boom!
@ksbeattie from your instructions how to reproduce, you don't specify what objective function you're using. Default is 'BFB.BFBRGN.GasIn.F' but I believe in this problem it should be 'BFB.Cost_coe_obj'.
I was able to run this example without getting the NSException... I ran two different tests, one using 'BFB.Cost_coe_obj' as the bbjective and the other one using 'BFB.BFBRGN.GasIn.F' as the objective.
@sotorrio1 will try to reproduce @ksbeattie's steps without selecting an objective function. Although, one objective should be selected by default, so it's not clear if this is a promising thing to look into.
OUU will error out if trying to run without selecting an objective. By default first one is selected, but I manually changed it to not use an objective and hit run and it gave an error.
I should take another try and reproducing this.
Unfortunately, I'm still getting this error, regardless of the objective function used.
Description
Backtrace