From eb2036acbe18e12440c4e1d0b1131c00c9799453 Mon Sep 17 00:00:00 2001 From: SET Date: Mon, 23 Dec 2019 16:44:05 +0100 Subject: [PATCH] Override wxApp::OnAssertFailure in L7Test. We do nothing in this override. wxASSERT_MSG would fail in LGridJsonCellRenderer::ProcessJsonValue and in XmlHelper::ValidateXmlValue called by LGridXmlCellRenderer::ProcessXmlValue. This happens with postgresql only, when the corresponding database value is empty. The cell value is set to [Invalid], and next rendering leads to a crash in debug build only. Why does wxASSERT_MSG fail? Why with postgresql and not with sqlite? --- L7/nbproject/private/private.xml | 5 ++++- L7Test/L7Test.cpp | 4 ++++ L7Test/L7Test.h | 2 ++ L7Test/nbproject/private/configurations.xml | 4 ++-- L7Test/nbproject/private/private.xml | 7 +++++-- 5 files changed, 17 insertions(+), 5 deletions(-) diff --git a/L7/nbproject/private/private.xml b/L7/nbproject/private/private.xml index 499a032..8bf9153 100644 --- a/L7/nbproject/private/private.xml +++ b/L7/nbproject/private/private.xml @@ -2,11 +2,14 @@ 2 - 1 + 0 + file:/home/user/Documents/published/L7/L7/special/XmlHelper.cpp + file:/home/user/Documents/published/L7/L7/special/XmlGridPickerCtrl.cpp + file:/home/user/Documents/published/L7/L7/special/LGridXmlCellRenderer.cpp file:/home/user/Documents/published/L7/L7/special/LGridJsonCellRenderer.h file:/home/user/Documents/published/L7/L7/special/LGridJsonCellRenderer.cpp diff --git a/L7Test/L7Test.cpp b/L7Test/L7Test.cpp index 680825c..cb11d6a 100644 --- a/L7Test/L7Test.cpp +++ b/L7Test/L7Test.cpp @@ -41,6 +41,10 @@ int L7Test::OnExit() return wxApp::OnExit(); } +void L7Test::OnAssertFailure(const wxChar* file, int line, const wxChar* func, const wxChar* cond, const wxChar* msg) +{ +} + /////////////////////////////////////////////////////////////////////////////// L7Frame::L7Frame(wxWindow* parent, wxWindowID id, const wxString& title) diff --git a/L7Test/L7Test.h b/L7Test/L7Test.h index 29bb535..cf835e6 100644 --- a/L7Test/L7Test.h +++ b/L7Test/L7Test.h @@ -33,6 +33,8 @@ public: bool OnInit(); int OnExit(); + void OnAssertFailure(const wxChar* file, int line, const wxChar* func, const wxChar* cond, const wxChar* msg) override; + private: diff --git a/L7Test/nbproject/private/configurations.xml b/L7Test/nbproject/private/configurations.xml index 6c28009..178b4e4 100644 --- a/L7Test/nbproject/private/configurations.xml +++ b/L7Test/nbproject/private/configurations.xml @@ -13,6 +13,8 @@ + + @@ -47,8 +49,6 @@ - - diff --git a/L7Test/nbproject/private/private.xml b/L7Test/nbproject/private/private.xml index dbeed61..0bee7a9 100644 --- a/L7Test/nbproject/private/private.xml +++ b/L7Test/nbproject/private/private.xml @@ -5,10 +5,13 @@ 1 - 1 + 0 - + + file:/home/user/Documents/published/L7/L7Test/L7Test.h + file:/home/user/Documents/published/L7/L7Test/L7Test.cpp +