Comments (11)
I have fixed the crash on master. I'll look at 0.10.2 on Windows soon.
from mgba.
You're going to need to give me more information. Like, a lot more information. If this happened for everyone with every controller on every OS, you can be sure it'd have been fixed by now.
from mgba.
Having the same issue here.
It doesnt crash with my 8 Bit ultimate C controller but it does happen with my official switch pro controller when connected wired.
mGBA Version: 0.10.2
Windows info:
Edition Windows 11 Pro
Version 23H2
Installed on 04/10/2023
OS build 22631.2715
Experience Windows Feature Experience Pack 1000.22677.1000.0
Computer info:
Device name Porygon
Processor AMD Ryzen 5 5600 6-Core Processor 3.50 GHz
Installed RAM 32,0 GB
Device ID B50EF6F1-7BE1-40FB-9BBC-B2EB6AF1EFB6
Product ID 00331-10000-00001-AA584
System type 64-bit operating system, x64-based processor
Pen and touch No pen or touch input is available for this display
Edit: I also tested with stuff like Steam not opened to make sure nothing external was messing around with the controllers of my computer, same results. I wanted to test the pro controller wireless but I failed to find my bluetooth dongle lol
from mgba.
Sorry about the vague post. I believe my controller is this one: http://www.pc210.com/products/product_view.aspx?proid=430
from mgba.
Steps to reproduce:
The bug (or a similar one) also occurs on Linux (NixOS in my case, using the package from Nixpkgs). In my case, it happens in the following situation:
- Controller is plugged in, mGBA is started.
- A game is started and running (which could be an important part of information).
- The controller is disconnected during the game.
- The game continues to run.
- The controller is reconnected and the player LEDs are blinking.
- The game immediately freezes and mGBA becomes unresponsive.
- mGBA crashes.
The bug does not immediately appear, but rather requires (when reproducing in a games title screen) a variable amount (un-)plugs of the controller to occur (but sometimes a single (un-)plug is enough).
And before somebody asks: No, I'm disconnecting my controller on purpose during the game, rather my controller is old and has a loose contact which results in short disconnects during the usage.
In one case, it seemed (not entirely sure though) that mGBA crashed instantly after disconnecting the controller.
Additional information:
Before crashing, mGBA is unresponsive for a moment. After about 5 seconds, it crashes without any error message at all and just disappears. Starting it from the commandline and looking at the output after the crash hints, that mGBA has a segfault in this case:
QOpenGLContext::swapBuffers() called with non-exposed window, behavior is undefined
QOpenGLContext::swapBuffers() called with non-exposed window, behavior is undefined
QOpenGLContext::swapBuffers() called with non-exposed window, behavior is undefined
[1] 19405 segmentation fault (core dumped) mgba-qt
Information about my setup / system:
mGBA version: 0.10.2
OS: NixOS Unstable, 64 Bit AMD64 / x86_64
CPU: Intel(R) Core(TM) i3 CPU M370, 4 cores with 2.40GHz each
If this seems to be another issue, I'll create a new issue. But at the moment it looks like it could probably be the same issue.
from mgba.
@spamzilla @Jaizu Was a game already running when mGBA crashed? If yes, it could probably prove my theory...
I just took another look into it and threw gdb on it; I guess (in my case) the problem occurs through the invalidated reference when disconnecting the controller / the incompletely initialized reference when newly connecting a controller while the inputs are polled. At least thats's what I think could be the problem:
#0 0x0000000000000000 in ?? ()
#1 0x00000000005428e5 in QGBA::InputController::pollEvents (this=0xa288a8)
at /home/user/Repositories/mgba/src/platform/qt/InputController.cpp:350
#2 0x00000000004f1503 in QGBA::CoreController::updateKeys (this=this@entry=0xbe2ea0)
at /home/user/Repositories/mgba/src/platform/qt/CoreController.cpp:1207
#3 0x00000000004f48b5 in QGBA::CoreController::finishFrame (this=0xbe2ea0)
at /home/user/Repositories/mgba/src/platform/qt/CoreController.cpp:1254
#4 0x00007ffff79072ac in GBAFrameEnded (gba=0x7fffbc002000)
at /home/user/Repositories/mgba/src/gba/gba.c:974
#5 0x00007ffff792ac8f in _startHdraw (timing=<optimized out>, context=0x7fffbc002c90,
cyclesLate=0) at /home/user/Repositories/mgba/src/gba/video.c:181
#6 0x00007ffff78a02e2 in mTimingTick (timing=timing@entry=0x7fffbc003960,
cycles=cycles@entry=215) at /home/user/Repositories/mgba/src/core/timing.c:106
#7 0x00007ffff7905a7a in GBAProcessEvents (cpu=0x7fffbc69d000)
at /home/user/Repositories/mgba/src/gba/gba.c:316
#8 0x00007ffff789f179 in _mCoreThreadRun (context=0xbe2eb0)
at /home/user/Repositories/mgba/src/core/thread.c:339
#9 0x00007ffff3ca3084 in start_thread ()
from /nix/store/9y8pmvk8gdwwznmkzxa6pwyah52xy3nk-glibc-2.38-27/lib/libc.so.6
#10 0x00007ffff3d2560c in clone3 ()
from /nix/store/9y8pmvk8gdwwznmkzxa6pwyah52xy3nk-glibc-2.38-27/lib/libc.so.6
And even if my guess is incorrect, there's probably additional useful information about the bug.
from mgba.
Pulling this into 0.10.3 since it seems more widespread than I'd originally expected.
from mgba.
I am unable to reproduce a crash on 0.10.2, at least on Linux. I can, however, reproduce a crash on disconnect on master that I'm looking into now.
from mgba.
Try as I might, I can't reproduce this on Windows 10 with 0.10.2. Can I get precise reproduction steps?
from mgba.
Is the fix for the crash incorporated in the current 0.10.3 release? If yes, the bug is not fixed on version 0.10.3 on NixOS. If not, I would compile the master branch on my machine and test it.
In any case: Thanks for looking into it so far :)
from mgba.
If it were, this bug would have been closed. I don't have a repro case for the 0.10.2 crash. The fix on master is for a different crash that only existed on master. That said, the backtrace you posted doesn't seem to be for 0.10.2--that line isn't in that function on that version.
from mgba.
Related Issues (20)
- Chinese translation for Idle loop
- [BIOS] Unable to load alternative BIOS ~ EXEQ Game Box SP HOT 2
- Bugs in mGBA and Polished Crystal
- mgba-qt crashes in Ubuntu 22.04 LTS due to undefined symbol HOT 1
- mGBA (SDL) crashes in Ubuntu 22.04 LTS due to undefined symbol
- Rumble only works for a second (Windows / XBox 360 wired controller)
- scooby doo classic creep capers crashes
- Rumble should work even if 0x80000C8 is not set HOT 2
- Another World boot up in black screen HOT 3
- Another World (homebrew title by Foxy) boot up in black screen in latest version of mgba (0.10.3) HOT 1
- .Deb packagings. HOT 2
- [Question] Un-reachable Library grid and icon view HOT 1
- Feeling frame skip to play GB(C) games obviously if don't check sync video
- Wario Ware Twisted has inconsistent stereo balance HOT 2
- Accessibility limitations in Settings HOT 4
- Italian translation of README.md
- mGBA 0.10.3 refuses to be open while Mayflash Gamecube controller adapter is connected in PC mode HOT 2
- Multiplayer window crash
- Clarification about Game Boy Palette HOT 11
- [3DS] No sound in any GBA games HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mgba.