Twin Matrix
Member
Hey,
I am using the FMOD Ex Audio module with RPG Maker XP (script here), so that I can use looping points, start music at certain points and overall have a more smooth audio system.
However, the game tends to get a 'script is hanging' error every now and then, and all the time on my 10-year-old PC. I messed around with what the cause could be, and after removing the FmodEx and looking up 'script is hanging' information (including Zeriab's), the problem is most likely using Win32API to pop up the fmodex.dll.Is there a way to avoid the 'script is hanging error' from this? In the RGSS editor, or maybe by making the dll smaller? I don't know, I even tried adding 'Graphics.update' in between the Win32API lines, but that doesn't help either.
Here is the part that I think is mainly crashing the game sometimes:
One more thing: the 'script is hanging' error only appears 1-2 times at first after saving the project. After that, I don't get the error anymore until I change something in the project again and save it. As if it has to re-load a dll or something and it takes 1-2 'script is hanging' errors to fully load it into the cache. I don't know. This doesn't count for my PC where I receive the error literally ALL the time, though.
Edit: If anyone knows the problem but fixing it will take some work, I can offer a payment for that. I've been working with Micko for a while now, but unfortunately he's not too familiar with this problem. ^^
I am using the FMOD Ex Audio module with RPG Maker XP (script here), so that I can use looping points, start music at certain points and overall have a more smooth audio system.
However, the game tends to get a 'script is hanging' error every now and then, and all the time on my 10-year-old PC. I messed around with what the cause could be, and after removing the FmodEx and looking up 'script is hanging' information (including Zeriab's), the problem is most likely using Win32API to pop up the fmodex.dll.Is there a way to avoid the 'script is hanging error' from this? In the RGSS editor, or maybe by making the dll smaller? I don't know, I even tried adding 'Graphics.update' in between the Win32API lines, but that doesn't help either.
Here is the part that I think is mainly crashing the game sometimes:
Code:
#--------------------------------------------------------------------------
# * Instance Variables
#--------------------------------------------------------------------------
@fmod_dll = FModEx::DLL.new # The FMOD Ex DLL
@fmod = FModEx::System.new(@fmod_dll) # The global System object
@fmod_se = [] # Array of Sound Effects
@rtp_folder = nil # Name of RTP folder
#--------------------------------------------------------------------------
# * Get Path of RTP Folder From Registry
#--------------------------------------------------------------------------
def self.getRTPFolder
if @rtp_folder
return @rtp_folder
end
open_key = Win32API.new('advapi32.dll', 'RegOpenKeyExA', 'LPLLP', 'L')
Graphics.update # SLD
query_value = Win32API.new('advapi32.dll', 'RegQueryValueExA', 'LPLPPP', 'L')
Graphics.update # SLD
close_key = Win32API.new('advapi32', 'RegCloseKey', 'L', 'L')
Graphics.update # SLD
key = 0.chr * 4
# Open a HKEY_LOCAL_MACHINE with KEY_READ attribute and save handle in key
open_key.call(0x80000002, 'Software\Enterbrain\RGSS\RTP', 0, 0x20019, key)
key = @fmod_dll.unpackInt(key)
type = 0.chr * 4
size = 0.chr * 4
One more thing: the 'script is hanging' error only appears 1-2 times at first after saving the project. After that, I don't get the error anymore until I change something in the project again and save it. As if it has to re-load a dll or something and it takes 1-2 'script is hanging' errors to fully load it into the cache. I don't know. This doesn't count for my PC where I receive the error literally ALL the time, though.
Edit: If anyone knows the problem but fixing it will take some work, I can offer a payment for that. I've been working with Micko for a while now, but unfortunately he's not too familiar with this problem. ^^