Skip to content

Index Out Of Range Exception #40

@for-trancer

Description

@for-trancer

What version of iFruitAddon2 are you using?

_ie: 2.0.0

Content of the log file Grand Theft Auto V\ScriptHookVDotNet.log

ScriptHookVDotNet.log

[11:42:43] [DEBUG] Loading API from .\ScriptHookVDotNet2.dll ...
[11:42:43] [DEBUG] Loading API from .\ScriptHookVDotNet3.dll ...
[11:42:43] [DEBUG] Initializing NativeMemory members...
[11:42:51] [DEBUG] Loading scripts from C:\Program Files\GTA V\scripts ...
[11:42:51] [DEBUG] Loading assembly iFruitAddon2.dll ...
[11:42:51] [INFO] Found 1 script(s) in iFruitAddon2.dll resolved to API version 3.7.0 (target API version: 3.6.0).
[11:42:51] [DEBUG] Loading assembly INMNativeUI.dll ...
[11:42:51] [INFO] Found 1 script(s) in INMNativeUI.dll resolved to API version 2.11.6 (target API version: 2.10.12).
[11:42:51] [DEBUG] Loading assembly Metadata.dll ...
[11:42:51] [INFO] Found 1 script(s) in Metadata.dll resolved to API version 2.11.6 (target API version: 2.10.13).
[11:42:51] [DEBUG] Loading assembly SPAII.dll ...
[11:42:51] [INFO] Found 3 script(s) in SPAII.dll resolved to API version 2.11.6 (target API version: 2.10.13).
[11:42:51] [INFO] Found 3 script(s) resolved to the deprecated API version 2.x (ScriptHookVDotNet2.dll), though the script(s) are currently running. The v2 API is deprecated and no longer actively supported. It may stop being supported in the future. You could report to the authors who developed some of the scripts that are using the deprecated API, or find alternative scripts to avoid the issue. The list of script names:
[11:42:51] [WARNING] INMNativeUI.dll
[11:42:51] [WARNING] Metadata.dll
[11:42:51] [WARNING] SPAII.dll
[11:42:51] [DEBUG] Instantiating script iFruitAddon2.iFruitAddon2 ...
[11:42:51] [INFO] Started script iFruitAddon2.iFruitAddon2.
[11:42:51] [DEBUG] Instantiating script INMNativeUI.BigMessageThread ...
[11:42:51] [INFO] Started script INMNativeUI.BigMessageThread.
[11:42:51] [DEBUG] Instantiating script Metadata.Scripts ...
[11:42:51] [INFO] Started script Metadata.Scripts.
[11:42:51] [DEBUG] Instantiating script SPAII.DebugCamera ...
[11:42:51] [INFO] Started script SPAII.DebugCamera.
[11:42:51] [DEBUG] Instantiating script SPAII.SPA2 ...
[11:42:51] [ERROR] Failed to instantiate script SPAII.SPA2 because constructor threw an exception: System.IndexOutOfRangeException: Index was outside the bounds of the array.
at iFruitAddon2.iFruitAddon2.GetTempFilePath()
at iFruitAddon2.iFruitContact.UpdateContactIndex()
at iFruitAddon2.iFruitContact..ctor(String name)
at SPAII.Mechanic.LoadContacts() in E:\Users\Bartholomew\Documents\GitHub\SPA-II\SPAII\Class\Garage\Mechanic.vb:line 18
at SPAII.SPA2..ctor() in E:\Users\Bartholomew\Documents\GitHub\SPA-II\SPAII\SPA2.vb:line 26
[11:42:51] [DEBUG] Instantiating script SPAII.Timer ...
[11:42:51] [INFO] Started script SPAII.Timer.
[11:42:52] [ERROR] Caught unhandled exception:
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at iFruitAddon2.iFruitAddon2.GetTempFilePath()
at iFruitAddon2.iFruitAddon2.Initialize(Object sender, EventArgs e)
at SHVDN.Script.DoTick()
[11:42:52] [ERROR] The exception was thrown while executing the script iFruitAddon2.iFruitAddon2 from "C:\Program Files\GTA V\scripts\iFruitAddon2.dll".
[11:42:52] [WARNING] Aborted script iFruitAddon2.iFruitAddon2.
at System.Threading.Thread.AbortInternal()
at System.Threading.Thread.Abort()
at SHVDN.Script.Abort()
at SHVDN.Script.DoTick()
at SHVDN.Script.MainLoop()

Content of the log file Grand Theft Auto V\iFruitAddon2.log

iFruitAddon2.log

ifruit log was empty

A clear and concise description of what the problem is.

I’m currently trying to use the SPA II mod, which requires the iFruitAddon2 plugin in order to function. Unfortunately, the latest version of iFruitAddon2 (version 3.0.0 and above) causes the game to crash during the loading screen, so I’m unable to use it.

As a workaround, I’ve installed an older version of iFruitAddon2 — specifically a version below 3.0.0 — which allows the game to run without crashing. However, even though the game loads, this older version of the plugin throws a System.IndexOutOfRangeException error at runtime. Because of this exception, the SPA II mod does not work properly, and I am unable to use it as intended or gather full debug logs.

So I’m stuck between two problems: the latest version crashes the game, and the older version runs but throws an exception that breaks mod functionality.

Steps to reproduce the issue.

To troubleshoot, I have already:

Downgraded ScriptHookVDotNet to earlier versions

Checked and adjusted folder permissions

Verified mod installation and dependencies

Despite these efforts, the issue persists.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions