PacketPeerUDP does not work after exporting

fberthautfberthaut Posts: 4Member

Hi everyone,

I am working on a project that uses PacketPeerUDP to send/receive OpenSoundControl messages (we reimplemented packing / unpacking osc messages in GDscript instead of using for example the GdOSC addon).

Everything works fine when running from the editor.
However once exported, the application freezes when it tries to send the first packet (using put_packet), on both GNU/Linux and MacOSX, with CPU usage at ~90%.

We're also using the Enet high-level networking in the same project and this part works fine in the export, so it really seems that the issue is limited to the low-level PacketPeerUDP.

Has anyone had the same issue ?

Thanks in advance,

flo

Best Answer

  • fberthautfberthaut Posts: 4
    edited July 2 Accepted Answer

    Ok, so after more testing it looks like the bug was not in PacketPeerUDP but in our code.

    The error is however strange :

    We have a while loop which added a character to a string until the length was a multiple of 4, but for some reason the length never increases when running in export, while it does when running from the editor.

    Thank you for the help.

Answers

  • TwistedTwiglegTwistedTwigleg Posts: 2,831Admin

    Welcome to the forums @fberthaut!

    This sounds like it could be a bug. If you run the exported game from the terminal, does it show any errors?

    Also:


    This discussion was caught in the moderation queue since you have not confirmed your account yet.

    Upon creating your account you should have received an account verification email. The confirmation email may have been incorrectly flagged as spam, so please also check your spam filter. Without confirming your account, future posts may also be caught in the moderation queue. You can resend a confirmation email when you log into your account if you cannot find the first verification email.

    If you need any help, please let us know! You can find ways to contact forum staff on the Contact page. Thanks! :smile:

  • fberthautfberthaut Posts: 4Member

    Thank you @TwistedTwigleg
    The confirmation email took some time to arrive but that's done now.

    I tried to run it from the terminal but i'm not getting any errors.

    Regards,

    flo

  • fberthautfberthaut Posts: 4Member
    edited July 2 Accepted Answer

    Ok, so after more testing it looks like the bug was not in PacketPeerUDP but in our code.

    The error is however strange :

    We have a while loop which added a character to a string until the length was a multiple of 4, but for some reason the length never increases when running in export, while it does when running from the editor.

    Thank you for the help.

  • TwistedTwiglegTwistedTwigleg Posts: 2,831Admin

    I’m glad you were able to figure out what was going on :)

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file