Giter Site home page Giter Site logo

ayumax / objectdeliverer Goto Github PK

View Code? Open in Web Editor NEW
144.0 144.0 37.0 8.69 MB

ObjectDeliverer is a data transmission / reception library for Unreal Engine (C ++, Blueprint).

Home Page: https://www.unrealengine.com/marketplace/ja/slug/objectdeliverer

License: MIT License

C# 1.29% C++ 98.46% C 0.11% Batchfile 0.13%
blueprint shared-memory tcp udp unreal-engine

objectdeliverer's Introduction

Hi there πŸ‘‹

Windows Desktop Application Engineer.

I am developing an application for business use in C # (WPF).

I'm doing xR on UE4. I like C ++ of UE4 and have exhibited code plug-ins in "UE4 MarketPlace".

I sometimes bake bread as a hobby.

objectdeliverer's People

Contributors

ayumax avatar lehuan5062 avatar ningxiaoxiao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

objectdeliverer's Issues

Crash by OpenLevel blueprint

The plugin is great and works between PC and Oculus GO (Android) on UDP too.

But on Oculus GO (Android), with the UDP socket receiver, after then OpenLevel blueprint we often run into crash, with the following error log. (We use the 1.3.0 version.)
Do you have any suggestions what the problem is?

11-18 15:48:56.328 24541 25075 F libc : Fatal signal 11 (SIGSEGV), code 2, fault addr 0xe848f7c4 in tid 25075 (UProtoc-eceiver)
11-18 15:48:58.439 25080 25080 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
11-18 15:48:58.440 25080 25080 F DEBUG : Build fingerprint: 'oculus/vr_pacific/pacific:7.1.1/NGI77B/396520.5580.0:user/release-keys'
11-18 15:48:58.440 25080 25080 F DEBUG : Revision: '0'
11-18 15:48:58.440 25080 25080 F DEBUG : ABI: 'arm'
11-18 15:48:58.441 25080 25080 F DEBUG : pid: 24541, tid: 25075, name: UProtoc-eceiver >>> com.YourCompany.Oculus01 <<<
11-18 15:48:58.441 25080 25080 F DEBUG : signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0xe848f7c4
11-18 15:48:58.441 25080 25080 F DEBUG : r0 ffffffff r1 07ffffff r2 c0b8bdb8 r3 0000001f
11-18 15:48:58.441 25080 25080 F DEBUG : r4 00000000 r5 00000001 r6 00000000 r7 c848f7c8
11-18 15:48:58.441 25080 25080 F DEBUG : r8 c33556b0 r9 00000000 sl c2f91100 fp c848f868
11-18 15:48:58.441 25080 25080 F DEBUG : ip 00000000 sp c848f7c0 lr d4f146d0 pc d4f146ec cpsr 60070010
11-18 15:48:58.478 25080 25080 F DEBUG :
11-18 15:48:58.478 25080 25080 F DEBUG : backtrace:
11-18 15:48:58.478 25080 25080 F DEBUG : #00 pc 030776ec /data/app/com.YourCompany.Oculus01-1/lib/arm/libUE4.so (_ZN10FSocketBSD8HasStateE15ESocketBSDParam9FTimespan+156)
11-18 15:48:58.478 25080 25080 F DEBUG : #1 pc 03076b6c /data/app/com.YourCompany.Oculus01-1/lib/arm/libUE4.so (_ZN10FSocketBSD14HasPendingDataERj+48)
11-18 15:48:58.478 25080 25080 F DEBUG : #2 pc 0266d534 /data/app/com.YourCompany.Oculus01-1/lib/arm/libUE4.so (_ZN18FUdpSocketReceiver6UpdateERK9FTimespan+104)
11-18 15:48:58.479 25080 25080 F DEBUG : #3 pc 0266d358 /data/app/com.YourCompany.Oculus01-1/lib/arm/libUE4.so (_ZN18FUdpSocketReceiver3RunEv+36)
11-18 15:48:58.479 25080 25080 F DEBUG : #4 pc 028a05ec /data/app/com.YourCompany.Oculus01-1/lib/arm/libUE4.so (_ZN22FRunnableThreadPThread3RunEv+92)
11-18 15:48:58.479 25080 25080 F DEBUG : #5 pc 02865eb4 /data/app/com.YourCompany.Oculus01-1/lib/arm/libUE4.so (_ZN22FRunnableThreadPThread11_ThreadProcEPv+64)
11-18 15:48:58.479 25080 25080 F DEBUG : #6 pc 000478d3 /system/lib/libc.so (_ZL15__pthread_startPv+22)
11-18 15:48:58.479 25080 25080 F DEBUG : #7 pc 00019fe5 /system/lib/libc.so (__start_thread+6)
11-18 15:49:01.894 949 25087 W ActivityManager: Force finishing activity com.YourCompany.Oculus01/com.epicgames.ue4.GameActivity

UDP Connection: No disconnect events

Hello,

I'm using your plugin for UDP communication, I send MAVLink-protocol messages back and forth between two PCs. And it works beautifully.

But sometimes when I run the program in the UE Editor and then I stop the PIE (Play In Editor) the Editor halts, it doesn't crash but it just freezes.

I think that it might have to do with the UDP communication running in the GameInstance. So I tried to close everything (see image of the close function). And then I started wondering why I never get the "disconnected(receive)" message that is printed when "Disconnect_Event_0" is fired. The "Connected" events all fire and the "connected(receive)" string is written. For the SEND part the same things happen, no disconnected events are fired.

Do you have an idea why this might (or might not) happen?

Thanks & best
Andreas

To close the connections I use the following function:
CloseUDPConnection

This is how my RECEIVE stuff is set up (started from "Event Init" of the GameInstance):
StartUDPConnection

Creating UObjects while Collecting Garbage is not allowed

Writing this up now just in case anyone has a quick answer, but I'm getting this error while trying to receive JSON objects via UDP.

We are sending around a dozen requests per second. Not sure if that would have an impact.

I'll have a little investigate anyway

[2022.05.17-15.06.29:226][920]LogThreadingWindows: Error: Runnable thread ObjectDeliverer UDPSocket PollingThread crashed.
[2022.05.17-15.06.29:226][920]LogWindows: Error: === Critical error: ===
[2022.05.17-15.06.29:226][920]LogWindows: Error: 
[2022.05.17-15.06.29:226][920]LogWindows: Error: Assertion failed: !IsGarbageCollecting() [File:D:\build\++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectGlobals.cpp] [Line: 2441] 
[2022.05.17-15.06.29:226][920]LogWindows: Error: Unable to create new object: ProtocolUdpSocket /Engine/Transient.ProtocolUdpSocketReceiver_0.None. Creating UObjects while Collecting Garbage is not allowed!
[2022.05.17-15.06.29:226][920]LogWindows: Error: 
[2022.05.17-15.06.29:226][920]LogWindows: Error: 
[2022.05.17-15.06.29:226][920]LogWindows: Error: [Callstack] 0x00007ff94fd83fe4 UnrealEditor-CoreUObject.dll!UnknownFunction []
[2022.05.17-15.06.29:226][920]LogWindows: Error: [Callstack] 0x00007ff94fd85eee UnrealEditor-CoreUObject.dll!UnknownFunction []
[2022.05.17-15.06.29:226][920]LogWindows: Error: [Callstack] 0x00007ff8e0c194db UnrealEditor-ObjectDeliverer.dll!UProtocolUdpSocketReceiver::ReceivedData() [D:\build\U5M-Marketplace\Sync\LocalBuilds\PluginTemp\HostProject\Plugins\ObjectDeliverer\Source\ObjectDeliverer\Private\Protocol\ProtocolUdpSocketReceiver.cpp:115]
[2022.05.17-15.06.29:227][920]LogWindows: Error: [Callstack] 0x00007ff8e0c0be69 UnrealEditor-ObjectDeliverer.dll!UE::Core::Private::Function::TFunctionRefCaller<<lambda_8993b94d5aa4af31062aea6c2169b2be>,bool __cdecl(void)>::Call() [D:\RocketSync\5.0.0-19505902+++UE5+Release-5.0\Working\Engine\Source\Runtime\Core\Public\Templates\Function.h:539]
[2022.05.17-15.06.29:227][920]LogWindows: Error: [Callstack] 0x00007ff8e0c1bf28 UnrealEditor-ObjectDeliverer.dll!FODWorkerThread::Run() [D:\build\U5M-Marketplace\Sync\LocalBuilds\PluginTemp\HostProject\Plugins\ObjectDeliverer\Source\ObjectDeliverer\Private\Utils\ODWorkerThread.cpp:32]
[2022.05.17-15.06.29:227][920]LogWindows: Error: [Callstack] 0x00007ff942ba83ab UnrealEditor-Core.dll!UnknownFunction []
[2022.05.17-15.06.29:227][920]LogWindows: Error: [Callstack] 0x00007ff942ba13b0 UnrealEditor-Core.dll!UnknownFunction []
[2022.05.17-15.06.29:227][920]LogWindows: Error: [Callstack] 0x00007ff99c777034 KERNEL32.DLL!UnknownFunction []
[2022.05.17-15.06.29:227][920]LogWindows: Error: [Callstack] 0x00007ff99e742651 ntdll.dll!UnknownFunction []
[2022.05.17-15.06.29:227][920]LogWindows: Error: 
[2022.05.17-15.06.29:227][920]LogWindows: Error: Crash in runnable thread ObjectDeliverer UDPSocket PollingThread

UdpSocketReceiver crash if port is already in use

Hallo,

thanks again (I already communicated with you a while ago) for your nice plugin!

I have a small issue: Today I made a test with the following setup:

The Windows tool "Packet Sender" was running on my computer and listening as a server to localhost port 50569 for UDP communication.

Now I started my UE project using ObjectDeliverer as a server where I use CreateProtocolUdpSocketReceiver with the same port 50569 and then start the ObjectDelivererManager (all done in Blueprint).

I knew that it would fail because the port is already used. But I wanted to see how ObjectDeliverer would fail. :-)

Result: UE crashed, with the following crash info:

Assertion failed: Socket != nullptr [File:c:\program files\epic games\ue_4.22\engine\source\runtime\networking\public\Common/UdpSocketReceiver.h] [Line: 53]

UE4Editor_ObjectDeliverer_0001!UProtocolUdpSocketReceiver::Start() [c:\users\andreas.lepel\documents\unrealprojectssvn\testudp\plugins\objectdeliverer\source\objectdeliverer\private\protocol\protocoludpsocketreceiver.cpp:27]
UE4Editor_ObjectDeliverer_0001!UObjectDelivererManager::Start() [c:\users\andreas.lepel\documents\unrealprojectssvn\testudp\plugins\objectdeliverer\source\objectdeliverer\private\objectdeliverermanager.cpp:87]
UE4Editor_ObjectDeliverer_0001!UObjectDelivererManager::execStart() [c:\users\andreas.lepel\documents\unrealprojectssvn\testudp\plugins\objectdeliverer\source\objectdeliverer\public\objectdeliverermanager.h:23]
UE4Editor_CoreUObject

Maybe check the pointer and give an error, or abort gracefully?

As I wrote, this was only a test and will not happen frequently, but I thought I should tell you.

Best from Munich
Andreas

bit out of my depth

I really believe this plugin is what I need to solve an issue for my project.
does anyone have some expertise with this to help me out with some questions, with ingrating with my game Creative Continents on Steam?

Sending Data from Dereferenced Object that was spawned at Runtime freezes UE

Hi there and thank you for your awesome work!
I am using your plugin to synchronize changes to Procedural Meshes between Clients at runtime and for the most part it works beautifully. However, I encountered an issue, when the ProceduralMeshComponent was spawned at Runtime. The following Code works fine for PMCs that were spawned at launch but completely freezes the Unreal Engine if the PMC was spawned at Runtime. Maybe you have an idea how this can be solved.

FProcMeshSection* Section = PMC->GetProcMeshSection(Index);
PMCData->ChangedSections.Add(*Section);
ObjectDeliveryBox->SendTo(PMCData, From, SendStr);

There is no freeze without line 2 and also no freeze without line 3. Also other data from the PMC gets send just fine without freezes. So I think it has to be the Derefencing something that was spawned at Runtime.

Regards, Heiner

How to print Received Strings?

Hello, first of all: Thanks so much for your work. It looks a pretty cool plugin.

I ran your sample scene (UDP) and it seems that I send the count correctly.
But when I try to send something from my external application I just see my local IP in the print msg.
I'd like to know how can I print or where I can see my message as a string.
Sorry for the dumb question like this one. But I'm very new to UE4.

thanks

Remodeling UObjectJsonSerializer

Change the structure of UObjectJsonSerializer so that users can easily customize it.
Once created, you can modify ObjectDeliveryBoxUsingJson or create a new DeliveryBox.

How to perform valid UDP bidirectional connection

Hello, for some time i still facing the same issue, but for now i moved from local (which i fixed in past, and even my local wifi network), but for now i facing a mobile hotspot.

My issue is still the same, i can't create a valid bidirectional client-server udp communication.

The client is behind the NAT and makes traversing the ports, i know what the issue is.

There should be

  • message from client to server
  • client should listening on that port which used
  • server should response messages to same port from which client send message

But the problem is i don't know on what port i should listen and also, if i try listen to same port which i bound for sender, it failed because is already in use.

Do i something wrong? It just seems for me I something missleading, cause this must be most trivial thing, which is for sure implemented somehow.

Can you please help me with some response, cause i just can't get it worked.

Receiving UDP data in UE5

Hello - I downloaded the sample project, and am able to send UDP data using the UDP sample level (thanks for providing that!) However, for some reason I am unable to receive UDP data using the provided sample blueprint widgets. I can see in Wireshark that the data is coming through on the correct IP address and on the port that's set in the widget (8000), but nothing seems to be coming through in UE5. Are there any additional configuration steps needed to get UDP receiving working? Thanks for the great plugin!

image

Use with Steam OnlineSubSystem

Hello!
I am using Steam for multiplayer.
So when a client connects, after connection to the server it then connects to the second port too through TCP.
It works fine normally, but with Steam's network OSS it fails
I'm assuming that for obvious security reason, the server needs to tell Steam to accept connection on both port, but I have no clue how to actually allow the second connection?
Or is it automatic with FSocket and the answer is somewhere else?

PS : When I connect I correctly user steam.123123123 as the IP

When receiving big messages (> 7000 bytes) it seems that the receive event returns a partial buffer first

I think this is a bug, or maybe I'm misusing it.

I'm trying to receive big messages (>300kb) with a TCP server in Blueprint. I normally can receive small messages by inspecting the TArray returned by the ReceiveObject blueprint event.

But when the received message is big, the TArray is returned with less bytes than the message sent to the server, and after a first return, another event is triggered, which yield the remaining bytes in the TArray. But my application needs the full message in the buffer (or if this behaviour is intended, I should have any means to know that the message is split, and that I must wait the remaining bytes).

My server is configured with PacketRuleNodivision, and default options.

JSON Object for Classes which contain nested arrays of Objects.

Hello,

Thank you for making this plugin, it is doing a lot of great things.

However, I am having an issue with the JSON data I am sending and receiving with a custom class. This custom class contains some Arrays of other custom classes which also contain arrays of other custom classes. When I print the JSON as a string or to the log, the data doesn't look like the intended format and instead it almost appears as each element in the array is just a file.

Would love if you can provide some feedback on this. I have included a screenshot of the output.

Please let me know if you need a better explaination.
ObjectDelivererLog

cant receive any response from udp server

Hellou, basically I can sent packets with success to my node.js udp server, but i cant successfully receive packet back from the server.

And i mean ANY packet, i tried all of the variants and event is basically never fired :/ Checked by WireShark that packets are really send to valid ports.

Is there any example for server + project which works?

Can't read messages from external TCP client

Hi! First, thanks for your effort!

I'm testing the sample TCP server application, and I can send messages from client 1 and 2, which are received by the server and received data is printed.

But if I try to send a packet from applications like Swiddler or Packet Sender, the receive callback from the server seems to do nothing. The breakpoint set on the server's receive event is not hit.

Sniffing with Wireshark, I can see that the packet is sent and the server replies with ACK, but the data is not displayed on Unreal log, like with the clients 1 and 2 from the sample. (I've added some print blocks to log the messages received
github question
, the original example didn't have that)

What can be happening?

Garbage in the message

Hello!
I ran a sample project ObjectDelivererTest and for testing the connection I used Hercules. I tried to send a message, but a PrintString did not display anything. While in the UE itself, messages arrive.
On the UE server Deliveler Packet Rule used "Rule Size Body" with SizeLength 4 and SizeBufferEndian Big. DeliveryBox is Utf8StringDeliveryBox.
I suspect that Hercules does not add the size of the message in the header. Then I wrote a simple client on Qt and it partially worked.
The problem is that in most cases there is garbage at the end of the message. I can not understand why.
ObjectDelivelerError

Crash on receiving data throught TCP

When using the latest version from Github with UE 4.26.1 the game runs fine on localhost, but crashes on remote (see below).
I am using Header size + body TCP IP server.

When it happens my ODByteSpan 's Buffer look fine but the Length is negative...

image

image

image

Want to use this plug-in on ue5

Want plug-in support for ue5 version.I prefer the new effect (but the external data cannot enter the engine normally. I hope there is an update.Support ue5

Can not build on 4.25.4

It shows "ObjectDeliverTest could not be compiled. Try rebuilding from source manually."
Any idears? Thanks for your sharing

TCP/IP Client disconnects after 30-60 seconds

Hello!

I'm using a really basic network client using ObjectDeliverer with the TCP/IP Client protocol and the PacketRuleSizeBody rule. It all works really well (I let the game send the player position 10 times per second to the server) until the client disconnects after some time without any error or message.

Would appreciate help!

EDIT: I quickly made an empty node.js TCP server just to make sure the problem is on the client side, and it really is. The connection disconnects with the RESET flag after some time...

Result of TCP/IP Client connect

Hello!

ObjectDeliverer working really well, thank your for that!

But how do I get the result of the ObjectDelivererManager::Start Method to know whether the client successfully connected to the server or not and if not then also the reason of the connection failure.

Thanks in advance

ObjectDeliverer for 4.27?

Hi,
I'm still a very happy user of your plugin, and I will now switch to Unreal 4.27.
I can see that you weren't able to invest much work into the plugin in the last months - and I completely understand, as you don't even charge money for it (and even if you did I guess the returns from the Marketplace earnings would be very small).

Question: Do you still plan to maintain the project and update it for new versions? Or should I try to recompile it myself for 4.27 and hope for the best?

Thanks again for your effort,
best from Germany
Andreas

Can't broadcast UDP on Android

I can broadcast UDP packet with my PC using this submask IP address: 192.168.1.255

Unfortunately, this IP doesn’t work on Android.

Β 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.