Skip to content
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

JObject lose string value when using IPC to subscribe events & receive data #114

Open
PatchouliTC opened this issue Oct 14, 2024 · 1 comment

Comments

@PatchouliTC
Copy link

After I read overlayplugin source code,I try to use IPC to subscribe receive data form overlayplugin;
I follow source code, after I call CreateSubscriber(name),I make Svc.PluginInterface.GetIpcSubscriber<JObject, bool>($"IINACT.IpcProvider.{name}") and then send payload to subscribe "CombatData"
code like that:

var commandSender = Svc.PluginInterface.GetIpcSubscriber<JObject, bool>($"IINACT.IpcProvider.{Name}");
var payload = JObject.FromObject(new
{
    call = "subscribe",
    events = new string[]{"CombatData"},
    data = new string[]{"CombatData"},
});
commandSender.InvokeAction(payload);
//receive ignore it

but then i saw logs happend nullreference exception;
so i add some log print into mycode and iinact-overlayplugin-DataReceived(JObject data),
and i find this:
this is what i prepare send to data looks like:
image
and this is what logs print that DataReceived(JObject data) data looks like:
bd8c14e4e7933dd070c6c4f8d670dfef
It seems that dalamoud IPC will list information if use JObject,all string data are miss;
and then I changed overlayplugin IPCHandler,all JObject change to string,and every thing works fine instantly:
image

so I think maybe should change JObject to string like SocketHandler did?(serialize&deserialize to string)

@marzent
Copy link
Owner

marzent commented Nov 26, 2024

This used to work for sure, I'll try to see how it did fail...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants