Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Manager] wxWidgets debug alert when switching between advanced and simple view. #4783

Closed
Vulpine05 opened this issue Jun 14, 2022 · 16 comments · Fixed by #4785
Closed

[Manager] wxWidgets debug alert when switching between advanced and simple view. #4783

Vulpine05 opened this issue Jun 14, 2022 · 16 comments · Fixed by #4785

Comments

@Vulpine05
Copy link
Contributor

Describe the bug
wxWidgets has an error message when switching from advanced to simple view in the manager. Or, the Manager will close unexpectedly (see additional context below).

Steps To Reproduce

  1. Open BOINC Manager (already in advanced view).
  2. Switch to simple view, either by mouse click in menu or with ctrl + shift + A
  3. See screenshot below for the debug message. Pressing stop will close the Manager. Hitting continue will display another debug message (similar information). You need to click few a few of them before simple view is displayed.

Expected behavior
A seamless transition from the two views.

Screenshots
image

System Information

  • OS: Windows 10, simliar for Ubuntu 18.04
  • BOINC Version: 7.20.0 Pre-Release, wxWidgets 3.1.6 (Windows), 3.0.4 (Ubuntu 18.04)

Additional context
For my Ubuntu system, it switches to simple view with no problems, but it will close the Manager unexpectedly when switching back to advance view. No debug or other warning message displayed.

@CharlieFenton
Copy link
Contributor

I can't reproduce this debug error message on the Mac debug (pre-release) build, which uses wxWidgets 3.1.5, and have never seen it in previous versions either. I don't have access to an MS Windows or Ubuntu system. It is possible that it only occurs for certain projects or active tasks currently running.

Note that the parent of CSimpleTaskPanel is CSimpleGUIPanel, whose parent is CSimpleFrame. In other words, CSimpleFrame is the grandparent of CSimpleTaskPanel. I would expect that should be OK, but without knowing which line of code (which wxSizer) triggered the alert I can't look into this further.

I also can't reproduce the unexpected close of the Manager when switching back to Advanced View.

@CharlieFenton
Copy link
Contributor

Correction: pre-release builds are not necessarily debug builds. I meant that I can't reproduce this on a debug build of BOINC which was built with wxWidgets 3.1.5 debugging alerts enabled.

It is possible that it only occurs for certain projects or active tasks currently running.

It's also possible that this is a new error message / debugging check in wxWidgets 3.1.6.

@Vulpine05 Did you build the executables yourself? BOINC 7.20.0 should not display "Pre-release" in the version number. Also, assuming that the build project is set up properly, wxWidgets debug alerts should appear only in debug builds of BOINC, and should be suppressed in non-debug builds.

@CharlieFenton
Copy link
Contributor

I just checked, and indeed the code which tests for this is new in wxWidgets 3.1.6. It is in src/common/sizer.cpp.

@RichardHaselgrove
Copy link
Contributor

And it is an active problem under Windows 7 - just confirmed. This with the pre-release version downloaded on 7 June, the v7.20.0 with 2020 copyright date.

@RichardHaselgrove
Copy link
Contributor

On switching to simple view, I get 5 debug check warnings, relating to:

  • on creating CSimpleTaskPanel
  • on creating CSimpleProjectPanel
  • on creating wxButton "Notices"
  • on creating wxButton "Suspend"
  • on creating wxButton "Help"

There's no problem on returning to advanced view.

@Dave-catcher
Copy link

Dave-catcher commented Jun 14, 2022

I have not been able to reproduce the error on my box Ubuntu22.04 wxwidgets3.0.5 I have yet to try the Windows version under WINE. Only project running is CPDN

Edit: This was built myself.

@AenBleidd AenBleidd self-assigned this Jun 14, 2022
@AenBleidd
Copy link
Member

@Vulpine05, thank you for the report. I'll handle it

@AenBleidd AenBleidd added this to Backlog in BOINC Client/Manager via automation Jun 14, 2022
@AenBleidd AenBleidd added this to the Client 7.22.0 milestone Jun 14, 2022
@AenBleidd AenBleidd removed this from Backlog in BOINC Client/Manager Jun 14, 2022
@AenBleidd AenBleidd added this to Backlog in Client Release 7.20.1 via automation Jun 14, 2022
@CharlieFenton
Copy link
Contributor

This with the pre-release version downloaded on 7 June, the v7.20.0 with 2020 copyright date.

That should be a release version (release candidate), not pre-release. Does "About BOINC Manager" say "7.20.0 (Pre-release)" or just "7.20.0"? Commit 7be1ea0 removed the BOINC_PRERELEASE flag, and was followed by commit f35e562 which is the client_release/7.20/7.20.0 tag.

Also, the release build should have been linked with the non-debug build of wxWidgets, which should suppress wxWidgets debugging alerts. Something is very wrong here.

@AenBleidd
Copy link
Member

This with the pre-release version downloaded on 7 June, the v7.20.0 with 2020 copyright date.

That should be a release version (release candidate), not pre-release. Does "About BOINC Manager" say "7.20.0 (Pre-release)" or just "7.20.0"? Commit 7be1ea0 removed the BOINC_PRERELEASE flag, and was followed by commit f35e562 which is the client_release/7.20/7.20.0 tag.

This is reproducible on Release 7.20.0 (I have correct version saying it's a 7.20.0).

Also, the release build should have been linked with the non-debug build of wxWidgets, which should suppress wxWidgets debugging alerts. Something is very wrong here.

Sometimes wxWidgets is very weird. I'll check this but according to file size it definitely contains no Debug symbols.

I'll working on fixing this issue and provide a fix soon.

@RichardHaselgrove
Copy link
Contributor

My test was with the release version made available on GitHub on 7 June. That was labelled 'pre-release' on the Github download page, but does not display pre-release internally when running.

I've just confirmed that the version deployed at the BOINC website is exactly the same: that has the 'use only for testing' warning on the download_all page, but does not identify as pre-release internally.

Replacing the 7 June download with the 14 June download triggers the 'Repair?' dialog in the Windows installer, suggesting that they are in fact identical. This bug occurs in the 14 June download too.

@RichardHaselgrove
Copy link
Contributor

Linux is offering me

boinc (7.20.0+dfsg+202206101603~ubuntu20.04.1) focal; urgency=low

  • Auto build.

from @LocutusOfBorg PPA. I'll download and test that later today, at a convenient stopping point.

@CharlieFenton
Copy link
Contributor

Non-debug builds of wxWidgets should always be built with wxDEBUG_LEVEL=0 defined to suppress wxWidgets' debugging asserts which are used to trigger the debugging error messages, and which can also cause the Manager to crash. It is not sufficient to build a non-debug version.

See this documentation and this documentation. This page says that defining NDEBUG will also disable the asserts.

@AenBleidd
Copy link
Member

AenBleidd commented Jun 14, 2022

Non-debug builds of wxWidgets should always be built with wxDEBUG_LEVEL=0 defined to suppress wxWidgets' debugging asserts which are used to trigger the debugging error messages, and which can also cause the Manager to crash. It is not sufficient to build a non-debug version.

Both flags are specified for release builds but I'll double check this. Thanks for the hint

@Vulpine05
Copy link
Contributor Author

Vulpine05 commented Jun 14, 2022

@Vulpine05 Did you build the executables yourself?

No. I had been running a version of the manager that I built to test a different bug. When I saw 7.20.0 was available on BOINC's website I downloaded that, uninstalled BOINC, then installed the pre-release that I had downloaded.

For my problem on my Ubuntu system (different computer), I had just updated BOINC when the updater listed it.
Edit: For Ubuntu, I am using Costamanga Gianfranco's PPA.

AenBleidd added a commit to AenBleidd/boinc that referenced this issue Jun 14, 2022
This fixes BOINC#4783.

Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
@AenBleidd
Copy link
Member

Non-debug builds of wxWidgets should always be built with wxDEBUG_LEVEL=0 defined to suppress wxWidgets' debugging asserts which are used to trigger the debugging error messages, and which can also cause the Manager to crash. It is not sufficient to build a non-debug version.

See this documentation and this documentation. This page says that defining NDEBUG will also disable the asserts.

I have found the issue: #4786 that is on the side of vcpkg. I'll provide a hotfix to our repo and on vcpkg mainstream.

@LezheGao
Copy link

I have this problem too...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

6 participants