wubi.exe silently fails on ISOs it cannot read

Bug #1003789 reported by GT on 2012-05-24
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Wubi
Undecided
Unassigned

Bug Description

05-23 16:04 INFO root: === wubi 12.04 rev266 ===
05-23 16:04 DEBUG root: Logfile is c:\users\turlakov\appdata\local\temp\wubi-12.04-rev266.log
05-23 16:04 DEBUG root: sys.argv = ['main.pyo', '--exefile="C:\\Users\\Turlakov\\AppData\\Local\\Micr osoft\\Windows\\Temporary Internet Files\\Content.IE5\\BQHEF2EF\\wubi.exe"']
05-23 16:04 DEBUG CommonBackend: data_dir=C:\Users\Turlakov\AppData\Local\Temp\pylF BD3.tmp\data
05-23 16:04 DEBUG WindowsBackend: 7z=C:\Users\Turlakov\AppData\Local\Temp\pylFBD3.tm p\bin\7z.exe
05-23 16:04 DEBUG WindowsBackend: startup_folder=C:\ProgramData\Microsoft\Windows\St art Menu\Programs\Startup
05-23 16:04 DEBUG CommonBackend: Fetching basic info...
05-23 16:04 DEBUG CommonBackend: original_exe=C:\Users\Turlakov\AppData\Local\Micro soft\Windows\Temporary Internet Files\Content.IE5\BQHEF2EF\wubi.exe
05-23 16:04 DEBUG CommonBackend: platform=win32
05-23 16:04 DEBUG CommonBackend: osname=nt
05-23 16:04 DEBUG CommonBackend: language=en_US
05-23 16:04 DEBUG CommonBackend: encoding=cp1252
05-23 16:04 DEBUG WindowsBackend: arch=amd64
05-23 16:04 DEBUG CommonBackend: Parsing isolist=C:\Users\Turlakov\AppData\Local\Temp\pylFB D3.tmp\data\isolist.ini
05-23 16:04 DEBUG CommonBackend: Adding distro Xubuntu-i386
05-23 16:04 DEBUG CommonBackend: Adding distro Edubuntu-i386
05-23 16:04 DEBUG CommonBackend: Adding distro Xubuntu-amd64
05-23 16:04 DEBUG CommonBackend: Adding distro Kubuntu-amd64
05-23 16:04 DEBUG CommonBackend: Adding distro Mythbuntu-i386
05-23 16:04 DEBUG CommonBackend: Adding distro Edubuntu-amd64
05-23 16:04 DEBUG CommonBackend: Adding distro Ubuntu-amd64
05-23 16:04 DEBUG CommonBackend: Adding distro Lubuntu-i386
05-23 16:04 DEBUG CommonBackend: Adding distro Ubuntu-i386
05-23 16:04 DEBUG CommonBackend: Adding distro Mythbuntu-amd64
05-23 16:04 DEBUG CommonBackend: Adding distro Kubuntu-i386
05-23 16:04 DEBUG CommonBackend: Adding distro Lubuntu-amd64
05-23 16:04 DEBUG WindowsBackend: Fetching host info...
05-23 16:04 DEBUG WindowsBackend: registry_key=Software\Microsoft\Windows\CurrentVer sion\Uninstall\Wubi
05-23 16:04 DEBUG WindowsBackend: windows version=vista
05-23 16:04 DEBUG WindowsBackend: windows_version2=Windows 7 Ultimate
05-23 16:04 DEBUG WindowsBackend: windows_sp=None
05-23 16:04 DEBUG WindowsBackend: windows_build=7600
05-23 16:04 DEBUG WindowsBackend: gmt=2
05-23 16:04 DEBUG WindowsBackend: country=US
05-23 16:04 DEBUG WindowsBackend: timezone=America/New_York
05-23 16:04 DEBUG WindowsBackend: windows_username=Turlakov
05-23 16:04 DEBUG WindowsBackend: user_full_name=Turlakov
05-23 16:04 DEBUG WindowsBackend: user_directory=C:\Users\Turlakov
05-23 16:04 DEBUG WindowsBackend: windows_language_code=1033
05-23 16:04 DEBUG WindowsBackend: windows_language=English
05-23 16:04 DEBUG WindowsBackend: processor_name=Intel(R) Core(TM) i3 CPU 530 @ 2.93GHz
05-23 16:04 DEBUG WindowsBackend: bootloader=vista
05-23 16:04 DEBUG WindowsBackend: system_drive=Drive(C: hd 87661.5742188 mb free ntfs)
05-23 16:04 DEBUG WindowsBackend: drive=Drive(C: hd 87661.5742188 mb free ntfs)
05-23 16:04 DEBUG WindowsBackend: drive=Drive(D: cd 0.0 mb free )
05-23 16:04 DEBUG WindowsBackend: drive=Drive(E: cd 0.0 mb free udf)
05-23 16:04 DEBUG WindowsBackend: drive=Drive(G: hd 40819.1210938 mb free ntfs)
05-23 16:04 DEBUG WindowsBackend: uninstaller_path=None
05-23 16:04 DEBUG WindowsBackend: previous_target_dir=None
05-23 16:04 DEBUG WindowsBackend: previous_distro_name=None
05-23 16:04 DEBUG WindowsBackend: keyboard_id=67699721
05-23 16:04 DEBUG WindowsBackend: keyboard_layout=us
05-23 16:04 DEBUG WindowsBackend: keyboard_variant=
05-23 16:04 DEBUG CommonBackend: python locale=('en_US', 'cp1252')
05-23 16:04 DEBUG CommonBackend: locale=en_US.UTF-8
05-23 16:04 DEBUG WindowsBackend: total_memory_mb=4095.99999905
05-23 16:04 DEBUG CommonBackend: Searching ISOs on USB devices
05-23 16:04 DEBUG Distro: checking Ubuntu ISO G:\Diablo 3.iso
05-23 16:04 ERROR root: list index out of range
Traceback (most recent call last):
File "\lib\wubi\application.py", line 57, in run
File "\lib\wubi\backends\common\backend.py", line 190, in fetch_basic_info
File "\lib\wubi\backends\common\backend.py", line 803, in find_any_iso
File "\lib\wubi\backends\common\distro.py", line 112, in is_valid_iso
File "\lib\wubi\backends\win32\backend.py", line 542, in get_iso_file_names
IndexError: list index out of range

bcbc (bcbc) wrote :

Here is the affected code (iso_path = "G:\Diablo 3.iso"):
    def get_iso_file_names(self, iso_path):
        iso_path = abspath(iso_path)
        if iso_path in self.cache:
            return self.cache[iso_path]
        else:
            self.cache[iso_path] = None
        command = [self.info.iso_extractor,'l',iso_path]
        try:
            output = run_command(command)
        except Exception, err:
            log.exception(err)
            log.debug('command >>%s' % ' '.join(command))
            output = None
        if not output: return []

        lines = output.split(os.linesep)
        start = None
        new_lines = []
        for line in lines:
            if line.startswith('---'):
                if start is None:
                    start = True
                else:
                    break
            elif start:
                new_lines.append(line)
        if not new_lines:
            return []
        lines = new_lines

        file_info = [line.split() for line in lines]
        file_names = [os.path.normpath(x[-1]) for x in file_info] <====LINE 542

bcbc (bcbc) wrote :

I can manually reproduce the error like this:
>>> lines = ['', '']
>>> file_info = [line.split() for line in lines]
>>> file_info
[[], []]
>>> file_names = [os.path.normpath(x[-1]) for x in file_info]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
IndexError: list index out of range

Probably something like this will workaround the issue:
=== modified file 'src/wubi/backends/win32/backend.py'
--- src/wubi/backends/win32/backend.py 2012-02-24 07:44:21 +0000
+++ src/wubi/backends/win32/backend.py 2012-05-24 07:47:59 +0000
@@ -539,7 +539,11 @@
         lines = new_lines

         file_info = [line.split() for line in lines]
- file_names = [os.path.normpath(x[-1]) for x in file_info]
+ try:
+ file_names = [os.path.normpath(x[-1]) for x in file_info]
+ except Exception, err:
+ log.exception(err)
+ return []
         self.cache[iso_path] = file_names
         return file_names

bcbc (bcbc) wrote :
bcbc (bcbc) wrote :

Here's another example that fails quietly (for a different reason) when checking for Ubuntu ISOs: http://askubuntu.com/q/142259/1491

05-26 01:30 DEBUG CommonBackend: Searching ISOs on USB devices
05-26 01:30 DEBUG Distro: checking Ubuntu ISO E:\NFSUG2_DISK2.iso
05-26 01:30 ERROR WindowsBackend: Error executing command
>>command=C:\Users\TOXDES~1\AppData\Local\Temp\pylEB12.tmp\bin\7z.exe l E:\NFSUG2_DISK2.iso
>>retval=2
>>stderr=
Error: E:\NFSUG2_DISK2.iso: Can not open file as archive
05-26 01:30 DEBUG Distro: does not contain casper\filesystem.squashfs
05-26 01:30 DEBUG Distro: checking Ubuntu ISO E:\NFSUG2_DISK2.iso
05-26 01:30 ERROR root: iteration over non-sequence
Traceback (most recent call last):
  File "\lib\wubi\application.py", line 57, in run
  File "\lib\wubi\backends\common\backend.py", line 190, in fetch_basic_info
  File "\lib\wubi\backends\common\backend.py", line 803, in find_any_iso
  File "\lib\wubi\backends\common\distro.py", line 113, in is_valid_iso
TypeError: iteration over non-sequence

bcbc (bcbc) on 2012-11-07
summary: - wubi.exe not starting
+ wubi.exe silently fails on ISOs it cannot read
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers