I am still plugging away at my python script installer/manager (http://blenderartists.org/forum/showthread.php?t=81748), but came across an interesting problem using the tarfile module. If tarfile.is_tarfile() or tarfile.open() is given an invalid tar file, Blender crashes.
If not, maybe the problem is just mine and I can go ahead and keep on using is_tarfile(), and just refrain from loading invalid tar files in my tests. Otherwise, it’d be nice to have help or a second opinion in resolving this issue.
No help from me, just confirming the crash on:
Windows XP, blender 2.42a win 32 dynamic, python 2.4
Windows XP, blender cvs 21-12-2006 win32 dynamic, python 2.4
Following commands crash:
next()
read()
readline()
readlines()
seek()
Following do work:
close()
closed
mode
name
newlines
softspace
tell()
xreadlines() [no idea what the parameters should be, but it doesn’t crash]
Your first post about .is_tarfile() does crash as well.
Thanks Crouch! I was hoping it wasn’t just me. Then again, that means I’ll need to find a hack to get around it. Rats.
The reason the is_tarfile() and tarfile.open() crashes is because it tries to open the file using all three compression settings (raw, gzipped, and bz2). When it tries bz2 on a non-bz2 file … crash!