-
-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request textDocument/hover failed (index out of bounds) #405
Comments
This issue seems to be related to #399. |
Somehow after manually switching to 7.2.12 and reloading the window VSCodium said that I'm still on 7.2.11 and at that moment I noticed the ext was renamed to |
It's working for me in 7.2.12 |
Yeah, it seems that the ext does not like it when I'm working on decompiled code or when there are a lot of macros using each other in their definitions. |
It can be caused by something above the given code in that file. I recommend deleting code until it starts working to help identify the real cause. |
It seems that these errors happen when I have lines like this #if defined _aon_store_inventory_included
methodmap IHealerBossPlayer < StorePlayer
#else
methodmap IHealerBossPlayer
#endif
{
|
Post StorePlayer definition. |
I cant post whole code here but basically enum StorePlayer
{
STORE_INVALID_PLAYER = 0
};
methodmap StorePlayer < PLSPlayer
{
public native bool ShowInventory();
public native bool ShowEquipments();
public native bool IsInvSlotEmpty(int slot);
public native int GiveItem(
StoreItem item,
int quantity = 1,
AcquireMethod method = AcquireMethod_Unknown,
DateTime expiryDate = ZERO_DATETIME,
JSON_Object attributes = null,
bool save = true,
bool sound = true
);
public native void UseInvItem(int slot, bool backToPanel = true, StorePlayer target = STORE_INVALID_PLAYER);
public native void EquipInvItem(
int slot,
StoreEquipmentSlot equipSlot,
bool save = false,
bool sound = true,
StorePlayerSyncCB callback = INVALID_FUNCTION,
any data = 0
);
public native bool RemoveInvItemAttr(
int slot,
const char[] attribute,
bool save = true,
StorePlayerSyncCB callback = INVALID_FUNCTION,
any data = 0
);
public native any GetInvItemAttrValue(int slot, const char[] attribute, any defaultValue = 0);
public native bool SetInvItemAttrValue(
int slot,
const char[] attribute,
any value,
bool toNewSlot = true,
bool save = true,
int& newSlot = INVALID_INV_SLOT
);
// ...
}; enum PLSPlayer
{
PLS_INVALID_PLAYER = 0
};
methodmap PLSPlayer < AON_Client
{
public native void LevelUp(int amount = 1);
public native void RankUp(int amount = 1);
property PLSPlayerRole Role
{
public native get();
}
public native void SetRole(PLSPlayerRole role, DateTime expiryDate = ZERO_DATETIME, bool save = true);
public native int GetCustomRoleName(char[] buffer, int maxlength);
public native void SetCustomRoleName(const char[] value);
property RGBAColor CustomRoleColor1
{
public native get();
public native set(RGBAColor color);
}
property RGBAColor CustomRoleColor2
{
public native get();
public native set(RGBAColor color);
}
property PLSPlayerRank Rank
{
public native get();
}
property int EXP
{
public native get();
}
// ...
}; enum AON_Client
{
AON_INVALID_CLIENT = 0
};
methodmap AON_Client
{
public static native AON_Client FromMemberId(int id);
public native bool IsAuthorized();
public native bool IsDevModeEnabled();
property DateTime JoinDate
{
public native get();
}
property int MemberId
{
public native get();
}
public native TimeSpan GetTotalTime(bool currentSession = true);
public native bool GetFlagState(const char[] flag, bool defaultState = false);
public native void SetFlagState(const char[] flag, bool newState, bool save = true);
public native bool HasAttr(const char[] attribute);
public native bool RemoveAttr(const char[] attribute, bool save = true);
public native any GetAttrValue(const char[] attribute, any defValue = 0);
public native bool SetAttrValue(const char[] attribute, any value, bool save = true);
public native bool GetAttrBoolValue(const char[] attribute, bool defValue = false);
public native bool SetAttrBoolValue(const char[] attribute, bool value, bool save = true);
public native float GetAttrFloatValue(const char[] attribute, float defValue = 0.0);
public native bool SetAttrFloatValue(const char[] attribute, float value, bool save = true);
public native int GetAttrStringValue(const char[] attribute, char[] buffer, int maxlength, const char[] defValue = "");
public native int SetAttrStringValue(const char[] attribute, const char[] value, bool save = true);
public native JSON_Object GetAttrObjectValue(const char[] attribute, JSON_Object defValue = null);
public native bool SetAttrObjectValue(const char[] attribute, JSON_Object value, bool save = true);
property ArrayStack MenuData
{
public native get();
}
// ...
}; |
Basic informations
Further Information
Very often I see
Request textDocument/hover failed
error when hovering at something.For example:
But same code does not throw such errors if you move it to the main file.
Same
index out of bounds
error happens withRequest textDocument/completion failed
.This seems to happen only with methodmaps. didn't notice same errors for regular functions/callbacks.
Code to reproduce the behaviour
This is enough to reproduce the bug. This code must be moved to separate file for bug to appear.
Error messages
The text was updated successfully, but these errors were encountered: