[Scummvm-devel] ScummVM PS2 backend - to be or not to be... a directory

LavosSpawn lavosspawn at g-trans.de
Fri Feb 22 10:13:03 CET 2008


> Hi Max,
>   
>> That's definetely the bug. I made it out in an empirical way:
>>
>> I counted the delta between two successful 'open' fd, and counted
>> the number of failed 'dopen' in-between. Tada! If you try to dopen
>> a non-directory item, you lose one fd. So that ruled out my first
>> solution to check whether a file was a dir ot not with 'dopen'.
>>   
>>     
>
> In that case, I'd definately suggest looking into the relevant IRX's 
> sources to figure out who exactly is losing those FD's and why.
> As you say that it happens with all devices, I suppose the problem 
> relies on the IOP side of filexio.
> I was rather sure that this bug was fixed ages ago, but if you say that 
> it's still present..
> I'll try to look into it this weekend, but tbh, I don't think I'll 
> actually have time for it
Okay, I just had a look at the relevant sources.
If a component is losing handles, it would be iomanx.irx
However, the dopen implementation in the version I currently have on my 
hdd ($Id: iomanX.c 1353 2006-09-04 06:48:12Z Herben $) looks absolutely 
correct to me. (And I can't update right now, cause the ps2sdk's svn 
server won't let me in for unknown reasons).
Anyways, as I pointed out in an earlier mail, scummvm won't load its own 
iomanx if it's being run from the host: device, because the debugging 
environment on the ps2 already provides this driver. I strongly suggest 
that you make sure that your ps2link (or whatever you are using) 
provides a working build of iomanx.irx.
If in doubt, mail me the IRX, I'll have a look at it.

P.S.: Okay, the corresponding device drivers could be losing handles as 
well, but you say that you run into this problem with _all_ devices. And 
from what I see in the sources, at least my cdvd driver always closes 
its handles correctly.

Robert.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scummvm.org/pipermail/scummvm-devel/attachments/20080222/ab331fd1/attachment.html>


More information about the Scummvm-devel mailing list