View Full Version : Incomplete RAR Files
noticed that recently when trying to access incomplete rar files xbmc locks up? it used to just fail and fall back to focusing on the file in question.
reason i ask is that when you have 'make archives with one file transparent' enabled and try to access a folder containg incomplete rars it locks up i think it would be better if it was using the old system again where by it opens the folder but simply wont show the transparent file due to it being unfinished.
is this possible?
looking into it but i'm afraid that fixing it will give a big performance penalty (need to enable crc checking to fix it properly, but i'm looking into possible workarounds).
huh why? there is that stupid while(true) loop that just get's stuck.. if some way to abort that would be added user could get away from it.
elupus, there's are two cases.
one is when the headers are broken. that one should be fixable by catching the error code in the while loop.
problem is when the data is broken but the headers are okay.
ah, didn't know that. what happens then? does it throw an exception or? if headers are ok, but other stuff i corrupted, shouldn't it just decode garbage? or does it get stuck somewhere then too?
it sort depends on the compression used. for stored data it
shouldn't hang, but it will feed garbage to whatever is requesting the data. for compressed data, i see some error handling in the decoders (between blocks), but it still might fall through those, that's why rar has crc checking in the first place.
it's a related problem, much less likely to occur, granted, but it still can.. i'll look at fixing the first one tonite, and experiment some with the other one (guess i have to handcraft some faulty files using a hex editor).
fixed the most important case (broken headers).
i don't think the other one is very likely to occur, so didn't bother with it.