Photon Realtime example problem

Hi!

I’m checking out the Photon Realtime extension, but it’s crashing:

INFO:DLIB: Log server started on port 43807
INFO:ENGINE: Target listening with name: pawel-Nitro-AN16-41 - 127.0.1.1 - Linux
INFO:ENGINE: Engine service started on port 41161
INFO:GRAPHICS: Installed graphics device 'ADAPTER_FAMILY_OPENGL'
INFO:ENGINE: Defold Engine 1.10.4 (1aafd0a)
INFO:PROFILER: Initialized Remotery (ws://127.0.0.1:17815/rmt)
INFO:ENGINE: Loading data from: build/default
INFO:REALTIME: Registered realtime Extension
INFO:SOUND:   DSP backend: SSE
INFO:SOUND: Sound
INFO:SOUND:   nSamplesPerSec:   48000
INFO:ENGINE: Initialised sound device 'default'
INFO:REALTIME: init
INFO:CRASH: Successfully wrote Crashdump to file: /home/pawel/snap/steam/common/.Defold/_crash
ERROR:CRASH: CALL STACK:

ERROR:CRASH: /home/pawel/Dokumenty/defold/extension-photon-realtime/build/x86_64-linux/dmengine(+0x34a404) [0x633859e7b404]
ERROR:CRASH: /usr/lib/pressure-vessel/overrides/lib/x86_64-linux-gnu/libc.so.6(+0x42520) [0x7ced3817c520]
ERROR:CRASH: /home/pawel/Dokumenty/defold/extension-photon-realtime/build/x86_64-linux/dmengine(+0x485818) [0x633859fb6818]
ERROR:CRASH: /home/pawel/Dokumenty/defold/extension-photon-realtime/build/x86_64-linux/dmengine(+0x48159e) [0x633859fb259e]
ERROR:CRASH: /home/pawel/Dokumenty/defold/extension-photon-realtime/build/x86_64-linux/dmengine(+0x484377) [0x633859fb5377]
ERROR:CRASH: /home/pawel/Dokumenty/defold/extension-photon-realtime/build/x86_64-linux/dmengine(+0x44384d) [0x633859f7484d]
ERROR:CRASH: /home/pawel/Dokumenty/defold/extension-photon-realtime/build/x86_64-linux/dmengine(+0x23fde6) [0x633859d70de6]
ERROR:CRASH: /home/pawel/Dokumenty/defold/extension-photon-realtime/build/x86_64-linux/dmengine(+0x22800c) [0x633859d5900c]
ERROR:CRASH: /home/pawel/Dokumenty/defold/extension-photon-realtime/build/x86_64-linux/dmengine(+0x1faf4d) [0x633859d2bf4d]
ERROR:CRASH: /home/pawel/Dokumenty/defold/extension-photon-realtime/build/x86_64-linux/dmengine(+0x8d6d1) [0x633859bbe6d1]
ERROR:CRASH: /home/pawel/Dokumenty/defold/extension-photon-realtime/build/x86_64-linux/dmengine(+0x8d820) [0x633859bbe820]
ERROR:CRASH: /home/pawel/Dokumenty/defold/extension-photon-realtime/build/x86_64-linux/dmengine(+0x78280) [0x633859ba9280]
ERROR:CRASH: /home/pawel/Dokumenty/defold/extension-photon-realtime/build/x86_64-linux/dmengine(+0x79f6c) [0x633859baaf6c]
ERROR:CRASH: /home/pawel/Dokumenty/defold/extension-photon-realtime/build/x86_64-linux/dmengine(+0x5ac55) [0x633859b8bc55]
ERROR:CRASH: /home/pawel/Dokumenty/defold/extension-photon-realtime/build/x86_64-linux/dmengine(+0x5c0a0) [0x633859b8d0a0]
ERROR:CRASH: /home/pawel/Dokumenty/defold/extension-photon-realtime/build/x86_64-linux/dmengine(+0x579b1) [0x633859b889b1]
ERROR:CRASH: /home/pawel/Dokumenty/defold/extension-photon-realtime/build/x86_64-linux/dmengine(+0x57921) [0x633859b88921]
ERROR:CRASH: /usr/lib/pressure-vessel/overrides/lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x7ced38163d90]
ERROR:CRASH: /usr/lib/pressure-vessel/overrides/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80) [0x7ced38163e40]
ERROR:CRASH: /home/pawel/Dokumenty/defold/extension-photon-realtime/build/x86_64-linux/dmengine(+0x57715) [0x633859b88715]
ERROR:CRASH: Lua Callstack:
ERROR:CRASH:   example/client.lua:11: in function init
ERROR:CRASH:   example/game.script:35: in function <example/game.script:27>
ERROR:CRASH: 

_crash.zip (1.0 KB)

In the Manual (Photon Realtime) there is a link to refer to for Example, but it’s 404:

https://github.com/defold/extension-photon-realtime/blob/master/examples

I created a Photon account and have an App ID, but neither the one from example nor mine is helping. I also changed “app_version” to “1.0.0”, because it might not accept empty string, but still crashing.

2 Likes

Thanks. I fixed the broken link (it should be master/example and not master/examples)

Hmm, that’s not a very helpful callstack… Anyway, line 11 in client.lua is calling realtime.init() so it’s safe to assume that the crash happens in there somewhere.

Could you please try something for me and download the Photon Realtime Linux SDK from here: 403 - No Access! | Photon Engine (you need to be logged in) and then replace the release libs with debug versions and then try the example again?

Replace these:

WIth these:

1 Like

Photon Realtime in Defold? How could I have missed this! :face_with_monocle: :grin:

It was announced yesterday :slight_smile:

1 Like

I replaced the libs with ...Debug64.a:

INFO:DLIB: Log server started on port 40639
INFO:ENGINE: Target listening with name: pawel-Nitro-AN16-41 - 127.0.1.1 - Linux
INFO:ENGINE: Engine service started on port 45917
INFO:GRAPHICS: Installed graphics device 'ADAPTER_FAMILY_OPENGL'
INFO:ENGINE: Defold Engine 1.10.4 (1aafd0a)
INFO:PROFILER: Initialized Remotery (ws://127.0.0.1:17815/rmt)
INFO:ENGINE: Loading data from: build/default
INFO:REALTIME: Registered realtime Extension
INFO:SOUND:   DSP backend: SSE
INFO:SOUND: Sound
INFO:SOUND:   nSamplesPerSec:   48000
INFO:ENGINE: Initialised sound device 'default'
DEBUG:SCRIPT: Listening for debugger on 0.0.0.0
DEBUG:SCRIPT: Debugger connected from 127.0.0.1
INFO:REALTIME: init
INFO:CRASH: Successfully wrote Crashdump to file: /home/pawel/snap/steam/common/.Defold/_crash
ERROR:CRASH: CALL STACK:

ERROR:CRASH: /home/pawel/Dokumenty/defold/extension-photon-realtime/build/x86_64-linux/dmengine(+0x34a404) [0x5fe072a8b404]
ERROR:CRASH: /usr/lib/pressure-vessel/overrides/lib/x86_64-linux-gnu/libc.so.6(+0x42520) [0x74e758e0e520]
ERROR:CRASH: /home/pawel/Dokumenty/defold/extension-photon-realtime/build/x86_64-linux/dmengine(+0x485818) [0x5fe072bc6818]
ERROR:CRASH: /home/pawel/Dokumenty/defold/extension-photon-realtime/build/x86_64-linux/dmengine(+0x48159e) [0x5fe072bc259e]
ERROR:CRASH: /home/pawel/Dokumenty/defold/extension-photon-realtime/build/x86_64-linux/dmengine(+0x484377) [0x5fe072bc5377]
ERROR:CRASH: /home/pawel/Dokumenty/defold/extension-photon-realtime/build/x86_64-linux/dmengine(+0x44384d) [0x5fe072b8484d]
ERROR:CRASH: /home/pawel/Dokumenty/defold/extension-photon-realtime/build/x86_64-linux/dmengine(+0x23fde6) [0x5fe072980de6]
ERROR:CRASH: /home/pawel/Dokumenty/defold/extension-photon-realtime/build/x86_64-linux/dmengine(+0x22800c) [0x5fe07296900c]
ERROR:CRASH: /home/pawel/Dokumenty/defold/extension-photon-realtime/build/x86_64-linux/dmengine(+0x1faf4d) [0x5fe07293bf4d]
ERROR:CRASH: /home/pawel/Dokumenty/defold/extension-photon-realtime/build/x86_64-linux/dmengine(+0x8d6d1) [0x5fe0727ce6d1]
ERROR:CRASH: /home/pawel/Dokumenty/defold/extension-photon-realtime/build/x86_64-linux/dmengine(+0x8d820) [0x5fe0727ce820]
ERROR:CRASH: /home/pawel/Dokumenty/defold/extension-photon-realtime/build/x86_64-linux/dmengine(+0x78280) [0x5fe0727b9280]
ERROR:CRASH: /home/pawel/Dokumenty/defold/extension-photon-realtime/build/x86_64-linux/dmengine(+0x79f6c) [0x5fe0727baf6c]
ERROR:CRASH: /home/pawel/Dokumenty/defold/extension-photon-realtime/build/x86_64-linux/dmengine(+0x5ac55) [0x5fe07279bc55]
ERROR:CRASH: /home/pawel/Dokumenty/defold/extension-photon-realtime/build/x86_64-linux/dmengine(+0x5c0a0) [0x5fe07279d0a0]
ERROR:CRASH: /home/pawel/Dokumenty/defold/extension-photon-realtime/build/x86_64-linux/dmengine(+0x579b1) [0x5fe0727989b1]
ERROR:CRASH: /home/pawel/Dokumenty/defold/extension-photon-realtime/build/x86_64-linux/dmengine(+0x57921) [0x5fe072798921]
ERROR:CRASH: /usr/lib/pressure-vessel/overrides/lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x74e758df5d90]
ERROR:CRASH: /usr/lib/pressure-vessel/overrides/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80) [0x74e758df5e40]
ERROR:CRASH: /home/pawel/Dokumenty/defold/extension-photon-realtime/build/x86_64-linux/dmengine(+0x57715) [0x5fe072798715]
ERROR:CRASH: Lua Callstack:
ERROR:CRASH:   example/client.lua:11: in function init
ERROR:CRASH:   example/game.script:35: in function <example/game.script:27>
ERROR:CRASH: 

It looks same as above, crash happens after INFO:REALTIME: init

Created issue: Linux crash · Issue #1 · defold/extension-photon-realtime · GitHub

1 Like

What’s up guys. I came across with the same issue. Any thoughts on how to fix ?

We use prebuilt libraries provided by ExitGames/Photon. It seems like there’s some kind of incompatibility on Linux or something. We need to check the Linux SDK and see if there’s anything in the release notes or build instructions or something which could revearl what’s wrong.

Hello! Many thanks for your quick reaction on this issue. I want to share some thoughts.
Please, look at the stack trace when SIGSEGV is happened.

at the frame 2 you can see constructor of JString class and its arg is char const*

and look at the header

Maybe something with this ?

Bjorn , I’ve downloaded photonsdk 403 - No Access! | Photon Engine ……then built this demo from sources via makefile

and all works well