Cemu - Wii U emulator
Find a file
bitscher 8f4ffd6983 Fix UI asserts
* wxGameList.cpp

Triggered when switching to icon view (and on program start afterwards) after
having modified column lengths in the list view:

  0x00007ffff7a8ec4c in __pthread_kill_implementation () from /lib64/libc.so.6
  0x00007ffff7a3e9c6 in raise () from /lib64/libc.so.6
  0x00000000004ce24b in cemu_assert_debug (_condition=false) at /root/cemu/src/gui/../Common/precompiled.h:350
  0x0000000000c0f30d in CemuApp::OnAssertFailure (this=0x2dfdc80, file=0x2ec4880 L"/root/cemu/dependencies/vcpkg/buildtrees/wxwidgets/src/v3.2.0-b1a1c2cb85.clean/src/generic/listctrl.cpp", line=3473, func=0x32cec00 L"SetColumnWidth", cond=0x32ce750 L"\"InReportView()\"", msg=0x333ab70 L"SetColumnWidth() can only be called in report mode.") at /root/cemu/src/gui/CemuApp.cpp:164
  0x00000000010f2c04 in wxDefaultAssertHandler (file=..., line=3473, func=..., cond=..., msg=...) at /root/cemu/dependencies/vcpkg/buildtrees/wxwidgets/src/v3.2.0-b1a1c2cb85.clean/src/common/appbase.cpp:1189
  0x00000000010f34a5 in wxOnAssert (file=0x1fe87f0 "/root/cemu/dependencies/vcpkg/buildtrees/wxwidgets/src/v3.2.0-b1a1c2cb85.clean/src/generic/listctrl.cpp", line=3473, func=0x1fe9c05 "SetColumnWidth", cond=0x1fe9ce8 "\"InReportView()\"", msg=0x1fe9c18 L"SetColumnWidth() can only be called in report mode.") at /root/cemu/dependencies/vcpkg/buildtrees/wxwidgets/src/v3.2.0-b1a1c2cb85.clean/src/common/appbase.cpp:1275
  0x0000000001355fbc in wxListMainWindow::SetColumnWidth (this=0x31d7800, col=2, width=-2) at /root/cemu/dependencies/vcpkg/buildtrees/wxwidgets/src/v3.2.0-b1a1c2cb85.clean/src/generic/listctrl.cpp:3473
  0x000000000135b07b in wxGenericListCtrl::SetColumnWidth (this=0x31e6860, col=2, width=-2) at /root/cemu/dependencies/vcpkg/buildtrees/wxwidgets/src/v3.2.0-b1a1c2cb85.clean/src/generic/listctrl.cpp:5200
  0x0000000000d0a724 in wxAutosizeColumn (ctrl=0x31e6860, col=2) at /root/cemu/src/gui/helpers/wxHelpers.cpp:12
  0x0000000000cb1893 in wxGameList::ApplyGameListColumnWidths()::$_3::operator()(int, int) const (this=0x7fffffffac60, id=2, width=-3) at /root/cemu/src/gui/components/wxGameList.cpp:767
  0x0000000000cb09f6 in wxGameList::ApplyGameListColumnWidths (this=0x31e6860) at /root/cemu/src/gui/components/wxGameList.cpp:774
  0x0000000000cb01f1 in wxGameList::SetStyle (this=0x31e6860, style=wxGameList::Style::kIcons, save=true) at /root/cemu/src/gui/components/wxGameList.cpp:246
[Truncated]

Getting back to a state where Cemu can be launched without crashing
requires changing settings.xml and switching GameList Style to 0.

Solution: Don't call SetColumnWidth if the game list is not in list
view.

* SymbolCtrl.cpp

Triggered when clicking "View PPC debugger"

  0x00007ffff7a8ec4c in __pthread_kill_implementation () from /lib64/libc.so.6
  0x00007ffff7a3e9c6 in raise () from /lib64/libc.so.6
  0x00000000004ce24b in cemu_assert_debug (_condition=false) at /root/cemu/src/gui/../Common/precompiled.h:350
  0x0000000000c0f30d in CemuApp::OnAssertFailure (this=0x2dfdc80, file=0x2ef3200 L"/root/cemu/dependencies/vcpkg/buildtrees/wxwidgets/src/v3.2.0-b1a1c2cb85.clean/src/generic/listctrl.cpp", line=1966, func=0x386e580 L"RefreshLines", cond=0x385c8b0 L"lineTo < GetItemCount()", msg=0x38318a0 L"invalid line range") at /root/cemu/src/gui/CemuApp.cpp:164
  0x00000000010f2c04 in wxDefaultAssertHandler (file=..., line=1966, func=..., cond=..., msg=...) at /root/cemu/dependencies/vcpkg/buildtrees/wxwidgets/src/v3.2.0-b1a1c2cb85.clean/src/common/appbase.cpp:1189
  0x00000000010f34a5 in wxOnAssert (file=0x1fe87f0 "/root/cemu/dependencies/vcpkg/buildtrees/wxwidgets/src/v3.2.0-b1a1c2cb85.clean/src/generic/listctrl.cpp", line=1966, func=0x1fe92db "RefreshLines", cond=0x1fe9334 "lineTo < GetItemCount()",  msg=0x1fe92e8 L"invalid line range") at /root/cemu/dependencies/vcpkg/buildtrees/wxwidgets/src/v3.2.0-b1a1c2cb85.clean/src/common/appbase.cpp:1275
  0x0000000001351175 in wxListMainWindow::RefreshLines (this=0x386d400, lineFrom=0, lineTo=7) at /root/cemu/dependencies/vcpkg/buildtrees/wxwidgets/src/v3.2.0-b1a1c2cb85.clean/src/generic/listctrl.cpp:1966
  0x000000000135cbb4 in wxGenericListCtrl::RefreshItems (this=0x3861d10, itemFrom=0, itemTo=7) at /root/cemu/dependencies/vcpkg/buildtrees/wxwidgets/src/v3.2.0-b1a1c2cb85.clean/src/generic/listctrl.cpp:5837
  0x0000000000dea5b3 in SymbolListCtrl::OnGameLoaded (this=0x3861d10) at /root/cemu/src/gui/debugger/SymbolCtrl.cpp:76
  0x0000000000de9de9 in SymbolListCtrl::SymbolListCtrl (this=0x3861d10, parent=0x385d000, id=@0x7fffffffce6c: -1, pos=..., size=...) at /root/cemu/src/gui/debugger/SymbolCtrl.cpp:41
  0x0000000000cfe5af in SymbolWindow::SymbolWindow (this=0x385d000, parent=..., main_position=..., main_size=...) at /root/cemu/src/gui/debugger/SymbolWindow.cpp:21
[Truncated]

Solution: Boundary checks on the indices passed to RefreshLines

* TextureRelationWindow.cpp

Triggered after opening the "View texture cache info" menu.

  0x00007ffff7a8ec4c in __pthread_kill_implementation () from /lib64/libc.so.6
  0x00007ffff7a3e9c6 in raise () from /lib64/libc.so.6
  0x00000000004ce24b in cemu_assert_debug (_condition=false) at /root/cemu/src/gui/../Common/precompiled.h:350
  0x0000000000c0f30d in CemuApp::OnAssertFailure (this=0x2dfdc80, file=0x2ee0200 L"/root/cemu/dependencies/vcpkg/buildtrees/wxwidgets/src/v3.2.0-b1a1c2cb85.clean/src/generic/listctrl.cpp", line=4478, func=0x34012c0 L"EnsureVisible", cond=0x33591c0 L"\"index >= 0 && (size_t)index < GetItemCount()\"", msg=0x3405f00 L"invalid index in EnsureVisible") at /root/cemu/src/gui/CemuApp.cpp:164
  0x00000000010f2c04 in wxDefaultAssertHandler (file=..., line=4478, func=..., cond=..., msg=...) at /root/cemu/dependencies/vcpkg/buildtrees/wxwidgets/src/v3.2.0-b1a1c2cb85.clean/src/common/appbase.cpp:1189
  0x00000000010f34a5 in wxOnAssert (file=0x1fe87f0 "/root/cemu/dependencies/vcpkg/buildtrees/wxwidgets/src/v3.2.0-b1a1c2cb85.clean/src/generic/listctrl.cpp", line=4478, func=0x1fea6e7 "EnsureVisible", cond=0x1fea6b8 "\"index >= 0 && (size_t)index < GetItemCount()\"", msg=0x1fea638 L"invalid index in EnsureVisible") at /root/cemu/dependencies/vcpkg/buildtrees/wxwidgets/src/v3.2.0-b1a1c2cb85.clean/src/common/appbase.cpp:1275
  0x0000000001358bf4 in wxListMainWindow::EnsureVisible (this=0x33c1300, index=22) at /root/cemu/dependencies/vcpkg/buildtrees/wxwidgets/src/v3.2.0-b1a1c2cb85.clean/src/generic/listctrl.cpp:4478
  0x000000000135bef8 in wxGenericListCtrl::EnsureVisible (this=0x335d000, item=22) at /root/cemu/dependencies/vcpkg/buildtrees/wxwidgets/src/v3.2.0-b1a1c2cb85.clean/src/generic/listctrl.cpp:5524
  0x0000000000d45ac3 in TextureRelationViewerWindow::RefreshTextureList (this=0x33cfc00) at /root/cemu/src/gui/windows/TextureRelationViewer/TextureRelationWindow.cpp:375
  0x0000000000d44e0f in TextureRelationViewerWindow::TextureRelationViewerWindow (this=0x33cfc00, parent=...) at /root/cemu/src/gui/windows/TextureRelationViewer/TextureRelationWindow.cpp:129
  0x0000000000d437b3 in openTextureViewer (parentFrame=...) at /root/cemu/src/gui/windows/TextureRelationViewer/TextureRelationWindow.cpp:32
  0x0000000000c1b5d9 in MainWindow::OnDebugViewTextureRelations (this=0x30d8dd0, event=...) at /root/cemu/src/gui/MainWindow.cpp:1149
  0x00000000010f177f in wxAppConsoleBase::HandleEvent (this=0x2dfdc80, handler=0x30d8dd0, func=(void (wxEvtHandler::*)(wxEvtHandler * const, wxEvent &)) 0xc1b5c0 <MainWindow::OnDebugViewTextureRelations(wxCommandEvent&)>, event=...)
    at /root/cemu/dependencies/vcpkg/buildtrees/wxwidgets/src/v3.2.0-b1a1c2cb85.clean/src/common/appbase.cpp:658
[Truncated]

Solution: Boundary checks before calling EnsureVisible.
2022-09-02 00:55:05 -07:00
.github Infrastructure for shipping and auto-updating experimental releases (#131) 2022-08-31 12:04:09 +02:00
bin git: Ignore more files in bin folder 2022-08-26 17:41:07 +02:00
cmake build: improve the Linux aspect of things (#75) 2022-08-29 07:19:48 +02:00
dependencies build: improve the Linux aspect of things (#75) 2022-08-29 07:19:48 +02:00
dist/linux Add Greek translation for Linux distributions (#106) 2022-08-30 06:24:23 +02:00
src Fix UI asserts 2022-09-02 00:55:05 -07:00
.gitignore Infrastructure for shipping and auto-updating experimental releases (#131) 2022-08-31 12:04:09 +02:00
.gitmodules Replace Vulkan-SDK with Vulkan Headers 2022-08-25 13:31:32 +09:00
BUILD.md Linker(Vcpkg) Error: undefined reference to libdecor (#128) 2022-08-31 07:53:04 +02:00
CMakeLists.txt Infrastructure for shipping and auto-updating experimental releases (#131) 2022-08-31 12:04:09 +02:00
CMakeSettings.json Reformat CMakeSettings.json and remove empty variables (#4) 2022-08-24 11:22:13 +02:00
generate_vs_solution.bat Add all the files 2022-08-22 22:21:23 +02:00
LICENSE.txt Expand readme with links and description 2022-08-23 02:37:05 +02:00
README.md Update URLs to HTTPS (#44) 2022-08-25 15:33:12 +02:00
vcpkg.json Proper fix for static asserts (#64) 2022-08-26 14:28:50 +02:00

Cemu - Wii U emulator

Build Process Discord

This is the code repository of Cemu, a Wii U emulator that is able to run most Wii U games and homebrew in a playable state. It's written in C/C++ and is being actively developed with new features and fixes to increase compatibility, convenience and usability.

Cemu is currently only available for 64-bit Windows and Linux devices.

Other relevant repositories:

Download

You can download the latest Cemu releases from the Github Releases or from Cemu's website.

Cemu is currently only available in a portable format so no installation is required besides extracting it in a safe place.

See Current State Of Linux builds for information on using Cemu natively on Linux.

Pre-2.0 releases can be found on Cemu's changelog page.

Build Instructions

To compile Cemu yourself on Windows or Linux, view the BUILD.md file.

Issues

Issues with the emulator should be filed using Github Issues.
The old bug tracker can be found at bugs.cemu.info and still contains relevant issues and feature suggestions.

Contributing

Pull requests are very welcome. For easier coordination you can visit the developer discussion channel on Discord: https://discord.gg/5psYsup.

If coding isn't your thing, testing games and making detailed bug reports or updating the (usually outdated) compatibility wiki is also appreciated!

Questions about Cemu's software architecture can also be answered on Discord. Alternative communication channels (like IRC) are being considered.

License

Cemu is licensed under Mozilla Public License 2.0. Exempt from this are all files in the dependencies directory for which the licenses of the original code apply as well as some individual files in the src folder, as specified in those file headers respectively.