maloep/romcollectionbrowser

exception Memory error

Opened this issue · 3 comments

I'm having a weird problem with extracting playstation roms. They're cue/bin files in a zip, and I have RCB set to keep a local copy and to extract the zip files. When I select a psx game, it successfully makes the local copy, lets me choose whether to use the cue or bin, but when I click the cue file, it just crashes. Here's the error:

23:47:24.610 T:8940   DEBUG: RCB_INFO Creating local copy: C:\Users\media\AppData\Roaming\Kodi\userdata\addon_data\script.games.rom.collection.browser\tmp\PlayStation\Croc - Legend of the Gobbos.zip
23:47:28.371 T:8940   DEBUG: RCB_INFO Local copy created
23:47:28.371 T:8940   DEBUG: RCB_INFO __handleCompressedFile
23:47:28.371 T:8940   DEBUG: RCB_INFO Trying to delete temporary rom files
23:47:28.371 T:8940   DEBUG: RCB_INFO Treating file as a compressed archive
23:47:28.372 T:8940   DEBUG: RCB_INFO The Archive has 2 files
23:47:28.380 T:8096   DEBUG: ------ Window Init (DialogSelect.xml) ------
23:47:28.380 T:8096    INFO: Loading skin file: DialogSelect.xml, load type: KEEP_IN_MEMORY
23:47:29.447 T:8096   DEBUG: ------ Window Deinit (Pointer.xml) ------
23:47:34.237 T:8096   DEBUG: ------ Window Init (Pointer.xml) ------
23:47:36.521 T:8096   DEBUG: Keyboard: scancode: 0x38, sym: 0x0134, unicode: 0x0000, modifier: 0x100
23:47:36.522 T:8096   DEBUG: CInputManager::OnKey: alt-leftalt (0x4f0d4) pressed, action is
23:47:36.523 T:8096   DEBUG: ------ Window Deinit (Pointer.xml) ------
23:47:36.548 T:8096   DEBUG: CWinEventsWin32::WndProcWindow is active
23:47:36.549 T:8096   DEBUG: CWinEventsWin32::WndProc: Focus switched to process C:\Windows\explorer.exe
23:47:51.230 T:8096   DEBUG: CWinEventsWin32::WndProcWindow is active
23:47:51.259 T:8096   DEBUG: ------ Window Init (Pointer.xml) ------
23:47:52.326 T:908   DEBUG: Thread JobWorker 908 terminating (autodelete)
23:47:52.326 T:3428   DEBUG: Thread JobWorker 3428 terminating (autodelete)
23:47:52.334 T:2088   DEBUG: Thread JobWorker 2088 terminating (autodelete)
23:47:52.352 T:7884   DEBUG: Thread JobWorker 7884 terminating (autodelete)
23:47:52.781 T:8096   DEBUG: CInputManager::ProcessMouse: trying mouse action leftclick
23:47:53.015 T:8096   DEBUG: ------ Window Deinit (DialogSelect.xml) ------
23:47:53.529 T:8096   DEBUG: Keyboard: scancode: 0x38, sym: 0x0134, unicode: 0x0000, modifier: 0x100
23:47:53.529 T:8096   DEBUG: CInputManager::OnKey: alt-long-leftalt (0x104f0d4) pressed, action is
23:47:53.529 T:8096   DEBUG: ------ Window Deinit (Pointer.xml) ------
23:47:53.596 T:8096   DEBUG: CWinEventsWin32::WndProcWindow is active
23:47:53.596 T:8096   DEBUG: CWinEventsWin32::WndProc: Focus switched to process C:\Windows\explorer.exe
23:47:55.192 T:8940   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.MemoryError'>
                                            Traceback (most recent call last):
                                              File "C:\Users\media\AppData\Roaming\Kodi\addons\script.games.rom.collection.browser\resources\lib\gui.py", line 365, in onClick
                                                self.launchEmu()
                                              File "C:\Users\media\AppData\Roaming\Kodi\addons\script.games.rom.collection.browser\resources\lib\gui.py", line 1017, in launchEmu
                                                launcher.launchEmu(self.gdb, self, gameId, self.config, selectedGame)
                                              File "C:\Users\media\AppData\Roaming\Kodi\addons\script.games.rom.collection.browser\resources\lib\launcher.py", line 47, in launchEmu
                                                cmd, precmd, postcmd, roms = self._buildCmd(gui, filenameRows, gameRow, False)
                                              File "C:\Users\media\AppData\Roaming\Kodi\addons\script.games.rom.collection.browser\resources\lib\launcher.py", line 191, in _buildCmd
                                                roms = self.__handleCompressedFile(gui, filext, rom, emuParams)
                                              File "C:\Users\media\AppData\Roaming\Kodi\addons\script.games.rom.collection.browser\resources\lib\launcher.py", line 362, in __handleCompressedFile
                                                archives = self.__getArchives(filext, rom, names)
                                              File "C:\Users\media\AppData\Roaming\Kodi\addons\script.games.rom.collection.browser\resources\lib\launcher.py", line 618, in __getArchives
                                                '7z': self.__getArchives7z}[compression_type](filepath, archiveList)
                                              File "C:\Users\media\AppData\Roaming\Kodi\addons\script.games.rom.collection.browser\resources\lib\launcher.py", line 640, in __getArchivesZip
                                                archivesDecompressed = [(name, archive.read(name)) for name in archiveList]
                                              File "C:\Program Files (x86)\Kodi\system\python\Lib\zipfile.py", line 938, in read
                                                return self.open(name, "r", pwd).read()
                                              File "C:\Program Files (x86)\Kodi\system\python\Lib\zipfile.py", line 630, in read
                                                data = self.read1(n)
                                              File "C:\Program Files (x86)\Kodi\system\python\Lib\zipfile.py", line 684, in read1
                                                max(n - len_readbuffer, self.MIN_READ_SIZE)
                                            MemoryError
                                            -->End of Python script error report<--
23:47:55.192 T:8940   DEBUG: RCB_INFO: onAction: 100
23:47:55.193 T:8940   DEBUG: RCB_INFO: onAction: 0
23:47:55.193 T:8940   DEBUG: RCB_INFO: actionId == 0. Input ignored

It doesn't happen with every rom though. Maybe its size based?

Possible that it is a size issue. Although PS1 roms should not be that big. What system are you running? Do you have enough RAM available?

Maybe there are also some hard limits on memory usage in Kodi or python that I do not know about.

I'm running it on Windows 10 with 16GB of memory. Indeed the roms are like 500MB, so I'm not sure what's going on. It'd be nice to be able to unzip them though... I can send you a link to some zip files if that helps?