A game failing to run in the web-player

I have a web-build up and working, but have hit a problem: it seems to only work under Windows.

Under Ubuntu (when using Firefox – the plugin doesn’t seem to load in Chromium), the plugin seems to load, downloading various files and then displaying a Panda logo with a “play” button. Clicking the button, however, results first in the plugin screen becoming black – which is somewhat expected – then solid grey – which is not. Nothing further seems to happen. :confused:

The following are the log files that seems to be produced by running the plugin on one of my machines. I see a few warnings and the like, but don’t really know what I’m looking for, or what might be serious. Does anyone know what might be the problem, and how to rectify it?

p3dsession.log
This one does have a warning about the FBConfig context – is that serious?

:HostInfo: Downloading contents file [ https://runtime.panda3d.org/contents.xml?1377182619 ]

:downloader: [0x8d49eb0] begin GET [ https://runtime.panda3d.org/contents.xml?1377182619 ]
:HostInfo(warning): Successfully downloaded https://runtime.panda3d.org/contents.xml?1377182619
:AppRunner: Total Panda3D disk space used: 184 MB
:AppRunner: Configured max usage is: 2048 MB
DirectStart: Starting the game.
Known pipe types:
  glxGraphicsPipe
(1 aux display modules not yet loaded.)
:display:glxdisplay(warning): No suitable FBConfig contexts available; using XVisual only.
depth_bits=24 color_bits=24 alpha_bits=8 stencil_bits=8 back_buffers=1 force_hardware=1 

p3dplugin.log

Initializing Panda3D plugin version 1.0.4
browserFuncs = 0xb7507a20
NP_GetEntryPoints, pluginFuncs = 0xb3553d9c
Browser NPAPI version 0.27
Plugin compiled with NPAPI version 0.27
new instance 0xb35c82c8
new instance->pdata = 0xb3597000
Plugin is built with https://runtime-dev.panda3d.org/
read contents.xml, max_age = 5, expires in 0 s
start_download: https://runtime-dev.panda3d.org/contents.xml?1377182603
GetValue 14
browser supports_xembed: 1
plugin supports_xembed: 1
GetValue 14
browser supports_xembed: 1
plugin supports_xembed: 1
SetWindow 280, 93, 800, 500
original XID is 0x3403531, created X11 window 62914563
Started twirl subprocess, pid 2565
SetWindow 280, 93, 800, 500
NewStream application/x-panda3d: 0xb3523374, https://dl.dropboxusercontent.com/u/58334662/moonDemo.p3d, size = 9070412, notifyData = 0, for 0xb35c82c8, 0xb3597000
Opening /tmp/p3d_WJvUPF
DestroyStream: 0xb3523374, https://dl.dropboxusercontent.com/u/58334662/moonDemo.p3d, notifyData = 0xb35addf0, reason = 0, for 0xb35c82c8, 0xb3597000
NewStream application/xml: 0xb3523374, https://runtime-dev.panda3d.org/contents.xml?1377182603, size = 80170, notifyData = 0xb35c47a0, for 0xb35c82c8, 0xb3597000
Opening /tmp/p3d_jf87Ym
DestroyStream: 0xb3523374, https://runtime-dev.panda3d.org/contents.xml?1377182603, notifyData = 0xb35c47a0, reason = 0, for 0xb35c82c8, 0xb3597000
URLNotify: https://runtime-dev.panda3d.org/contents.xml?1377182603, notifyData = 0xb35c47a0, reason = 0
read contents.xml, max_age = 5, expires in 5 s
Attempting to load core API from /home/ian/.panda3d/coreapi/linux_i386/p3d_plugin.so
Twirl window process has successfully stopped.
  signalled by 9, core = 0
p3d instance to stream 2
Sending 9070412 preliminary bytes of 9070412 total p3d data
sent 0 bytes.
Deleting /tmp/p3d_WJvUPF
start_download: https://runtime.panda3d.org/contents.xml?1377182608
NewStream application/xml: 0xb3523374, https://runtime.panda3d.org/contents.xml?1377182608, size = 73170, notifyData = 0xb0c11640, for 0xb35c82c8, 0xb3597000
DestroyStream: 0xb3523374, https://runtime.panda3d.org/contents.xml?1377182608, notifyData = 0xb0c11640, reason = 0, for 0xb35c82c8, 0xb3597000
URLNotify: https://runtime.panda3d.org/contents.xml?1377182608, notifyData = 0xb0c11640, reason = 0
SetWindow 280, 93, 800, 500
original XID is 0x3403531, created X11 window 62914607
destroy instance 0xb35c82c8, 0xb3597000
save = 0
Deleting /tmp/p3d_jf87Ym
shutdown

p3dcore.log

_root_dir = /home/ian/.panda3d, _temp_directory = /tmp/, platform = linux_i386, host_url = https://runtime-dev.panda3d.org/, verify_contents = 1
api_version = 16
read contents.xml, max_age = 5, expires in 5 s
Supported platforms: linux_i386
Plugin version: 1.0.4
Plugin distributor: cmu
Core API host URL: https://runtime-dev.panda3d.org/
Core API version: 1.9.0
Core API date: Wed Jun 12 15:43:08 2013

Creating P3DInstance 0xb0e6b000:  data="moonDemo.p3d" type="application/x-panda3d" height="500" width="800" src="moonDemo.p3d"
setting background to download, splash_window = 0
_per_platform for images = 0
Warning! per_platform disagreement for images!
All 8 extracts of images seem good.
report_package_info_ready: images
Done installing images: success = 1
set_browser_script_object
origin is https://dl.dropboxusercontent.com:443
p3d_basename = moonDemo.p3d
make_temp_filename: /tmp/p3d_bf7493.p3d
Downloading https://dl.dropboxusercontent.com/u/58334662/moonDemo.p3d: 0%, 0xb35c83e0
Downloaded https://dl.dropboxusercontent.com/u/58334662/moonDemo.p3d: 100%, 0xb35c83e0, success = 1
send_notify(onpluginload)
looking in /home/ian/.panda3d/certs/9370847066d0
p3d trusted
_matches_run_origin = 1
_matches_script_origin = 0
_auto_install = 1, _auto_start = 0, _stop_on_ready = 0
send_notify(onauth)
No longer current: panda3d
read contents.xml, max_age = 5, expires in 0 s
make_temp_filename: /tmp/p3d_791456.xml
set_wparams: 0 800 500
image_filename = /home/ian/.panda3d/hosts/runtime-dev.panda3d.org_6c875ad6f852d272/images/download.png
notify: onpluginload 
notify: onauth 
Downloading https://runtime.panda3d.org/contents.xml?1377182608: 22.3%, 0xb3564600
Downloaded https://runtime.panda3d.org/contents.xml?1377182608: 100%, 0xb3564600, success = 1
read contents.xml, max_age = 5, expires in 5 s
release_temp_filename: /tmp/p3d_791456.xml
Migrating panda3d from platform "" to platform "linux_i386"
_per_platform for panda3d = 0
All 75 extracts of panda3d seem good.
report_package_info_ready: panda3d
panda3d: asked for seq 2, we have seq 2
openal: asked for seq 2, we have seq 2
_per_platform for openal = 0
All 3 extracts of openal seem good.
report_package_info_ready: openal
panda3d: asked for seq 1, we have seq 2
morepy: asked for seq 2, we have seq 2
_per_platform for morepy = 0
All 34 extracts of morepy seem good.
report_package_info_ready: morepy
panda3d: asked for seq 1, we have seq 2
Beginning install of 0 packages, total 0 bytes required (30328781 previously downloaded).
send_notify(ondownloadbegin)
send_notify(ondownloadcomplete)
send_notify(onready)
setting background to ready, splash_window = 0xb0e6b400
image_filename = /home/ian/.panda3d/hosts/runtime-dev.panda3d.org_6c875ad6f852d272/images/download.png
setting button to play_ready
image_filename = /home/ian/.panda3d/hosts/runtime-dev.panda3d.org_6c875ad6f852d272/images/play_ready.png
image_filename = /home/ian/.panda3d/hosts/runtime-dev.panda3d.org_6c875ad6f852d272/images/play_rollover.png
image_filename = /home/ian/.panda3d/hosts/runtime-dev.panda3d.org_6c875ad6f852d272/images/play_click.png
notify: ondownloadbegin 
notify: ondownloadcomplete 
notify: onready 
Play button clicked by user
setting button to none
setting background to launch, splash_window = 0xb0e6b400
image_filename = /home/ian/.panda3d/hosts/runtime-dev.panda3d.org_6c875ad6f852d272/images/download.png
Search path is /home/ian/.panda3d/hosts/runtime.panda3d.org_0f5faf88846080ae/morepy/cmu_1.8:/home/ian/.panda3d/hosts/runtime.panda3d.org_0f5faf88846080ae/openal/cmu_1.8:/home/ian/.panda3d/hosts/runtime.panda3d.org_0f5faf88846080ae/panda3d/cmu_1.8
_p3dpython_exe: /home/ian/.panda3d/hosts/runtime.panda3d.org_0f5faf88846080ae/panda3d/cmu_1.8/p3dpython
Setting environment:
  HOME=/home/ian
  USER=ian
  DISPLAY=:0
  XAUTHORITY=/home/ian/.Xauthority
  PATH=/home/ian/.panda3d/hosts/runtime.panda3d.org_0f5faf88846080ae/morepy/cmu_1.8:/home/ian/.panda3d/hosts/runtime.panda3d.org_0f5faf88846080ae/openal/cmu_1.8:/home/ian/.panda3d/hosts/runtime.panda3d.org_0f5faf88846080ae/panda3d/cmu_1.8:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
  LD_LIBRARY_PATH=/home/ian/.panda3d/hosts/runtime.panda3d.org_0f5faf88846080ae/morepy/cmu_1.8:/home/ian/.panda3d/hosts/runtime.panda3d.org_0f5faf88846080ae/openal/cmu_1.8:/home/ian/.panda3d/hosts/runtime.panda3d.org_0f5faf88846080ae/panda3d/cmu_1.8:/usr/lib/firefox
  DYLD_LIBRARY_PATH=/home/ian/.panda3d/hosts/runtime.panda3d.org_0f5faf88846080ae/morepy/cmu_1.8:/home/ian/.panda3d/hosts/runtime.panda3d.org_0f5faf88846080ae/openal/cmu_1.8:/home/ian/.panda3d/hosts/runtime.panda3d.org_0f5faf88846080ae/panda3d/cmu_1.8
  PYTHONPATH=/home/ian/.panda3d/hosts/runtime.panda3d.org_0f5faf88846080ae/morepy/cmu_1.8:/home/ian/.panda3d/hosts/runtime.panda3d.org_0f5faf88846080ae/openal/cmu_1.8:/home/ian/.panda3d/hosts/runtime.panda3d.org_0f5faf88846080ae/panda3d/cmu_1.8
  PYTHONHOME=
  PRC_PATH=/home/ian/.panda3d/prc:/home/ian/.panda3d/hosts/runtime.panda3d.org_0f5faf88846080ae/morepy/cmu_1.8:/home/ian/.panda3d/hosts/runtime.panda3d.org_0f5faf88846080ae/openal/cmu_1.8:/home/ian/.panda3d/hosts/runtime.panda3d.org_0f5faf88846080ae/panda3d/cmu_1.8
  PANDA_PRC_PATH=/home/ian/.panda3d/prc:/home/ian/.panda3d/hosts/runtime.panda3d.org_0f5faf88846080ae/morepy/cmu_1.8:/home/ian/.panda3d/hosts/runtime.panda3d.org_0f5faf88846080ae/openal/cmu_1.8:/home/ian/.panda3d/hosts/runtime.panda3d.org_0f5faf88846080ae/panda3d/cmu_1.8
  TEMP=/tmp/
  PANDA3D_ROOT=/home/ian/.panda3d/hosts/runtime.panda3d.org_0f5faf88846080ae/panda3d/cmu_1.8
  OPENAL_ROOT=/home/ian/.panda3d/hosts/runtime.panda3d.org_0f5faf88846080ae/openal/cmu_1.8
  MOREPY_ROOT=/home/ian/.panda3d/hosts/runtime.panda3d.org_0f5faf88846080ae/morepy/cmu_1.8
Attempting to start python from /home/ian/.panda3d/hosts/runtime.panda3d.org_0f5faf88846080ae/panda3d/cmu_1.8/p3dpython
Setting working directory: /home/ian/.panda3d/start
child still alive after 101 ms
notify: buttonclick 
notify: onpythonload 
P3DSplashWindow::set_visible(0)
notify: onwindowattach 
notify: onpythonstop 
finish_instance: 0xb0e6b000
Assigning 0xb0e6b000->log_pathname = /home/ian/.panda3d/log/p3dsession.log
Python process has successfully stopped.
  signalled by 11, core = 128
Successfully joined thread: 0
Splash window process has successfully stopped.
  exited normally, status = 0
Successfully joined thread: 0
release_temp_filename: /tmp/p3d_bf7493.p3d
P3D_finalize called
Successfully joined thread: 0
counts: 4 1 1 1

I don’t know, there’s nothing obviously wrong in these log files. It sounds like it’s loading the p3d file, which is simply not doing anything at startup. One common source for this mistake is code like "if name == ‘main’ " around the entire body of the startup code, which people are used to putting in their main.py file, but which breaks p3d running–but if it runs in Windows, it doesn’t seem that this could be the problem.

I’d put print statements in your main.py (or whatever you named it) to give some hints where it’s getting to. These will show up in the p3dsession.log file.

David

Ah, it looks as though I may not have left the player for long enough before opening the logs: given a little more time, I see this error in p3dsession.log: “:display:x11display(error): BadMatch (invalid parameter attributes)”

I think that I’ve seen the same in Chrome under Ubuntu.

That last seems to have been a false positive: I don’t seem to be seeing it any more.

As suggested, I added some print statements to my main file, and it looks as though it’s getting as far as the line before “import direct.directbase.DirectStart”: the print statement directly after I import DirectStart doesn’t seem to be called, nor do any further on.

Is it not perhaps something to do with the following warning (also mentioned in the session log above, I believe)?

[edit]
I’ll note that this is being encountered on my development machine, on which the game – albeit run from within my Python IDE – runs happily, if slowly.

I don’t think that message is alarming, but I’m not sure whether there’s not some other rendering issue. Do other p3d files (like the ones on this web page) run correctly?

David

Ah, I’d forgotten that we had those, I believe!

Hmm… Airblade and Asteroids both seem to work.

Interestingly, I noticed that both of them showed two loading bars: one while getting the relevant .p3d, and a second as they were installing the runtime, I think it was – I think that the message above the loading bar was something to the effect of “installing Panda3D rev 1”. My game doesn’t seem to do the latter: it gets my .p3d file and then immediately shows the “play” button. Is that perhaps relevant?

Panda caches the installed package on disk. Assuming you have require(‘panda3d’) in your pdef and it’s having a dependency on the panda3d package at all, Panda will only get the panda3d package the first time and whenever there are updates. If you clear Panda’s cache, you should see it redownload the package.

I’ve seen the XVisual error before, and I think it has something to do with the temporary context that we create in order to find out the graphics card capabilities. It’s not something to be concerned about, but it does mean you can’t access more advanced framebuffer configurations.

I’ve seen the BadMatch error on games that run fine. Does it appear when you run a .p3d that works fine? If not, Panda may have trouble opening an X11 window in the modified environment; can you try rebuilding your .p3d with keep_user_env=True to see if that might be the case?

No apparent change, I’m afraid. As previously, the project seems to stop sometime during the importation of DirectStart. :confused:

As to the “BadMatch” error, as I mentioned above I think that it was a false positive: I don’t seem to have seen it again in my project.