An internal error occurred wxwidgets assertion failure please report this problem to us

wxWidgets Discussion Forum Official forum for the wxWidgets Cross-Platform GUI Toolkit [2.9.1] Assertion errors Topic is solved [2.9.1] Assertion errors Post by Rizzen » Mon Jul 12, 2010 3:21 pm Building on Linux. I getting a number of assertion errors, which seems to mainly come from wxString, particular the Format() method. Example of such […]

Содержание

  1. wxWidgets Discussion Forum
  2. [2.9.1] Assertion errors Topic is solved
  3. [2.9.1] Assertion errors
  4. wxWidgets Discussion Forum
  5. an assertion failed!
  6. an assertion failed!
  7. Assertion failure in dataviewctrl #11992
  8. Comments
  9. 2010-04-25 22:55:22: Eric Raijmakers (Eric Raijmakers) created the issue
  10. [wxwidgets] build failure on Linux #14427
  11. Comments
  12. Tried to compile from PowerShell command line:

Official forum for the wxWidgets Cross-Platform GUI Toolkit

[2.9.1] Assertion errors Topic is solved

[2.9.1] Assertion errors

Post by Rizzen » Mon Jul 12, 2010 3:21 pm

Building on Linux.

I getting a number of assertion errors, which seems to mainly come from wxString, particular the Format() method.

Example of such an error (window and console) is:
./include/wx/strvararg.h(440): assert «(argtype & (wxFormatStringSpecifier ::value)) == argtype» failed in wxArgNormalizer(): format specifier doesn’t match argument type

A wxLog error is:
2010-07-12 16:17:31 : Error: Wrong type, required: long but: string

I have run ./configure with these options to get rid of these assertion errors: —disable-debug —disable-debug_flag

In my project cmake CMakeLists.txt file I added an entry «add_definitions(-DwxDEBUG_LEVEL=0)» to set the application wxDEBUG_LEVEL according to Vadim Zeitlin post on Google groups for wxWidgets.

Yet, when I run the application I get all these assertion error windows, wxLog assertion error entries and console output errors. The application runs correctly as intended, even with all these errors.

How does one get rid of these meaningless assertion errors?

Post by DavidHart » Mon Jul 12, 2010 4:25 pm

These checks were recently added, to catch mismatching args in ‘printf’ statements etc. However, as with most new things, there have been a few bugs at first: see e.g. this report. If you haven’t updated your wx2.9.1 recently, I suggest you do so.

If the asserts remain, then check to see if they come from errors in your code. If your code is pristine, then it’s your turn to submit a bug report .

Post by Rizzen » Mon Jul 19, 2010 2:19 pm

Well I downloaded the 2.9.1 release that was made available today.

configured with —disable-debug and —disable-debug_flag additional options.

built the wx 2.9.1 libs without any errors

built the application, also with no errors

yet when I run the applications I get hundreds of Assertion warning windows related to wxString::Format(), though correct result for Format() is obtained.

How does one get rid of these extremely annoying useless Assertion warnings windows, console messages, and log messages?

Post by DavidHart » Mon Jul 19, 2010 4:08 pm

Well, you first correct the mistakes in your application . Rebuild —enable-debug, then run the app in gdb. When you get an assert, break and do ‘bt’.

You’ll probably find that you’re using %i to ‘print’ a long, or %u to print a size_t, or similar.

Once you’ve cured all your own bugs, any remaining asserts may be coming from wx code, which you should debug and report. If find instances where you’re sure that the assert is a false alarm, you should report those too.

Post by Rizzen » Tue Jul 20, 2010 5:16 pm

No need to build library with —enabled-debug as —disable-debug has no effect on disabling the debug assertion warning windows from appearing.

The assertion warnings gives all the debug information, showing exactly where the assertion warning is taking place. They occurring from within the wxString:Format() method.

According to the documentation on printf() functions and methods, the following (and similar calls) are correct:
wxString::Format( _(«sock: %d s: %d»), (unsigned long) sock, (unsigned long) s )
where sock and s are wxSocketBase pointers.

Assertion warning states that it is expecting wxStrings instead of unsigned long, yet Format produces the correct result as expected.

The detail of the asertion warnings clearly indicates that the library is being built in debug mode, even though —disabled-debug is used for ./configure

Источник

Official forum for the wxWidgets Cross-Platform GUI Toolkit

an assertion failed!

an assertion failed!

Post by scatwtt » Tue Aug 02, 2016 8:22 pm

Hola!! Hice un pequeño programa c++/wxwidgets y al ejecutar me encuentro con el error:

../src/common/textcmn.cpp(1206): assert «»HasFlag(0x0400)»» failed in OnDynamicBind(): Must have wxTE_PROCESS_ENTER for wxEVT_TEXT_ENTER to work

Backtrace:
ASSERT INFO:
../src/common/textcmn.cpp(1206): assert «»HasFlag(0x0400)»» failed in OnDynamicBind(): Must have wxTE_PROCESS_ENTER for wxEVT_TEXT_ENTER to work

BACKTRACE:
[1] wxTextCtrlBase::OnDynamicBind(wxDynamicEventTableEntry&)
[2] wxEvtHandler::DoBind(int, int, int, wxEventFunctor*, wxObject*)
[3] wxComboCtrlBase::CreateTextCtrl(int)
[4] wxGenericComboCtrl::Create(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, long, wxValidator const&, wxString const&)
[5] wxDatePickerCtrlGeneric::Create(wxWindow*, int, wxDateTime const&, wxPoint const&, wxSize const&, long, wxValidator const&, wxString const&)
[6] wxDatePickerCtrlGeneric::wxDatePickerCtrlGeneric(wxWindow*, int, wxDateTime const&, wxPoint const&, wxSize const&, long, wxValidator const&, wxString const&) /usr/local/include/wx-3.1/wx/generic/datectrl.h:39
[7] wxDatePickerCtrl::wxDatePickerCtrl(wxWindow*, int, wxDateTime const&, wxPoint const&, wxSize const&, long, wxValidator const&, wxString const&) /usr/local/include/wx-3.1/wx/datectrl.h:101
[8] venta::venta(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, long) /home/sofia/Dropbox/Archivos_Silvia_Esquivel/SOCA1_0/Ventanas.cpp:123
[9] proyectoSOCAventa::proyectoSOCAventa(wxWindow*) /home/sofia/Dropbox/Archivos_Silvia_Esquivel/SOCA1_0/proyectoSOCAventa.cpp:5
[10] proyectoSOCAprincipal::clickVenta(wxCommandEvent&) /home/sofia/Dropbox/Archivos_Silvia_Esquivel/SOCA1_0/proyectoSOCAprincipal.cpp:17
[11] wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const:17
[12] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&):17
[13] wxEvtHandler::SearchDynamicEventTable(wxEvent&):17
[14] wxEvtHandler::TryHereOnly(wxEvent&):17
[15] wxEvtHandler::ProcessEventLocally(wxEvent&):17
[16] wxEvtHandler::ProcessEvent(wxEvent&):17
[17] wxEvtHandler::SafelyProcessEvent(wxEvent&):17
[18] wxgtk_button_clicked_callback button.cpp:17
[19] g_cclosure_marshal_VOID__VOIDv
[20] g_signal_emit_valist
[21] g_signal_emit
[22] gtk_button_clicked
[23] g_cclosure_marshal_VOID__VOIDv
[24] g_signal_emit_valist
[25] g_signal_emit
[26] ffi_call_SYSV
[27] ffi_call
[28] g_cclosure_marshal_generic_va
[29] g_signal_emit_valist
[30] g_signal_emit
[31] g_cclosure_marshal_VOID__BOXEDv
[32] g_signal_emit_valist
[33] g_signal_emit
[34] gtk_event_controller_handle_event
[35] g_closure_invoke
[36] g_signal_emit_valist
[37] g_signal_emit
[38] gtk_main_do_event
[39] g_main_context_dispatch
[40] g_main_loop_run
[41] gtk_main
[42] wxGUIEventLoop::DoRun()
[43] wxEventLoopBase::Run()
[44] wxAppConsoleBase::MainLoop()
[45] wxEntry(int&, wchar_t**)
[46] main /home/sofia/Dropbox/Archivos_Silvia_Esquivel/SOCA1_0/Application.cpp:5
[47] __libc_start_main
[48] _start

../src/common/sizer.cpp(2091): assert «!(flags & (wxALIGN_RIGHT | wxALIGN_CENTRE_HORIZONTAL))» failed in DoInsert(): Horizontal alignment flags are ignored with wxEXPAND

ASSERT INFO:
../src/common/sizer.cpp(2091): assert «!(flags & (wxALIGN_RIGHT | wxALIGN_CENTRE_HORIZONTAL))» failed in DoInsert(): Horizontal alignment flags are ignored with wxEXPAND

BACKTRACE:
[1] wxBoxSizer::DoInsert(unsigned int, wxSizerItem*)
[2] wxSizer::Add(wxSizerItem*) /usr/local/include/wx-3.1/wx/sizer.h:1155
[3] wxSizer::Add(wxSizer*, int, int, int, wxObject*) /usr/local/include/wx-3.1/wx/sizer.h:1167
[4] venta::venta(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, long) /home/sofia/Dropbox/Archivos_Silvia_Esquivel/SOCA1_0/Ventanas.cpp:184
[5] proyectoSOCAventa::proyectoSOCAventa(wxWindow*) /home/sofia/Dropbox/Archivos_Silvia_Esquivel/SOCA1_0/proyectoSOCAventa.cpp:5
[6] proyectoSOCAprincipal::clickVenta(wxCommandEvent&) /home/sofia/Dropbox/Archivos_Silvia_Esquivel/SOCA1_0/proyectoSOCAprincipal.cpp:17
[7] wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const:17
[8] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&):17
[9] wxEvtHandler::SearchDynamicEventTable(wxEvent&):17
[10] wxEvtHandler::TryHereOnly(wxEvent&):17
[11] wxEvtHandler::ProcessEventLocally(wxEvent&):17
[12] wxEvtHandler::ProcessEvent(wxEvent&):17
[13] wxEvtHandler::SafelyProcessEvent(wxEvent&):17
[14] wxgtk_button_clicked_callback button.cpp:17
[15] g_cclosure_marshal_VOID__VOIDv
[16] g_signal_emit_valist
[17] g_signal_emit
[18] gtk_button_clicked
[19] g_cclosure_marshal_VOID__VOIDv
[20] g_signal_emit_valist
[21] g_signal_emit
[22] ffi_call_SYSV
[23] ffi_call
[24] g_cclosure_marshal_generic_va
[25] g_signal_emit_valist
[26] g_signal_emit
[27] g_cclosure_marshal_VOID__BOXEDv
[28] g_signal_emit_valist
[29] g_signal_emit
[30] gtk_event_controller_handle_event
[31] g_closure_invoke
[32] g_signal_emit_valist
[33] g_signal_emit
[34] gtk_main_do_event
[35] g_main_context_dispatch
[36] g_main_loop_run
[37] gtk_main
[38] wxGUIEventLoop::DoRun()
[39] wxEventLoopBase::Run()
[40] wxAppConsoleBase::MainLoop()
[41] wxEntry(int&, wchar_t**)
[42] main /home/sofia/Dropbox/Archivos_Silvia_Esquivel/SOCA1_0/Application.cpp:5
[43] __libc_start_main
[44] _start

Puede alguien darme una mano? No veo que es lo que está equivocado

Источник

Assertion failure in dataviewctrl #11992

Issue migrated from trac ticket # 11992

component: GUI-generic | priority: normal | resolution: duplicate

2010-04-25 22:55:22: Eric Raijmakers (Eric Raijmakers) created the issue

In the dataview sample, do an edit of a node. The textbox that is created for the edit, causes an assert to trigger, when the textbox is destructed.
(I built under msw, vc9).

what i did today:

  • checkout today’s trunk (because in my old version 2.9.0
    wxEVT_COMMAND_DATAVIEW_ITEM_START_EDITING didn’t work)
  • Open dataview sample
  • Select second tab (mylistmodel)
  • Edit a node (real row 6)
  • End the edit, either by pressing enter, or by giving the
    focus to a completely different application/.

somehow in the dataview example, the debug breaking mechanism seems to be interrupted, I don’t always get the stack trace I want.

In my own app, I do get that (have no clue as to why).

Assert that is triggered is the following in wincmn.cpp:
// Any additional event handlers should be popped before the window is
// deleted as otherwise the last handler will be left with a dangling
// pointer to this window result in a difficult to diagnose crash later on.
wxASSERT_MSG( GetEventHandler() == this,
wxT(«any pushed event handlers must have been removed») );

The text was updated successfully, but these errors were encountered:

Источник

Host Environment

  • OS: Linux (Ubuntu-20.04 WSL2)
  • Compiler: gcc (Ubuntu 9.3.0-10ubuntu2) 9.3.0

To Reproduce
Steps to reproduce the behavior:
./vcpkg install wxwidgets:x64-linux

Failure logs
-Building package wxwidgets[core]:x64-linux.
Could not locate cached archive: /home/hw/.cache/vcpkg/archives/bc/bcc3be52c8a02a8a83e2b7a522c5cd546f591f83.zip
— Using cached /mnt/c/Dev/vcpkg/downloads/wxWidgets-wxWidgets-v3.1.4.tar.gz
— Cleaning sources at /mnt/c/Dev/vcpkg/buildtrees/wxwidgets/src/v3.1.4-b747a62900.clean. Use —editable to skip cleaning for the packages you specify.
— Extracting source /mnt/c/Dev/vcpkg/downloads/wxWidgets-wxWidgets-v3.1.4.tar.gz
— Applying patch disable-platform-lib-dir.patch
— Applying patch fix-stl-build-vs2019-16.6.patch
— Using source at /mnt/c/Dev/vcpkg/buildtrees/wxwidgets/src/v3.1.4-b747a62900.clean
— Configuring x64-linux-dbg
— Configuring x64-linux-rel
— Building x64-linux-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:141 (message):
Command failed: /mnt/c/Dev/vcpkg/downloads/tools/cmake-3.17.2-linux/cmake-3.17.2-Linux-x86_64/bin/cmake —build . —config Debug —target install — -v -j9
Working Directory: /mnt/c/Dev/vcpkg/buildtrees/wxwidgets/x64-linux-dbg
See logs for more information:
/mnt/c/Dev/vcpkg/buildtrees/wxwidgets/install-x64-linux-dbg-out.log

Call Stack (most recent call first):
scripts/cmake/vcpkg_build_cmake.cmake:92 (vcpkg_execute_build_process)
scripts/cmake/vcpkg_install_cmake.cmake:24 (vcpkg_build_cmake)
ports/wxwidgets/portfile.cmake:41 (vcpkg_install_cmake)
scripts/ports.cmake:79 (include)

Error: Building package wxwidgets:x64-linux failed with: BUILD_FAILED
Please ensure you’re using the latest portfiles with ./vcpkg update , then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
Package: wxwidgets:x64-linux
Vcpkg version: 2020.06.15-unknownhash

  • Last part of log file:
    [61/791] cd /mnt/c/Dev/vcpkg/buildtrees/wxwidgets/src/v3.1.4-b747a62900.clean/build/cmake/lib/ribbon && /mnt/c/Dev/vcpkg
    /downloads/tools/cmake-3.17.2-linux/cmake-3.17.2-Linux-x86_64/bin/cmake -DCOTIRE_BUILD_TYPE:STRING=Debug -P /mnt/c/Dev/v
    cpkg/buildtrees/wxwidgets/src/v3.1.4-b747a62900.clean/build/cmake/modules/cotire.cmake precompile /mnt/c/Dev/vcpkg/build
    trees/wxwidgets/x64-linux-dbg/libs/ribbon/wxribbon_CXX_cotire.cmake /mnt/c/Dev/vcpkg/buildtrees/wxwidgets/x64-linux-dbg/
    libs/ribbon/cotire/wxribbon_CXX_prefix.hxx /mnt/c/Dev/vcpkg/buildtrees/wxwidgets/x64-linux-dbg/libs/ribbon/cotire/wxribb
    on_CXX_prefix.hxx.gch /mnt/c/Dev/vcpkg/buildtrees/wxwidgets/src/v3.1.4-b747a62900.clean/src/ribbon/art_internal.cpp
    [62/791] cd /mnt/c/Dev/vcpkg/buildtrees/wxwidgets/src/v3.1.4-b747a62900.clean/build/cmake/lib/html && /mnt/c/Dev/vcpkg/d
    ownloads/tools/cmake-3.17.2-linux/cmake-3.17.2-Linux-x86_64/bin/cmake -DCOTIRE_BUILD_TYPE:STRING=Debug -P /mnt/c/Dev/vcp
    kg/buildtrees/wxwidgets/src/v3.1.4-b747a62900.clean/build/cmake/modules/cotire.cmake precompile /mnt/c/Dev/vcpkg/buildtr
    ees/wxwidgets/x64-linux-dbg/libs/html/wxhtml_CXX_cotire.cmake /mnt/c/Dev/vcpkg/buildtrees/wxwidgets/x64-linux-dbg/libs/h
    tml/cotire/wxhtml_CXX_prefix.hxx /mnt/c/Dev/vcpkg/buildtrees/wxwidgets/x64-linux-dbg/libs/html/cotire/wxhtml_CXX_prefix.
    hxx.gch /mnt/c/Dev/vcpkg/buildtrees/wxwidgets/src/v3.1.4-b747a62900.clean/src/html/helpctrl.cpp
    [63/791] cd /mnt/c/Dev/vcpkg/buildtrees/wxwidgets/src/v3.1.4-b747a62900.clean/build/cmake/lib/richtext && /mnt/c/Dev/vcp
    kg/downloads/tools/cmake-3.17.2-linux/cmake-3.17.2-Linux-x86_64/bin/cmake -DCOTIRE_BUILD_TYPE:STRING=Debug -P /mnt/c/Dev
    /vcpkg/buildtrees/wxwidgets/src/v3.1.4-b747a62900.clean/build/cmake/modules/cotire.cmake precompile /mnt/c/Dev/vcpkg/bui
    ldtrees/wxwidgets/x64-linux-dbg/libs/richtext/wxrichtext_CXX_cotire.cmake /mnt/c/Dev/vcpkg/buildtrees/wxwidgets/x64-linu
    x-dbg/libs/richtext/cotire/wxrichtext_CXX_prefix.hxx /mnt/c/Dev/vcpkg/buildtrees/wxwidgets/x64-linux-dbg/libs/richtext/c
    otire/wxrichtext_CXX_prefix.hxx.gch /mnt/c/Dev/vcpkg/buildtrees/wxwidgets/src/v3.1.4-b747a62900.clean/src/richtext/richt
    extbuffer.cpp
    ninja: build stopped: subcommand failed.

Additional context

Tried to compile from PowerShell command line:

.vcpkg.exe install wxwidgets:x64-linux —debug
but get:
[DEBUG] Feature flag ‘binarycaching’ unset
[DEBUG] Feature flag ‘manifests’ unset
[DEBUG] Feature flag ‘compilertracking’ unset
[DEBUG] Feature flag ‘registries’ unset
[DEBUG] Using vcpkg-root: C:Devvcpkg
[DEBUG] Using installed-root: C:Devvcpkginstalled
[DEBUG] Using buildtrees-root: C:Devvcpkgbuildtrees
[DEBUG] Using downloads-root: C:Devvcpkgdownloads
[DEBUG] Using packages-root: C:Devvcpkgpackages
[DEBUG] Using scripts-root: C:Devvcpkgscripts
Your feedback is important to improve Vcpkg! Please take 3 minutes to complete our survey by running: vcpkg contact —survey
[DEBUG] Default binary cache path is: C:UsershwAppDataLocalvcpkgarchives
Computing installation plan.
[DEBUG] CreateProcessW(«C:Devvcpkgdownloadstoolscmake-3.17.2-windowscmake-3.17.2-win32-x86bincmake.exe» —version)
[DEBUG] cmd_execute_and_stream_data() returned 0 after 42695 us
[DEBUG] CreateProcessW(«C:Devvcpkgdownloadstoolscmake-3.17.2-windowscmake-3.17.2-win32-x86bincmake.exe» -DVCPKG_ROOT_DIR=C:/Dev/vcpkg -DPACKAGES_DIR=C:/Dev/vcpkg/packages -DBUILDTREES_DIR=C:/Dev/vcpkg/buildtrees -D_VCPKG_INSTALLED_DIR=C:/Dev/vcpkg/installed -DDOWNLOADS=C:/Dev/vcpkg/downloads -DVCPKG_MANIFEST_INSTALL=OFF -P «C:Devvcpkgbuildtrees.vcpkg_tags.cmake»)
[DEBUG] cmd_execute_and_stream_data() returned 0 after 30466 us
The following packages will be built and installed:
wxwidgets[core]:x64-linux
Detecting compiler hash for triplet x64-linux.
[DEBUG] Found path: C:Program FilesGitcmd/git.exe
[DEBUG] CreateProcessW(«C:Devvcpkgdownloadstoolsgit-2.26.2-1-windowsmingw32bingit.exe» —version)
[DEBUG] cmd_execute_and_stream_data() returned 0 after 24207 us
[DEBUG] CreateProcessW(«C:Devvcpkgdownloadstoolscmake-3.17.2-windowscmake-3.17.2-win32-x86bincmake.exe» -DCURRENT_PORT_DIR=C:/Dev/vcpkg/scripts/detect_compiler -DCURRENT_BUILDTREES_DIR=C:/Dev/vcpkg/buildtrees/detect_compiler -DCURRENT_PACKAGES_DIR=C:/Dev/vcpkg/packages/detect_compiler_x64-linux -DCMD=BUILD -DTARGET_TRIPLET=x64-linux «-DTARGET_TRIPLET_FILE=C:Devvcpkgtripletsx64-linux.cmake» -DVCPKG_PLATFORM_TOOLSET=external -DDOWNLOADS=C:/Dev/vcpkg/downloads -DVCPKG_CONCURRENCY=9 -DGIT=C:/Dev/vcpkg/downloads/tools/git-2.26.2-1-windows/mingw32/bin/git.exe -DVCPKG_ROOT_DIR=C:/Dev/vcpkg -DPACKAGES_DIR=C:/Dev/vcpkg/packages -DBUILDTREES_DIR=C:/Dev/vcpkg/buildtrees -D_VCPKG_INSTALLED_DIR=C:/Dev/vcpkg/installed -DDOWNLOADS=C:/Dev/vcpkg/downloads -DVCPKG_MANIFEST_INSTALL=OFF -P «C:Devvcpkgscriptsports.cmake»)
[DEBUG] — Configuring x64-linux
[DEBUG] CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:85 (message):
[DEBUG] Command failed: ninja -v
[DEBUG] Working Directory: C:/Dev/vcpkg/buildtrees/detect_compiler/x64-linux-rel/vcpkg-parallel-configure
[DEBUG] Error code: 1
[DEBUG] See logs for more information:
[DEBUG] C:Devvcpkgbuildtreesdetect_compilerconfig-x64-linux-out.log
[DEBUG]
[DEBUG] Call Stack (most recent call first):
[DEBUG] scripts/cmake/vcpkg_configure_cmake.cmake:312 (vcpkg_execute_required_process)
[DEBUG] scripts/detect_compiler/portfile.cmake:18 (vcpkg_configure_cmake)
[DEBUG] scripts/ports.cmake:79 (include)
[DEBUG]
[DEBUG]
[DEBUG] cmd_execute_and_stream_data() returned 1 after 1953664 us
[DEBUG]
[DEBUG] Compiler information tracking can be disabled by passing —feature-flags=-compilertracking
Error occurred while detecting compiler information. Pass —debug for more information.
[DEBUG] C:Devvcpkgtoolsrcsrcvcpkgbuild.cpp(584)
[DEBUG] Exiting after 2153244 us (2140800 us)

The text was updated successfully, but these errors were encountered:

Источник

wxWidgets Discussion Forum

Official forum for the wxWidgets Cross-Platform GUI Toolkit

[2.9.1] Assertion errors Topic is solved

[2.9.1] Assertion errors

Post by Rizzen » Mon Jul 12, 2010 3:21 pm

Building on Linux.

I getting a number of assertion errors, which seems to mainly come from wxString, particular the Format() method.

Example of such an error (window and console) is:
./include/wx/strvararg.h(440): assert «(argtype & (wxFormatStringSpecifier ::value)) == argtype» failed in wxArgNormalizer(): format specifier doesn’t match argument type

A wxLog error is:
2010-07-12 16:17:31 : Error: Wrong type, required: long but: string

I have run ./configure with these options to get rid of these assertion errors: —disable-debug —disable-debug_flag

In my project cmake CMakeLists.txt file I added an entry «add_definitions(-DwxDEBUG_LEVEL=0)» to set the application wxDEBUG_LEVEL according to Vadim Zeitlin post on Google groups for wxWidgets.

Yet, when I run the application I get all these assertion error windows, wxLog assertion error entries and console output errors. The application runs correctly as intended, even with all these errors.

How does one get rid of these meaningless assertion errors?

Post by DavidHart » Mon Jul 12, 2010 4:25 pm

These checks were recently added, to catch mismatching args in ‘printf’ statements etc. However, as with most new things, there have been a few bugs at first: see e.g. this report. If you haven’t updated your wx2.9.1 recently, I suggest you do so.

If the asserts remain, then check to see if they come from errors in your code. If your code is pristine, then it’s your turn to submit a bug report .

Post by Rizzen » Mon Jul 19, 2010 2:19 pm

Well I downloaded the 2.9.1 release that was made available today.

configured with —disable-debug and —disable-debug_flag additional options.

built the wx 2.9.1 libs without any errors

built the application, also with no errors

yet when I run the applications I get hundreds of Assertion warning windows related to wxString::Format(), though correct result for Format() is obtained.

How does one get rid of these extremely annoying useless Assertion warnings windows, console messages, and log messages?

Post by DavidHart » Mon Jul 19, 2010 4:08 pm

Well, you first correct the mistakes in your application . Rebuild —enable-debug, then run the app in gdb. When you get an assert, break and do ‘bt’.

You’ll probably find that you’re using %i to ‘print’ a long, or %u to print a size_t, or similar.

Once you’ve cured all your own bugs, any remaining asserts may be coming from wx code, which you should debug and report. If find instances where you’re sure that the assert is a false alarm, you should report those too.

Post by Rizzen » Tue Jul 20, 2010 5:16 pm

No need to build library with —enabled-debug as —disable-debug has no effect on disabling the debug assertion warning windows from appearing.

The assertion warnings gives all the debug information, showing exactly where the assertion warning is taking place. They occurring from within the wxString:Format() method.

According to the documentation on printf() functions and methods, the following (and similar calls) are correct:
wxString::Format( _(«sock: %d s: %d»), (unsigned long) sock, (unsigned long) s )
where sock and s are wxSocketBase pointers.

Assertion warning states that it is expecting wxStrings instead of unsigned long, yet Format produces the correct result as expected.

The detail of the asertion warnings clearly indicates that the library is being built in debug mode, even though —disabled-debug is used for ./configure

Источник

wxWidgets Discussion Forum

Official forum for the wxWidgets Cross-Platform GUI Toolkit

an assertion failed!

an assertion failed!

Post by scatwtt » Tue Aug 02, 2016 8:22 pm

Hola!! Hice un pequeño programa c++/wxwidgets y al ejecutar me encuentro con el error:

../src/common/textcmn.cpp(1206): assert «»HasFlag(0x0400)»» failed in OnDynamicBind(): Must have wxTE_PROCESS_ENTER for wxEVT_TEXT_ENTER to work

Backtrace:
ASSERT INFO:
../src/common/textcmn.cpp(1206): assert «»HasFlag(0x0400)»» failed in OnDynamicBind(): Must have wxTE_PROCESS_ENTER for wxEVT_TEXT_ENTER to work

BACKTRACE:
[1] wxTextCtrlBase::OnDynamicBind(wxDynamicEventTableEntry&)
[2] wxEvtHandler::DoBind(int, int, int, wxEventFunctor*, wxObject*)
[3] wxComboCtrlBase::CreateTextCtrl(int)
[4] wxGenericComboCtrl::Create(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, long, wxValidator const&, wxString const&)
[5] wxDatePickerCtrlGeneric::Create(wxWindow*, int, wxDateTime const&, wxPoint const&, wxSize const&, long, wxValidator const&, wxString const&)
[6] wxDatePickerCtrlGeneric::wxDatePickerCtrlGeneric(wxWindow*, int, wxDateTime const&, wxPoint const&, wxSize const&, long, wxValidator const&, wxString const&) /usr/local/include/wx-3.1/wx/generic/datectrl.h:39
[7] wxDatePickerCtrl::wxDatePickerCtrl(wxWindow*, int, wxDateTime const&, wxPoint const&, wxSize const&, long, wxValidator const&, wxString const&) /usr/local/include/wx-3.1/wx/datectrl.h:101
[8] venta::venta(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, long) /home/sofia/Dropbox/Archivos_Silvia_Esquivel/SOCA1_0/Ventanas.cpp:123
[9] proyectoSOCAventa::proyectoSOCAventa(wxWindow*) /home/sofia/Dropbox/Archivos_Silvia_Esquivel/SOCA1_0/proyectoSOCAventa.cpp:5
[10] proyectoSOCAprincipal::clickVenta(wxCommandEvent&) /home/sofia/Dropbox/Archivos_Silvia_Esquivel/SOCA1_0/proyectoSOCAprincipal.cpp:17
[11] wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const:17
[12] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&):17
[13] wxEvtHandler::SearchDynamicEventTable(wxEvent&):17
[14] wxEvtHandler::TryHereOnly(wxEvent&):17
[15] wxEvtHandler::ProcessEventLocally(wxEvent&):17
[16] wxEvtHandler::ProcessEvent(wxEvent&):17
[17] wxEvtHandler::SafelyProcessEvent(wxEvent&):17
[18] wxgtk_button_clicked_callback button.cpp:17
[19] g_cclosure_marshal_VOID__VOIDv
[20] g_signal_emit_valist
[21] g_signal_emit
[22] gtk_button_clicked
[23] g_cclosure_marshal_VOID__VOIDv
[24] g_signal_emit_valist
[25] g_signal_emit
[26] ffi_call_SYSV
[27] ffi_call
[28] g_cclosure_marshal_generic_va
[29] g_signal_emit_valist
[30] g_signal_emit
[31] g_cclosure_marshal_VOID__BOXEDv
[32] g_signal_emit_valist
[33] g_signal_emit
[34] gtk_event_controller_handle_event
[35] g_closure_invoke
[36] g_signal_emit_valist
[37] g_signal_emit
[38] gtk_main_do_event
[39] g_main_context_dispatch
[40] g_main_loop_run
[41] gtk_main
[42] wxGUIEventLoop::DoRun()
[43] wxEventLoopBase::Run()
[44] wxAppConsoleBase::MainLoop()
[45] wxEntry(int&, wchar_t**)
[46] main /home/sofia/Dropbox/Archivos_Silvia_Esquivel/SOCA1_0/Application.cpp:5
[47] __libc_start_main
[48] _start

../src/common/sizer.cpp(2091): assert «!(flags & (wxALIGN_RIGHT | wxALIGN_CENTRE_HORIZONTAL))» failed in DoInsert(): Horizontal alignment flags are ignored with wxEXPAND

ASSERT INFO:
../src/common/sizer.cpp(2091): assert «!(flags & (wxALIGN_RIGHT | wxALIGN_CENTRE_HORIZONTAL))» failed in DoInsert(): Horizontal alignment flags are ignored with wxEXPAND

BACKTRACE:
[1] wxBoxSizer::DoInsert(unsigned int, wxSizerItem*)
[2] wxSizer::Add(wxSizerItem*) /usr/local/include/wx-3.1/wx/sizer.h:1155
[3] wxSizer::Add(wxSizer*, int, int, int, wxObject*) /usr/local/include/wx-3.1/wx/sizer.h:1167
[4] venta::venta(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, long) /home/sofia/Dropbox/Archivos_Silvia_Esquivel/SOCA1_0/Ventanas.cpp:184
[5] proyectoSOCAventa::proyectoSOCAventa(wxWindow*) /home/sofia/Dropbox/Archivos_Silvia_Esquivel/SOCA1_0/proyectoSOCAventa.cpp:5
[6] proyectoSOCAprincipal::clickVenta(wxCommandEvent&) /home/sofia/Dropbox/Archivos_Silvia_Esquivel/SOCA1_0/proyectoSOCAprincipal.cpp:17
[7] wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const:17
[8] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&):17
[9] wxEvtHandler::SearchDynamicEventTable(wxEvent&):17
[10] wxEvtHandler::TryHereOnly(wxEvent&):17
[11] wxEvtHandler::ProcessEventLocally(wxEvent&):17
[12] wxEvtHandler::ProcessEvent(wxEvent&):17
[13] wxEvtHandler::SafelyProcessEvent(wxEvent&):17
[14] wxgtk_button_clicked_callback button.cpp:17
[15] g_cclosure_marshal_VOID__VOIDv
[16] g_signal_emit_valist
[17] g_signal_emit
[18] gtk_button_clicked
[19] g_cclosure_marshal_VOID__VOIDv
[20] g_signal_emit_valist
[21] g_signal_emit
[22] ffi_call_SYSV
[23] ffi_call
[24] g_cclosure_marshal_generic_va
[25] g_signal_emit_valist
[26] g_signal_emit
[27] g_cclosure_marshal_VOID__BOXEDv
[28] g_signal_emit_valist
[29] g_signal_emit
[30] gtk_event_controller_handle_event
[31] g_closure_invoke
[32] g_signal_emit_valist
[33] g_signal_emit
[34] gtk_main_do_event
[35] g_main_context_dispatch
[36] g_main_loop_run
[37] gtk_main
[38] wxGUIEventLoop::DoRun()
[39] wxEventLoopBase::Run()
[40] wxAppConsoleBase::MainLoop()
[41] wxEntry(int&, wchar_t**)
[42] main /home/sofia/Dropbox/Archivos_Silvia_Esquivel/SOCA1_0/Application.cpp:5
[43] __libc_start_main
[44] _start

Puede alguien darme una mano? No veo que es lo que está equivocado

Источник

[wxwidgets] build failure on Linux #14427

Comments

HWiman commented Nov 6, 2020

Host Environment

  • OS: Linux (Ubuntu-20.04 WSL2)
  • Compiler: gcc (Ubuntu 9.3.0-10ubuntu2) 9.3.0

To Reproduce
Steps to reproduce the behavior:
./vcpkg install wxwidgets:x64-linux

Failure logs
-Building package wxwidgets[core]:x64-linux.
Could not locate cached archive: /home/hw/.cache/vcpkg/archives/bc/bcc3be52c8a02a8a83e2b7a522c5cd546f591f83.zip
— Using cached /mnt/c/Dev/vcpkg/downloads/wxWidgets-wxWidgets-v3.1.4.tar.gz
— Cleaning sources at /mnt/c/Dev/vcpkg/buildtrees/wxwidgets/src/v3.1.4-b747a62900.clean. Use —editable to skip cleaning for the packages you specify.
— Extracting source /mnt/c/Dev/vcpkg/downloads/wxWidgets-wxWidgets-v3.1.4.tar.gz
— Applying patch disable-platform-lib-dir.patch
— Applying patch fix-stl-build-vs2019-16.6.patch
— Using source at /mnt/c/Dev/vcpkg/buildtrees/wxwidgets/src/v3.1.4-b747a62900.clean
— Configuring x64-linux-dbg
— Configuring x64-linux-rel
— Building x64-linux-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:141 (message):
Command failed: /mnt/c/Dev/vcpkg/downloads/tools/cmake-3.17.2-linux/cmake-3.17.2-Linux-x86_64/bin/cmake —build . —config Debug —target install — -v -j9
Working Directory: /mnt/c/Dev/vcpkg/buildtrees/wxwidgets/x64-linux-dbg
See logs for more information:
/mnt/c/Dev/vcpkg/buildtrees/wxwidgets/install-x64-linux-dbg-out.log

Call Stack (most recent call first):
scripts/cmake/vcpkg_build_cmake.cmake:92 (vcpkg_execute_build_process)
scripts/cmake/vcpkg_install_cmake.cmake:24 (vcpkg_build_cmake)
ports/wxwidgets/portfile.cmake:41 (vcpkg_install_cmake)
scripts/ports.cmake:79 (include)

Error: Building package wxwidgets:x64-linux failed with: BUILD_FAILED
Please ensure you’re using the latest portfiles with ./vcpkg update , then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
Package: wxwidgets:x64-linux
Vcpkg version: 2020.06.15-unknownhash

  • Last part of log file:
    [61/791] cd /mnt/c/Dev/vcpkg/buildtrees/wxwidgets/src/v3.1.4-b747a62900.clean/build/cmake/lib/ribbon && /mnt/c/Dev/vcpkg
    /downloads/tools/cmake-3.17.2-linux/cmake-3.17.2-Linux-x86_64/bin/cmake -DCOTIRE_BUILD_TYPE:STRING=Debug -P /mnt/c/Dev/v
    cpkg/buildtrees/wxwidgets/src/v3.1.4-b747a62900.clean/build/cmake/modules/cotire.cmake precompile /mnt/c/Dev/vcpkg/build
    trees/wxwidgets/x64-linux-dbg/libs/ribbon/wxribbon_CXX_cotire.cmake /mnt/c/Dev/vcpkg/buildtrees/wxwidgets/x64-linux-dbg/
    libs/ribbon/cotire/wxribbon_CXX_prefix.hxx /mnt/c/Dev/vcpkg/buildtrees/wxwidgets/x64-linux-dbg/libs/ribbon/cotire/wxribb
    on_CXX_prefix.hxx.gch /mnt/c/Dev/vcpkg/buildtrees/wxwidgets/src/v3.1.4-b747a62900.clean/src/ribbon/art_internal.cpp
    [62/791] cd /mnt/c/Dev/vcpkg/buildtrees/wxwidgets/src/v3.1.4-b747a62900.clean/build/cmake/lib/html && /mnt/c/Dev/vcpkg/d
    ownloads/tools/cmake-3.17.2-linux/cmake-3.17.2-Linux-x86_64/bin/cmake -DCOTIRE_BUILD_TYPE:STRING=Debug -P /mnt/c/Dev/vcp
    kg/buildtrees/wxwidgets/src/v3.1.4-b747a62900.clean/build/cmake/modules/cotire.cmake precompile /mnt/c/Dev/vcpkg/buildtr
    ees/wxwidgets/x64-linux-dbg/libs/html/wxhtml_CXX_cotire.cmake /mnt/c/Dev/vcpkg/buildtrees/wxwidgets/x64-linux-dbg/libs/h
    tml/cotire/wxhtml_CXX_prefix.hxx /mnt/c/Dev/vcpkg/buildtrees/wxwidgets/x64-linux-dbg/libs/html/cotire/wxhtml_CXX_prefix.
    hxx.gch /mnt/c/Dev/vcpkg/buildtrees/wxwidgets/src/v3.1.4-b747a62900.clean/src/html/helpctrl.cpp
    [63/791] cd /mnt/c/Dev/vcpkg/buildtrees/wxwidgets/src/v3.1.4-b747a62900.clean/build/cmake/lib/richtext && /mnt/c/Dev/vcp
    kg/downloads/tools/cmake-3.17.2-linux/cmake-3.17.2-Linux-x86_64/bin/cmake -DCOTIRE_BUILD_TYPE:STRING=Debug -P /mnt/c/Dev
    /vcpkg/buildtrees/wxwidgets/src/v3.1.4-b747a62900.clean/build/cmake/modules/cotire.cmake precompile /mnt/c/Dev/vcpkg/bui
    ldtrees/wxwidgets/x64-linux-dbg/libs/richtext/wxrichtext_CXX_cotire.cmake /mnt/c/Dev/vcpkg/buildtrees/wxwidgets/x64-linu
    x-dbg/libs/richtext/cotire/wxrichtext_CXX_prefix.hxx /mnt/c/Dev/vcpkg/buildtrees/wxwidgets/x64-linux-dbg/libs/richtext/c
    otire/wxrichtext_CXX_prefix.hxx.gch /mnt/c/Dev/vcpkg/buildtrees/wxwidgets/src/v3.1.4-b747a62900.clean/src/richtext/richt
    extbuffer.cpp
    ninja: build stopped: subcommand failed.

Additional context

Tried to compile from PowerShell command line:

.vcpkg.exe install wxwidgets:x64-linux —debug
but get:
[DEBUG] Feature flag ‘binarycaching’ unset
[DEBUG] Feature flag ‘manifests’ unset
[DEBUG] Feature flag ‘compilertracking’ unset
[DEBUG] Feature flag ‘registries’ unset
[DEBUG] Using vcpkg-root: C:Devvcpkg
[DEBUG] Using installed-root: C:Devvcpkginstalled
[DEBUG] Using buildtrees-root: C:Devvcpkgbuildtrees
[DEBUG] Using downloads-root: C:Devvcpkgdownloads
[DEBUG] Using packages-root: C:Devvcpkgpackages
[DEBUG] Using scripts-root: C:Devvcpkgscripts
Your feedback is important to improve Vcpkg! Please take 3 minutes to complete our survey by running: vcpkg contact —survey
[DEBUG] Default binary cache path is: C:UsershwAppDataLocalvcpkgarchives
Computing installation plan.
[DEBUG] CreateProcessW(«C:Devvcpkgdownloadstoolscmake-3.17.2-windowscmake-3.17.2-win32-x86bincmake.exe» —version)
[DEBUG] cmd_execute_and_stream_data() returned 0 after 42695 us
[DEBUG] CreateProcessW(«C:Devvcpkgdownloadstoolscmake-3.17.2-windowscmake-3.17.2-win32-x86bincmake.exe» -DVCPKG_ROOT_DIR=C:/Dev/vcpkg -DPACKAGES_DIR=C:/Dev/vcpkg/packages -DBUILDTREES_DIR=C:/Dev/vcpkg/buildtrees -D_VCPKG_INSTALLED_DIR=C:/Dev/vcpkg/installed -DDOWNLOADS=C:/Dev/vcpkg/downloads -DVCPKG_MANIFEST_INSTALL=OFF -P «C:Devvcpkgbuildtrees.vcpkg_tags.cmake»)
[DEBUG] cmd_execute_and_stream_data() returned 0 after 30466 us
The following packages will be built and installed:
wxwidgets[core]:x64-linux
Detecting compiler hash for triplet x64-linux.
[DEBUG] Found path: C:Program FilesGitcmd/git.exe
[DEBUG] CreateProcessW(«C:Devvcpkgdownloadstoolsgit-2.26.2-1-windowsmingw32bingit.exe» —version)
[DEBUG] cmd_execute_and_stream_data() returned 0 after 24207 us
[DEBUG] CreateProcessW(«C:Devvcpkgdownloadstoolscmake-3.17.2-windowscmake-3.17.2-win32-x86bincmake.exe» -DCURRENT_PORT_DIR=C:/Dev/vcpkg/scripts/detect_compiler -DCURRENT_BUILDTREES_DIR=C:/Dev/vcpkg/buildtrees/detect_compiler -DCURRENT_PACKAGES_DIR=C:/Dev/vcpkg/packages/detect_compiler_x64-linux -DCMD=BUILD -DTARGET_TRIPLET=x64-linux «-DTARGET_TRIPLET_FILE=C:Devvcpkgtripletsx64-linux.cmake» -DVCPKG_PLATFORM_TOOLSET=external -DDOWNLOADS=C:/Dev/vcpkg/downloads -DVCPKG_CONCURRENCY=9 -DGIT=C:/Dev/vcpkg/downloads/tools/git-2.26.2-1-windows/mingw32/bin/git.exe -DVCPKG_ROOT_DIR=C:/Dev/vcpkg -DPACKAGES_DIR=C:/Dev/vcpkg/packages -DBUILDTREES_DIR=C:/Dev/vcpkg/buildtrees -D_VCPKG_INSTALLED_DIR=C:/Dev/vcpkg/installed -DDOWNLOADS=C:/Dev/vcpkg/downloads -DVCPKG_MANIFEST_INSTALL=OFF -P «C:Devvcpkgscriptsports.cmake»)
[DEBUG] — Configuring x64-linux
[DEBUG] CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:85 (message):
[DEBUG] Command failed: ninja -v
[DEBUG] Working Directory: C:/Dev/vcpkg/buildtrees/detect_compiler/x64-linux-rel/vcpkg-parallel-configure
[DEBUG] Error code: 1
[DEBUG] See logs for more information:
[DEBUG] C:Devvcpkgbuildtreesdetect_compilerconfig-x64-linux-out.log
[DEBUG]
[DEBUG] Call Stack (most recent call first):
[DEBUG] scripts/cmake/vcpkg_configure_cmake.cmake:312 (vcpkg_execute_required_process)
[DEBUG] scripts/detect_compiler/portfile.cmake:18 (vcpkg_configure_cmake)
[DEBUG] scripts/ports.cmake:79 (include)
[DEBUG]
[DEBUG]
[DEBUG] cmd_execute_and_stream_data() returned 1 after 1953664 us
[DEBUG]
[DEBUG] Compiler information tracking can be disabled by passing —feature-flags=-compilertracking
Error occurred while detecting compiler information. Pass —debug for more information.
[DEBUG] C:Devvcpkgtoolsrcsrcvcpkgbuild.cpp(584)
[DEBUG] Exiting after 2153244 us (2140800 us)

The text was updated successfully, but these errors were encountered:

Источник

failed to register window class

Topic is solved

wxwxwx

I live to help wx-kind
I live to help wx-kind
Posts: 180
Joined: Thu Dec 20, 2012 4:25 pm

failed to register window class

Hello,
i a wxWidgets based DLL i create a wxFrame derived window

This DLL should be usable in any application. It is possible do multiple loads and unloads
of this DLL during host application runtime.

My problem: When testing load and unloading the DLL multiple problems,
sooner or later i get an assertion:

«failed to register window class». The window which registration failed is my_frame.

without any hint why regitration failed.

Any idea where to search for reason is appreciated.
Thank you

DenDev

Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 223
Joined: Mon Jan 19, 2015 1:45 pm

Re: failed to register window class

Post

by DenDev » Fri Apr 17, 2015 7:36 pm

In MSW the window classes registered from a DLL are not automatically unregistred when the DLL unloads. When the DLL is then reloaded the window class cannot be registred since it is already registred — I’ve had this issue once with native MSW programming. I’d recon that this might be a bug in wxWidgets or that you do not explicitly unregister the window class when the DLL unloads.

You might want to consider avoiding unloading any loaded DLL’s until app terminates.

I have a bad habbit of not testing the code I post :D

wxwxwx

I live to help wx-kind
I live to help wx-kind
Posts: 180
Joined: Thu Dec 20, 2012 4:25 pm

Re: failed to register window class

Post

by wxwxwx » Fri Apr 17, 2015 10:10 pm

Hello,
thank you for all answers.

I checked out the latest comment,

«wxSetInstance.»

But the instance is already known when the DLL is created
in the instantiation thread;

Code: Select all

HINSTANCE hi=wxDynamicLibrary::MSWGetModuleHandle("mydllname",&dll_threadid);

I already created a small test DLL loading a wxFrame. This works perfectly.
With the host test app, i can load and unload as often i like, no problem.

In this i found a difference to the problem DLL:
In the problem DLL i delete the wxFrame in the main thread (outside DLL thread) on stack of DLL_PROCESS_DETACH.
It seems this is the cause for assertion.

In my other DLL, which i built for testpurpose, the wxFrame is deleted in DllApp::OnExit,
so within the DLL thread.

And this removed the assertion.

Topic: wxWidgets Debug Alert — assertion failed  (Read 11421 times)

So, I recently installed CB 20.03. Prior to this, I was using CB 17.12. I usually don’t close IDE applications (VS, CB, etc) that take a lot of time to startup. Yesterday, however, I had to restart my laptop (and hence, close the application) for some updates (Windows :p). After restart, I tried using CB 20.03 again and I’ve been getting this error message:

....wxfont.h(282): assert "numWeight > 0" failed in GetWeightClosestToNumericValue().

I have no clue as to what this means. I then tried using CB 17.12 and this error still continued to happen. Just 15 mins ago, I uninstalled and reinstalled to see if it fixes the issue but nope, I’m getting the same error. There’s two options: Stop, Continue. Stop kills the program startup while Continuing gives the same error message again and again until it finally starts up. However, even when it does startup, the fonts and styles are all messed up and everything looks creepy. I have not tried changing any settings remotely related to font in the past and to only setting I’ve meddled with is that of the compiler installation directory and debugger settings and I don’t know what could be causing this issue. Perhaps, someone who’s faced this and has been able to fix the issue can help me out. If any more information is required and I haven’t made myself clear, feel free to ask.


Logged


I happened to fix the assertion issue. I don’t know if it’s an actual fix or not. I selected the «Continue» option until the program startup (as the assertion message keeps repeating until then). I then followed this: CB > Settings > Editor. Among the options related to font, I marked the «Reset zoom of all editors to default, if leaving dialog» which was previously disabled. I don’t understand completely what it means but well, on restarting CB again, the assertion messages stopped :)


Logged


This is a well known problem, you can find multiple posts about this here. There is a bug in the used wxWigets version which causes a failure to parse certain font size values resulting in font size 0. Apparently you had some zoom factor applied that produced a font size value affected by the bug and resetting zoom changed the font size to a not affected value.


Logged


Thanks for the reply! I believe that’s what caused the problem. I did indeed have some zoom applied last night, before my restart, while I was working on some code.


Logged


The zoom in the editor is separate. This is a bug happening when the font size is changed in Settings -> Editor.


Logged

(most of the time I ignore long posts)
[strangers don’t send me private messages, I’ll ignore them; post a topic in the forum, but first read the rules!]


I am facing same issue after changing my font size and also applied method suggested by you but couldn’t solve the issue.Can you please explain in detail to resolve this issue


Logged


I coded an application using WxWidgets. When I run it. I have this error message :

assert failure failed in mswgetstyle(): unkonwn border style.

enter image description here

When i chose to cancel the application work fine. What does this mean.

lennon310's user avatar

lennon310

12.3k11 gold badges43 silver badges61 bronze badges

asked Nov 4, 2014 at 13:22

Ben Chaaben Assil's user avatar

3

This means that you used an invalid style somewhere in your code, it’s impossible to say anything more without seeing your code.

I agree with ravenspoint comment however: your first problem is to make debugging work. You’re making your life much more difficult completely unnecessarily if you can’t use it.

answered Nov 4, 2014 at 23:03

VZ.'s user avatar

VZ.VZ.

21.1k3 gold badges39 silver badges40 bronze badges

Host Environment

  • OS: Linux (Ubuntu-20.04 WSL2)
  • Compiler: gcc (Ubuntu 9.3.0-10ubuntu2) 9.3.0

To Reproduce
Steps to reproduce the behavior:
./vcpkg install wxwidgets:x64-linux

Failure logs
-Building package wxwidgets[core]:x64-linux…
Could not locate cached archive: /home/hw/.cache/vcpkg/archives/bc/bcc3be52c8a02a8a83e2b7a522c5cd546f591f83.zip
— Using cached /mnt/c/Dev/vcpkg/downloads/wxWidgets-wxWidgets-v3.1.4.tar.gz
— Cleaning sources at /mnt/c/Dev/vcpkg/buildtrees/wxwidgets/src/v3.1.4-b747a62900.clean. Use —editable to skip cleaning for the packages you specify.
— Extracting source /mnt/c/Dev/vcpkg/downloads/wxWidgets-wxWidgets-v3.1.4.tar.gz
— Applying patch disable-platform-lib-dir.patch
— Applying patch fix-stl-build-vs2019-16.6.patch
— Using source at /mnt/c/Dev/vcpkg/buildtrees/wxwidgets/src/v3.1.4-b747a62900.clean
— Configuring x64-linux-dbg
— Configuring x64-linux-rel
— Building x64-linux-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:141 (message):
Command failed: /mnt/c/Dev/vcpkg/downloads/tools/cmake-3.17.2-linux/cmake-3.17.2-Linux-x86_64/bin/cmake —build . —config Debug —target install — -v -j9
Working Directory: /mnt/c/Dev/vcpkg/buildtrees/wxwidgets/x64-linux-dbg
See logs for more information:
/mnt/c/Dev/vcpkg/buildtrees/wxwidgets/install-x64-linux-dbg-out.log

Call Stack (most recent call first):
scripts/cmake/vcpkg_build_cmake.cmake:92 (vcpkg_execute_build_process)
scripts/cmake/vcpkg_install_cmake.cmake:24 (vcpkg_build_cmake)
ports/wxwidgets/portfile.cmake:41 (vcpkg_install_cmake)
scripts/ports.cmake:79 (include)

Error: Building package wxwidgets:x64-linux failed with: BUILD_FAILED
Please ensure you’re using the latest portfiles with ./vcpkg update, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
Package: wxwidgets:x64-linux
Vcpkg version: 2020.06.15-unknownhash

  • Last part of log file:
    [61/791] cd /mnt/c/Dev/vcpkg/buildtrees/wxwidgets/src/v3.1.4-b747a62900.clean/build/cmake/lib/ribbon && /mnt/c/Dev/vcpkg
    /downloads/tools/cmake-3.17.2-linux/cmake-3.17.2-Linux-x86_64/bin/cmake -DCOTIRE_BUILD_TYPE:STRING=Debug -P /mnt/c/Dev/v
    cpkg/buildtrees/wxwidgets/src/v3.1.4-b747a62900.clean/build/cmake/modules/cotire.cmake precompile /mnt/c/Dev/vcpkg/build
    trees/wxwidgets/x64-linux-dbg/libs/ribbon/wxribbon_CXX_cotire.cmake /mnt/c/Dev/vcpkg/buildtrees/wxwidgets/x64-linux-dbg/
    libs/ribbon/cotire/wxribbon_CXX_prefix.hxx /mnt/c/Dev/vcpkg/buildtrees/wxwidgets/x64-linux-dbg/libs/ribbon/cotire/wxribb
    on_CXX_prefix.hxx.gch /mnt/c/Dev/vcpkg/buildtrees/wxwidgets/src/v3.1.4-b747a62900.clean/src/ribbon/art_internal.cpp
    [62/791] cd /mnt/c/Dev/vcpkg/buildtrees/wxwidgets/src/v3.1.4-b747a62900.clean/build/cmake/lib/html && /mnt/c/Dev/vcpkg/d
    ownloads/tools/cmake-3.17.2-linux/cmake-3.17.2-Linux-x86_64/bin/cmake -DCOTIRE_BUILD_TYPE:STRING=Debug -P /mnt/c/Dev/vcp
    kg/buildtrees/wxwidgets/src/v3.1.4-b747a62900.clean/build/cmake/modules/cotire.cmake precompile /mnt/c/Dev/vcpkg/buildtr
    ees/wxwidgets/x64-linux-dbg/libs/html/wxhtml_CXX_cotire.cmake /mnt/c/Dev/vcpkg/buildtrees/wxwidgets/x64-linux-dbg/libs/h
    tml/cotire/wxhtml_CXX_prefix.hxx /mnt/c/Dev/vcpkg/buildtrees/wxwidgets/x64-linux-dbg/libs/html/cotire/wxhtml_CXX_prefix.
    hxx.gch /mnt/c/Dev/vcpkg/buildtrees/wxwidgets/src/v3.1.4-b747a62900.clean/src/html/helpctrl.cpp
    [63/791] cd /mnt/c/Dev/vcpkg/buildtrees/wxwidgets/src/v3.1.4-b747a62900.clean/build/cmake/lib/richtext && /mnt/c/Dev/vcp
    kg/downloads/tools/cmake-3.17.2-linux/cmake-3.17.2-Linux-x86_64/bin/cmake -DCOTIRE_BUILD_TYPE:STRING=Debug -P /mnt/c/Dev
    /vcpkg/buildtrees/wxwidgets/src/v3.1.4-b747a62900.clean/build/cmake/modules/cotire.cmake precompile /mnt/c/Dev/vcpkg/bui
    ldtrees/wxwidgets/x64-linux-dbg/libs/richtext/wxrichtext_CXX_cotire.cmake /mnt/c/Dev/vcpkg/buildtrees/wxwidgets/x64-linu
    x-dbg/libs/richtext/cotire/wxrichtext_CXX_prefix.hxx /mnt/c/Dev/vcpkg/buildtrees/wxwidgets/x64-linux-dbg/libs/richtext/c
    otire/wxrichtext_CXX_prefix.hxx.gch /mnt/c/Dev/vcpkg/buildtrees/wxwidgets/src/v3.1.4-b747a62900.clean/src/richtext/richt
    extbuffer.cpp
    ninja: build stopped: subcommand failed.

Additional context

Tried to compile from PowerShell command line:

.vcpkg.exe install wxwidgets:x64-linux --debug
but get:
[DEBUG] Feature flag ‘binarycaching’ unset
[DEBUG] Feature flag ‘manifests’ unset
[DEBUG] Feature flag ‘compilertracking’ unset
[DEBUG] Feature flag ‘registries’ unset
[DEBUG] Using vcpkg-root: C:Devvcpkg
[DEBUG] Using installed-root: C:Devvcpkginstalled
[DEBUG] Using buildtrees-root: C:Devvcpkgbuildtrees
[DEBUG] Using downloads-root: C:Devvcpkgdownloads
[DEBUG] Using packages-root: C:Devvcpkgpackages
[DEBUG] Using scripts-root: C:Devvcpkgscripts
Your feedback is important to improve Vcpkg! Please take 3 minutes to complete our survey by running: vcpkg contact —survey
[DEBUG] Default binary cache path is: C:UsershwAppDataLocalvcpkgarchives
Computing installation plan…
[DEBUG] CreateProcessW(«C:Devvcpkgdownloadstoolscmake-3.17.2-windowscmake-3.17.2-win32-x86bincmake.exe» —version)
[DEBUG] cmd_execute_and_stream_data() returned 0 after 42695 us
[DEBUG] CreateProcessW(«C:Devvcpkgdownloadstoolscmake-3.17.2-windowscmake-3.17.2-win32-x86bincmake.exe» -DVCPKG_ROOT_DIR=C:/Dev/vcpkg -DPACKAGES_DIR=C:/Dev/vcpkg/packages -DBUILDTREES_DIR=C:/Dev/vcpkg/buildtrees -D_VCPKG_INSTALLED_DIR=C:/Dev/vcpkg/installed -DDOWNLOADS=C:/Dev/vcpkg/downloads -DVCPKG_MANIFEST_INSTALL=OFF -P «C:Devvcpkgbuildtrees.vcpkg_tags.cmake»)
[DEBUG] cmd_execute_and_stream_data() returned 0 after 30466 us
The following packages will be built and installed:
wxwidgets[core]:x64-linux
Detecting compiler hash for triplet x64-linux…
[DEBUG] Found path: C:Program FilesGitcmd/git.exe
[DEBUG] CreateProcessW(«C:Devvcpkgdownloadstoolsgit-2.26.2-1-windowsmingw32bingit.exe» —version)
[DEBUG] cmd_execute_and_stream_data() returned 0 after 24207 us
[DEBUG] CreateProcessW(«C:Devvcpkgdownloadstoolscmake-3.17.2-windowscmake-3.17.2-win32-x86bincmake.exe» -DCURRENT_PORT_DIR=C:/Dev/vcpkg/scripts/detect_compiler -DCURRENT_BUILDTREES_DIR=C:/Dev/vcpkg/buildtrees/detect_compiler -DCURRENT_PACKAGES_DIR=C:/Dev/vcpkg/packages/detect_compiler_x64-linux -DCMD=BUILD -DTARGET_TRIPLET=x64-linux «-DTARGET_TRIPLET_FILE=C:Devvcpkgtripletsx64-linux.cmake» -DVCPKG_PLATFORM_TOOLSET=external -DDOWNLOADS=C:/Dev/vcpkg/downloads -DVCPKG_CONCURRENCY=9 -DGIT=C:/Dev/vcpkg/downloads/tools/git-2.26.2-1-windows/mingw32/bin/git.exe -DVCPKG_ROOT_DIR=C:/Dev/vcpkg -DPACKAGES_DIR=C:/Dev/vcpkg/packages -DBUILDTREES_DIR=C:/Dev/vcpkg/buildtrees -D_VCPKG_INSTALLED_DIR=C:/Dev/vcpkg/installed -DDOWNLOADS=C:/Dev/vcpkg/downloads -DVCPKG_MANIFEST_INSTALL=OFF -P «C:Devvcpkgscriptsports.cmake»)
[DEBUG] — Configuring x64-linux
[DEBUG] CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:85 (message):
[DEBUG] Command failed: ninja -v
[DEBUG] Working Directory: C:/Dev/vcpkg/buildtrees/detect_compiler/x64-linux-rel/vcpkg-parallel-configure
[DEBUG] Error code: 1
[DEBUG] See logs for more information:
[DEBUG] C:Devvcpkgbuildtreesdetect_compilerconfig-x64-linux-out.log
[DEBUG]
[DEBUG] Call Stack (most recent call first):
[DEBUG] scripts/cmake/vcpkg_configure_cmake.cmake:312 (vcpkg_execute_required_process)
[DEBUG] scripts/detect_compiler/portfile.cmake:18 (vcpkg_configure_cmake)
[DEBUG] scripts/ports.cmake:79 (include)
[DEBUG]
[DEBUG]
[DEBUG] cmd_execute_and_stream_data() returned 1 after 1953664 us
[DEBUG]
[DEBUG] Compiler information tracking can be disabled by passing —feature-flags=-compilertracking
Error occurred while detecting compiler information. Pass --debug for more information.
[DEBUG] C:Devvcpkgtoolsrcsrcvcpkgbuild.cpp(584)
[DEBUG] Exiting after 2153244 us (2140800 us)

Понравилась статья? Поделить с друзьями:
  • An internal error occurred while trying to authenticate the user
  • An internal error occurred while attempting to tab complete this command
  • An internal error occurred while attempting to perform this command что делать майнкрафт
  • An internal error occurred while attempting to perform this command решение
  • An internal error occurred while attempting to perform this command переводчик