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

Crashing if you set cpu speed to 1000 #3301

Closed
vsub opened this issue Aug 21, 2013 · 10 comments · Fixed by #3303
Closed

Crashing if you set cpu speed to 1000 #3301

vsub opened this issue Aug 21, 2013 · 10 comments · Fixed by #3303

Comments

@vsub
Copy link

vsub commented Aug 21, 2013

Don't know who will actually set it to 1000 but it crashes if you hit ok while 1000 is selected
Also if you manually set it to 1000,when you try to enter Game Settings=>System ppsspp will crash

@hrydgard
Copy link
Owner

Hmm that's really bad.

Yeah, will have to do a 0.9.1 sooner than I expected...

@thedax
Copy link
Collaborator

thedax commented Aug 21, 2013

Call stack of the crash(it's the same crash for both ways of triggering it):

>   PPSSPPWindows.exe!UIContext::GetScissorBounds() Line 82 C++
    PPSSPPWindows.exe!UI::ViewGroup::Draw(UIContext & dc) Line 103  C++
    PPSSPPWindows.exe!UI::ScrollView::Draw(UIContext & dc) Line 600 C++
    PPSSPPWindows.exe!UI::ViewGroup::Draw(UIContext & dc) Line 99   C++
    PPSSPPWindows.exe!UI::ViewGroup::Draw(UIContext & dc) Line 99   C++
    PPSSPPWindows.exe!UIScreen::render() Line 37    C++
    PPSSPPWindows.exe!ScreenManager::render() Line 86   C++
    PPSSPPWindows.exe!NativeRender() Line 565   C++
    PPSSPPWindows.exe!Core_RunLoop() Line 137   C++
    PPSSPPWindows.exe!Core_Run() Line 180   C++
    PPSSPPWindows.exe!TheThread(void * __formal) Line 135   C++

@thedax
Copy link
Collaborator

thedax commented Aug 21, 2013

Additional info: "Run-Time Check Failure #2 - Stack around the variable 'temp' was corrupted."

@vsub
Copy link
Author

vsub commented Aug 21, 2013

It seems to be newui related

@thedax
Copy link
Collaborator

thedax commented Aug 21, 2013

Yes, I know.

@unknownbrackets
Copy link
Collaborator

I'm sure the bug is here:

void PopupSliderChoice::Draw(UIContext &dc) {
    Choice::Draw(dc);
    char temp[4];
    sprintf(temp, "%i", *value_);
    dc.Draw()->DrawText(dc.theme->uiFont, temp, bounds_.x2() - 12, bounds_.centerY(), 0xFFFFFFFF, ALIGN_RIGHT | ALIGN_VCENTER);
}

4 just isn't very long.

-[Unknown]

@thedax
Copy link
Collaborator

thedax commented Aug 21, 2013

Aha, that would explain it. Perhaps 32 would be more reasonable to allow room for growth?

@unknownbrackets
Copy link
Collaborator

An unsigned 32-bit integer can be 10 characters long, so that'd be 11. But sure, 32 should be a nice reasonable safe value.

-[Unknown]

@thedax
Copy link
Collaborator

thedax commented Aug 21, 2013

Thanks for spotting that, @unknownbrackets.

@thedax
Copy link
Collaborator

thedax commented Aug 21, 2013

I think this can be closed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants