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

Crashing and lag spikes. #190

Open
tria97 opened this issue Feb 26, 2023 · 1 comment
Open

Crashing and lag spikes. #190

tria97 opened this issue Feb 26, 2023 · 1 comment

Comments

@tria97
Copy link

tria97 commented Feb 26, 2023

Hello everyone.
When I run my project after setting the "MyROSIntegrationGameInstance" the project gets massive lagspikes about every second, which correspond to the log below.

image

This is the case when I am using the default 127.0.0.1 ROSBridge Server Host value.

If I actually change that and use, for example, the IP of the virtualbox ubuntu instance in which I am hosting ROS, (192.168.42.247/24)
the result is an instant crash upon game startup. This is not specific to this IP. Everything I've tried except 127.0.0.1 causes the instant crash issue.

image

image

The above is from running the built win64 game.

If I run the game inside the engine as a "standalone game" I get some more specific crash logs.

image

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x0000000000000000

UE4Editor_ROSIntegration!TCPConnection::SendMessage() [E:\VR_robot_2\Plugins\ROSIntegration\Source\ROSIntegration\Private\rosbridge2cpp\TCPConnection.cpp:79]
UE4Editor_ROSIntegration!rosbridge2cpp::ROSBridge::SendMessage() [E:\VR_robot_2\Plugins\ROSIntegration\Source\ROSIntegration\Private\rosbridge2cpp\ros_bridge.cpp:81]
UE4Editor_ROSIntegration!rosbridge2cpp::ROSTopic::Advertise() [E:\VR_robot_2\Plugins\ROSIntegration\Source\ROSIntegration\Private\rosbridge2cpp\ros_topic.cpp:94]
UE4Editor_ROSIntegration!UTopic::Advertise() [E:\VR_robot_2\Plugins\ROSIntegration\Source\ROSIntegration\Private\Topic.cpp:241]
UE4Editor_ROSIntegration!UROSIntegrationGameInstance::Init() [E:\VR_robot_2\Plugins\ROSIntegration\Source\ROSIntegration\Private\ROSIntegrationGameInstance.cpp:126]
UE4Editor_Engine
UE4Editor
UE4Editor
UE4Editor
UE4Editor
UE4Editor
kernel32
ntdll

Is this the default behavior? An instant crash upon startup because no ROSbridge connection was established?

@tsender
Copy link
Contributor

tsender commented Mar 25, 2023

Hi @tria97. A few things to keep in mind.

It is unclear from your setup, but remember that 127.0.0.1 means localhost and implies your rosbridge is also running on the same machine. Also, do NOT combine the port with the IP address as x.x.x.x/y. These are configured separately, hence the two parameters. In your case, your IP address is 192.168.42.247 and the port is 24.

If no connection to rosbridge can be made, then the game simply will not "run as usual". Every second it will try to reconnect, hence why you constantly see such logging output.

Finally, I think I addressed the Exception Access Violation issue in my recent PR, as I had some weird problems on shutdown that resulted in crashing.

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