Opened 15 years ago

Closed 15 years ago

Last modified 6 years ago

#4498 closed defect (fixed)

PSP: Crash upon launching

Reported by: joostp Owned by: SF/tanoku
Priority: blocker Component: Port: PSP
Version: Keywords:
Cc: Game:


Since r42668 (Fix bug #2825252: "GUI: Low Res Bugs") the PSP port crashes at startup with:

scummvm: gui/ListWidget.cpp:548: virtual void GUI::ListWidget::reflowLayout(): Assertion `_entriesPerPage > 0' failed.

This revision updated the theme files, and apparently there is an error in the 480x272 config. It's easy to reproduce this on PC by changing the initSize() call in base/main.cpp:237 to init 480x272, and running ScummVM with -g1x.

Obviously this is release critical, so giving priority 9. Frustratingly enough this change was made AFTER me reporting the PSP port was OK for release, and before the branch (so needs to be fixed in both trunk and 1-0-0 branch).

Ticket imported from: #2829805. Ticket imported from: bugs/4498.

Change History (15)

comment:1 by joostp, 15 years ago

Forgot to mention, but this affects both the (built-in) classic theme as well as the modern one.

comment:2 by lordhoto, 15 years ago

Are you sure that this is introduced with r42668? Actually that revision didn't change a bit about the list widget / launcher code. Also modern theme works fine at 480x272 at 1x for me.

comment:3 by lordhoto, 15 years ago

Debugging shows that this fails for the GUI::ListWidget::reflowLayout of the "Browser.List" widget. It seems it only gets a height of "12", which is... strange. I'm a bit puzzled why this happens. For scummmodern I get "188" as height, which looks just fine.

comment:4 by joostp, 15 years ago

I'm not 100% sure this is the exact revision. I just backtracked to the last time I verified the port was working (on the 22th of July), and then looked at which revision was most likely to have caused it and tested that. It's possible that the breakage occurred a few revisions sooner..

Also, with most recent SVN both the modern and classic themes crashed, so maybe there are 2 issues here if modern works fine in that revision?

comment:5 by lordhoto, 15 years ago

Actually I didn't try that revision so far, only HEAD.

comment:6 by SF/tanoku, 15 years ago

Resolution: fixed
Status: newclosed

comment:7 by SF/tanoku, 15 years ago

Hello fine gentlemen, I've fixed the issue in r42953.

After 1h of active debugging, it turned out that Eugene corrupted all of the theme files on r42668 (strange indeed). It's working for both Johannes and me after recompiling all the themes. Shout if it still happens to be broken over there.

Cheers, -Vicent

comment:8 by lordhoto, 15 years ago

Owner: changed from sev- to SF/tanoku

comment:9 by SF/tanoku, 15 years ago

Owner: changed from SF/tanoku to sev-

comment:10 by SF/tanoku, 15 years ago

Heh, a small update: the actual fix is on r42955 (trunk), being backported to the release branch now. In case anybody cares: the theme layout for high-resolution was missing the flag that prevented it from being loaded on 272 height resolution (the PSP), so both the high resolution layout and the low resolution layout was being loaded.

It seems most Python implementations compress the STX files in alphabetical order in the theme ZIPs, so the bug went unnoticed because the high-resolution layout was loaded and then replaced by the low-resolution one. Eugene's Python script compressed the theme ZIP with the low resolution layout first, so it was being replaced by the high-resolution one and destroying the PSP GUI, but not the PC one.

Most annoying bug ever.

comment:11 by lordhoto, 15 years ago

Owner: changed from sev- to SF/tanoku

comment:12 by joostp, 15 years ago

Good work fellas, thanks!

comment:13 by sev-, 15 years ago

But do you sort it now properly? Because this behavior basically ties my hands in working on the GUI.

comment:14 by lordhoto, 15 years ago

Well tanoku fixed the GUI theme files to not depend on sorting anymore, as noted in his latest comment. He just added a flag preventing the high res layouts to be load for Xx272 mode.

You can easily see this in the "scummmodern_layout.stx" for example: <layout_info resolution = '-320xY, -256x240, -Xx272'>

As you can see it says it should not be load for "320xY", "256x240" and "Xx272". The missing removal for "Xx272" made the problem occur, when the theme files were sorted incorrectly.

comment:15 by digitall, 6 years ago

Component: Port: PSP
Note: See TracTickets for help on using tickets.