Brad Allred
Brad Allred
I think the LoadScreen has a similar issue
what is `sizeof(int)` on your system?
can you try this patch to see if you can get a better error: ```diff --- a/gemrb/plugins/GUIScript/GUIScript.cpp +++ b/gemrb/plugins/GUIScript/GUIScript.cpp @@ -1080,7 +1080,7 @@ static PyObject* GemRB_View_AddSubview(PyObject* self, PyObject* args) ScriptingId...
then it seems we are entering this code in `GUIScript::GetScriptingRef`: ``` if (!obj || obj == Py_None) { return nullptr; } ``` is that accurate?
I'd put breakpoints on all the `return nullptr;` lines in `GUIScript::GetScriptingRef`. You should have gotten a python runtime error instead of `returned NULL without setting an exception` for the other...
no, we return `nullptr` to let the interpreter know there was an error (which we should have set with `RuntimeError` or `AttributeError`) returning `Py_None` would indicate no error.
this line is failing: `const ViewScriptingRef* ref = dynamic_cast(gs->GetScriptingRef(pySubview));` so if we aren't getting null from GetScriptingRef, then that would mean the `dynamic_cast` is failing. That would certainly be interesting....
are you compiling with `fno-rtti`?
first, just try changing the `dynamic_cast` to `static_cast` and see what happens. Also, if you could run with UndefinedBehaviorSanitizer, that might be useful.
I also see you are producing an `O2` build, try a regular `O0` debug build alongside UBSan (` -fsanitize=undefined `)