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

Random crash during sample amplitude UI adjustment (memory corruption?) #19

Open
deadpahn opened this issue Mar 24, 2023 · 14 comments
Open
Labels
bug Something isn't working

Comments

@deadpahn
Copy link

Japanese DSi running off internal SD CARD, launching via Nocash Ulaunch (mapped to boot up hot hotkey).

Happens all the time for me in almost all scenarios.
https://user-images.githubusercontent.com/1032331/227414722-45334fba-88cd-4308-9356-27ff91e08730.mp4

@asiekierka asiekierka added the bug Something isn't working label Mar 24, 2023
@asiekierka asiekierka assigned asiekierka and unassigned asiekierka Mar 24, 2023
@asiekierka
Copy link
Owner

Not good...

void NumberSlider::penUp(u8 px, u8 py)
{
        btnstate = false;

        if(onPostChange!=0) {
                onPostChange(value);
        }

        draw();
}

The crash happens at the call to draw(), which implies a memory corruption situation going on.

@deadpahn
Copy link
Author

The crash happens at the call to draw(), which implies a memory corruption situation going on.

Do you mean my DSi is broken or you mean in that block of code?

@asiekierka
Copy link
Owner

In that block of code.

@deadpahn
Copy link
Author

deadpahn commented Apr 7, 2023 via email

@deadpahn
Copy link
Author

deadpahn commented Apr 7, 2023

Still a thing in 0.4.4

@asiekierka
Copy link
Owner

Oh, I know. I have no idea where to even start with this one, so it'll have to wait until I have time to debug it.

@deadpahn
Copy link
Author

deadpahn commented Apr 7, 2023

It seems a lot better than before though! Im able to increase the volume on stuff again haha

@asiekierka asiekierka changed the title Volume Adjust Bug Random crash during sample amplitude UI adjustment (memory corruption?) Apr 7, 2023
@asiekierka asiekierka pinned this issue Apr 17, 2023
@daniel-ferguson
Copy link

daniel-ferguson commented Apr 19, 2023

Just a little update on this, I've managed to get the project building locally and I seem to be able to reproduce the same issue in an emulator (desmume 0.9.13). Recording two samples first before scrolling seems to reproduce reliably, where on my DS hardware a single recorded sample was enough.

Out of curiosity how did you identify the crash location in #19 (comment)? I'm unfamiliar with both homebrew dev, and C++ so a bit out of my depth, but would be keen to have a dig and see where I get to 😄

@deadpahn
Copy link
Author

deadpahn commented Jun 16, 2023

Just a little update on this, I've managed to get the project building locally and I seem to be able to reproduce the same issue in an emulator (desmume 0.9.13). Recording two samples first before scrolling seems to reproduce reliably, where on my DS hardware a single recorded sample was enough.

Out of curiosity how did you identify the crash location in #19 (comment)? I'm unfamiliar with both homebrew dev, and C++ so a bit out of my depth, but would be keen to have a dig and see where I get to smile

So I've been testing the new version. This isn't just related to the volume. It's everywhere. Its just a guess but I'm starting to think it has to do with the undo buffer. A lot of different "value" input areas cause the error. For example, I was able to crash NT while drawing a waveform like a maniac.

Which brings me to a temporary solution: make the arrow buttons on the side usable. So far, increasing volume is always a crash point and it's pretty annoying. Loading in samples that I need to increase the volume I realized is a common song writing task. If the buttons worked, or even if you could "type" the value of the volume (as well as slide) that would be great.

@deadpahn
Copy link
Author

deadpahn commented Jul 8, 2023

Tried again tonight. Moved the volume increase by 1 and a RSOD happened. The memory bar was tiny too. Not sure what is happening here. If I reboot i can sometimes avoid guru rsod.

@deadpahn
Copy link
Author

Tested on 0.4.6 ... Still happens 😭

This video is a clean power on loading a sample.
https://github.com/asiekierka/nitrotracker/assets/1032331/1b203199-2198-4c09-b33c-a2ccb6351702

@LeviathaninWaves
Copy link

I don't know if you have solved this yet but I ran into an issue with the undo buffer getting "trashed". My theory is that the undo buffer code doesn't handle bounds checking very well but I haven't looked to confirm as I'm busy implementing a large number of new features.

@deadpahn
Copy link
Author

I don't know if you have solved this yet but I ran into an issue with the undo buffer getting "trashed". My theory is that the undo buffer code doesn't handle bounds checking very well but I haven't looked to confirm as I'm busy implementing a large number of new features.

I made a pull request that fixed the issue for me. I wasnt able to build it using blockds cause it was running into a lot of setup issues (even using the githubs docs).

@deadpahn
Copy link
Author

This doesn't really happen anymore for me since the last build thankfully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants