Opened 8 years ago

Closed 6 years ago

Last modified 12 months ago

#6022 closed defect (invalid)

PSP: ScummVM 1.5.0 svn freezing on PSP while adding Games

Reported by: SF/mcknallski Owned by: joostp
Priority: high Component: Port: PSP
Keywords: Cc:
Game:

Description

The ScummVM 1.5.0git2821-g8c57c71 (Apr 5 2012 05:40:54) daily built version got a Problem with adding games to the List.

Everytime I want to add a Game to the Launcher-list, ScummVM freezes on my PSP.

Earlier daily built versions worked very well.
I am not sure what daily built version exactly was working good. I think the daily builds 2 or 3 weeks ago worked good.

Somewhere on March 19, 2012 there was a change in the Image Decoder. I am not sure, but I think from there on the Versions did not work anymore. February 25, 2012 I am relatively sure the daily build was still working good.

Also Myst and Myst ME does not work anymore. It crashes too while starting.
I also noticed that ScummVM crashes even when I try to open the Gameoptions Dialog for Myst via the ScummVM Launcher Menu.
Maybe it is a Problem with the ScummVM GUI. But that Bug seems to be Game specific.

I am using the 6.60 PRO-B10-fix1 NIGHTLY version on a PSP-2004 (Date-code 7D). The firmware is permanently installed.

Ticket imported from: #3518284. Ticket imported from: bugs/6022.

Change History (33)

comment:1 by SF/mcknallski, 8 years ago

Summary: ScummVM 1.5.0 svn freezing on PSP while adding GamesPSP: ScummVM 1.5.0 svn freezing on PSP while adding Games

comment:2 by fuzzie, 8 years ago

This seems likely to be due to the engine-specific GUI options changes, but I couldn't spot any obvious bugs in the plugin code there, nor reproduce it myself with force-uncached plugins on another platform (nor catch anything under valgrind). So it seems likely to be PSP-specific.

comment:3 by fuzzie, 8 years ago

This might also be caused by binary size.

Could you try with the latest daily build, and if it still doesn't work, delete the tsage, lastexpress and kyra plugins and see if that helps?

comment:4 by SF/mcknallski, 7 years ago

Nope. It does not work with the latest daily build. Also it does not help to delete the mentioned plugins.

comment:5 by digitall, 7 years ago

Hmm... Could you try with just the Mohawk plugin detecting and adding Myst?

If you still get a crash, please can you remove your ScummVM (scummvmrc) configuration file i.e. back it up and remove it and then try adding Myst again and see if a crash occurs?

comment:6 by SF/mcknallski, 7 years ago

It still crashes.
I tried with just the Mohawk plugin and without the Configuration File.
Please Remember: All Games are crashing while detecting. But just Myst is crashing by launching too.
I am using an older Version to detect the Games.

comment:7 by SF/mcknallski, 7 years ago

I noticed that ScummVM on PSP is even crashing when I try to detect an empty Folder.

comment:8 by digitall, 7 years ago

mcknallski: Okaay.. If you could give the Git / Version id for the version which allows you to add games here, that would help.

Though I think the only way we will trace this down, since we can't replicate here without the PSP is for you to build your own builds locally. Instructions and toolchain references are given here:
http://wiki.scummvm.org/index.php/Compiling_ScummVM/PlayStation_Portable

If you could then get the latest ScummVM source code and do a git bisection, you should be able to trace down the cause.

comment:9 by SF/mcknallski, 7 years ago

I´m Sorry. But I have no Idea how to build that. I have no Idea of Programming.

Is there an daily Build archive somewhere? So I could test the versions to find the last that worked well.

comment:10 by digitall, 7 years ago

I should point out that daily builds are not recommended for end-users, especially for the embedded ports as they have been subjected to no release testing i.e. you have to do your own builds and debug if you want to use these...

If this is a major breakage on PSP, it will likely only be fixed by the PSP porter near to the next stable release i.e. v1.5.0

Sorry, but the buildbot box has limited disk space and only retains the last nightly, and as far as I know, the PSP porter provides no nightly build archive for regression testing. It would be normal to generate these from the toolchain and Git bisection if needed..

comment:11 by digitall, 7 years ago

To update status on this bug, a PSP developer has taken a look at this and discovered that the main bug does not occur when building a static build, only when building with dynamic plugins.

Also, removing a number of plugins seems to fix the issue. They are currently looking at bisecting for the exact cause, but it is probably one of the recent changes to the Scummvm base code... 1adc7f0bdd159e733959c24a122f593e3a006628 from 2012-02-10 is about the only one that looks PSP related, but we will have to wait for the bisection results to know the exact point... Please stand by.

comment:12 by joostp, 7 years ago

A bisect points to 4516b5ea24e6c0056984a65fe4fff33553931487 being the culprit.

Very weird - maybe this exposes a bug in the MIPS plugin code?

comment:13 by digitall, 7 years ago

commit 4516b5ea24e6c0056984a65fe4fff33553931487
Author: Matthew Hoops <clone2727@gmail.com>
Date: Sat Jul 2 21:02:58 2011 -0400

GRAPHICS: Convert PictDecoder to the ImageDecoder API

Hmm... Not sure why that would cause an issue.

comment:14 by sev-, 7 years ago

Owner: set to joostp
Priority: normalblocker

comment:15 by sev-, 7 years ago

This is release critical, however, Joost, it depends on your availability. Could be a compiler bug.

comment:16 by SF/mcknallski, 7 years ago

Yesterday I noticed that Discworld is crashing too while launching.

comment:17 by SF/mcknallski, 7 years ago

It seems that the Myst crash is independent from the Game detection Crash.

I thought it could be a Problem with writing the scummvm.ini. But when I change settings in the Game Launcher Menu of ScummVM, the changed settings are saved correctly in the scummvm.ini.

So the Problem is sitting in the Game Detection Process.

comment:18 by bluegr, 7 years ago

Perhaps this is somehow related to the game specific settings in the GUI? I remember we had a talk with joost and LordHoto about possible problems in PSP, but then the approach was changed to something that wouldn't affect PSP.

comment:19 by bluegr, 7 years ago

For reference: I got a PM saying that Scummvm1.5.0git r1982-g73160e5 (jan 8 2012 05:20:39) works OK - in case this helps in bisecting the bug.

comment:20 by sev-, 6 years ago

What is the status of this item?

comment:21 by sev-, 6 years ago

Priority: blockerhigh

comment:22 by SF/mcknallski, 6 years ago

Still unresolved.

comment:23 by SF/nitrus, 6 years ago

Tested with: ScummVM 1.7.0git459-g539c631-dirty (May 23 2013 03:27:50), configured with --enable-debug
Copiled with: latest psptoolchain off Git, plus cross-compiled zlib 1.2.8 and libpng 1.2.50
PSP HW Version: 2003
Firmware Version: 5.00 M33-6

On this version (and maybe earlier ones, will explain at the bottom of the post), adding games worked perfect for me, added multiple (using different engines: AGOS, MOHAWK-MYST, SCUMM-COMI, and Discworld), and I was able to play all of them. I also overrode global audio settings where available, to enable both speech and subtitles.

Tested games were:
WITH DYNAMIC PLUGINS:
Simon 1 English, both Talkie and Floppy - Game worked perfectly, Savegames and Virtual Keyboard too.
Discworld English, both Talkie and Floppy - Game worked perfectly, Savegames and Virtual Keyboard too. (Keep in mind that it uses an internal save system.), No crash at launch.
COMI English - Game worked perfectly, Savegames and Virtual Keyboard too.
MystME - Crashed PSP after choosing the image in the book. No SCUMMTRACE.TXT was created (Note: I've seen flags for debug only in png_loader.cpp so far, so I don't quite know if anything was going to be dumped by the crash either way.)

WITH STATIC PLUGINS:
Simon 1 English, both Talkie and Floppy - Game worked perfectly, Savegames and Virtual Keyboard too.
Discworld English, both Talkie and Floppy - Game worked perfectly, Savegames and Virtual Keyboard too (keep in mind that it uses an internal save system.). No crash at launch.
COMI English - Game worked perfectly, Savegames and Virtual Keyboard too.
MystME - Did not crash, and I was able to play it. Virtual Keyboard worked while saving, did not show up while playing, though the cursor was locked. I did not play it extensively, so I don't really know if it is completable, but it sure is playable. Save/Load worked too.

That being said, I suggest you check for a hidden folder on your memory stick's root, called .Trash-1000. This is essentially the PSP's Trash can/Recycle Bin, and it's probably created when connecting the PSP to a Linux distro or Mac (I'm not sure about Windows).
Whenever you delete something, it's being stored there, and if you try to delete it from another machine it will not allow you to, because that machine is not it's owner.

For example, if you copied a PSP build into the same folder, the one being overwritten was probably moved in the thrash, and the PSP works in a way that the items in thrash still keep a symbolic link to their previous location.
For example: if you deleted a plugin needed for a game, it would be in the thrash but still maintain a link to it's previous location. The PSPs file handling system might force ScummVM to detect the link, and think it's a valid plugin, only to make your game crash upon loading (because it's not actually there). I've had these problems before, with both ScummVM (both at launch, and at various points at playtime) and other programs.

If you try to delete it from another machine, the PSP will create an empty file in it's place with the same name, or an iteration of it. Bottomline, it will not allow you to delete it.

Possible solutions are to empty the Trash can on the PC you deleted stuff from, and it will empty the .Trashes-1000 on your PSP too. Another solution is to Shift-Delete the items, or put ScummVM in a folder with a different name.
Formatting the memory stick is always a good refreshment to it also.

That being said, perhaps you should replicate these steps for #3317306, and see if it changes anything, though it might not be the case, since I know the devs were working on a solution for file handles for that one.

comment:24 by SF/mcknallski, 6 years ago

The Problem is not playing the Games. Adding the Games to the launcher crashes.
Did adding the games work for you?

comment:25 by SF/mcknallski, 6 years ago

I will test it for myself. But your test sounds good to me. But I never compiled it for myself (I do not even know how to do that). I always used the Daily Build. I wil test the daily Build and share my experience the next days.

comment:26 by digitall, 6 years ago

mcknallski: Can you first please try the other solution that nitrus indicated! i.e.
"That being said, I suggest you check for a hidden folder on your memory
stick's root, called .Trash-1000. This is essentially the PSP's Trash
can/Recycle Bin, and it's probably created when connecting the PSP to a
Linux distro or Mac (I'm not sure about Windows).
Whenever you delete something, it's being stored there, and if you try to
delete it from another machine it will not allow you to, because that
machine is not it's owner. "

comment:27 by SF/nitrus, 6 years ago

Yes, adding those games worked without a problem, and I did this with no other ScummVM version on board, deleted savegames and deleted scummvm.ini, to make sure ScummVM adds a fresh entry for them .

For good measure, I downloaded the latest daily build (precompiled by Buildbot, not by me): http://buildbot.scummvm.org/snapshots/master/psp-master-latest.tar.bz2

Tried with that one too, no problems. And even though it uses dynamic plugins, MystME worked too with that latest official daily build.

As tdhs said, please try the solution below when you can.

comment:28 by SF/mcknallski, 6 years ago

I did tests with two games for now. It works great. I did not change anything. just installed the newest Version of ScummVM Daily Build. It seems the accidently created Bug has been killed accidently :-D.

I will do some further tests with more Games. But for now it looks very good.

comment:29 by digitall, 6 years ago

Resolution: invalid
Status: newclosed

comment:30 by digitall, 6 years ago

mcknallski: I would suspect it more likely that the problematic .Trash-1000 folder was removed from your memory card.. but *shrug*. I wonder if we should add some code to skip hidden folders from search on PSP...

Anyway, closing this bug as invalid. Thank you and Nitrus for your responses and testing.

comment:31 by SF/mcknallski, 6 years ago

No. The Trash-1000 Folder was not the Problem. I encountered the Problem also on the Playstation Vita with the Built-In PSP Emulator. Now it works even there. The Access to the PS-Vita Memory Card does not allow Windows/Linux/Mac to create any hidden or temp Files/Folders.

By the way: During some tests I noticed that Lands of Lore freezes after selecting a Character at the beginning of the Game. Also 3 Skulls of the Toltecs does not work. Detection of the Games works perfectly. Anyone else encountering this Problem?

comment:32 by digitall, 6 years ago

mcknallski: Just a minor addendum. This may have been an issue caused in the detection system, by the addition of the CGE engine and found by Nitrus a few days ago. See http://logs.scummvm.org/log.php?log=scummvm.log.27May2013&format=html around 21.03 onwards.

This has now been fully fixed by commit d409d07677162878ae1c44f8d6ca8995896a72ac

comment:33 by digitall, 12 months ago

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