r164: Black screen when running exported projects

Bugs will be moved here once resolved.

Post » Sun Mar 16, 2014 4:24 am

Problem Description
After exporting any game with Multiplayer implemented in the project the game will load up with a black screen when reaching in the browser, with only button and textbox objects showing through and music playing. This only occurs with exported versions of the game, the preview version run directly from Construct 2 works normally.

The following errors are shown in the console in Chrome when running the unchanged, exported form of the Real-Time Multiplayer example:
Code: Select all
 Uncaught ReferenceError: cr is not defined       c2mp.js:811
C2Multiplayer.doPings                c2mp.js:811
(anonymous function)                c2mp.js:148


The following error also occurs in Chrome, though less frequently (the errors are cycling down):
Code: Select all
 Uncaught ReferenceError: cr is not defined       c2mp.js:1314
C2Multiplayer.getHostInputArrivalTime          c2mp.js:1314
h.ss                      c2runtime.js:275
h.Qb                      c2runtime.js:272
k.Ar                      c2runtime.js:101
k.Qb                      c2runtime.js:98
k.setSuspended                   c2runtime.js:84
window.cr_setSuspended                c2runtime.js:138
onVisibilityChanged               index.html:107
[Construct 2] Suspending


Also gives more when trying to run the project from a Node.Webkit export:
Code: Select all
Uncaught node.js Error

ReferenceError: cr is not defined
    at C2Multiplayer.getHostInputArrivalTime (file:///C:/Users/<username>/AppData/Local/Temp/nw3316_17555/c2mp.js:1314:11)
    at h.ss (file:///C:/Users/<username>/AppData/Local/Temp/nw3316_17555/c2runtime.js:275:93)
    at h.Qb (file:///C:/Users/<username>/AppData/Local/Temp/nw3316_17555/c2runtime.js:272:342)
    at k.Ar (file:///C:/Users/<username>/AppData/Local/Temp/nw3316_17555/c2runtime.js:101:95)
    at k.Qb (file:///C:/Users/<username>/AppData/Local/Temp/nw3316_17555/c2runtime.js:98:46)
    at k.Wq (file:///C:/Users/<username>/AppData/Local/Temp/nw3316_17555/c2runtime.js:95:194)
    at k.go (file:///C:/Users/<username>/AppData/Local/Temp/nw3316_17555/c2runtime.js:92:201)
    at eval (file:///C:/Users/<username>/AppData/Local/Temp/nw3316_17555/c2runtime.js:93:524)


Capx
Happens with real-time multiplayer example provided with r164.

Steps to Reproduce Bug
  • Step 1: Export project with multiplayer functions built in to HTML5 or Node.Webkit
  • Step 2: Upload and run the game (or run directly for Node.Webkit)

Observed Result
The game area will be black, with the exception of button and text box objects if there were any on the layout. Music will still play, and some sounds will play.

Expected Result
The game to load and play how it does in the preview from Construct 2.

Affected Browsers
  • Chrome: YES
  • FireFox: YES
  • Internet Explorer: NO (Multiplayer not supported)

Operating System and Service Pack
Windows 8.1 64-bit

Construct 2 Version ID
r164 64-bit
B
4
G
1
Posts: 10
Reputation: 547

Post » Sun Mar 16, 2014 9:03 pm

I can also verify this, I've also experience this same issue as @GildedFox. The issue only happens when you export your project with Minify enabled.

Temporary Fix
Uncheck Minify script box then re-export your project.

Tested:
NodeWebkit
Chrome
Opera
B
8
S
3
G
3
Posts: 26
Reputation: 1,870

Post » Mon Mar 17, 2014 1:22 am

Unchecking minify scripts does the trick. Nice that there's at least a work around so I can get to testing, for now. Thanks!

I'll add that unchecking the minify script also lets it work in Firefox.
B
4
G
1
Posts: 10
Reputation: 547

Post » Mon Mar 17, 2014 2:49 pm

Fixed in next build.
Scirra Founder
B
402
S
238
G
89
Posts: 24,637
Reputation: 196,071

Post » Sat Feb 07, 2015 4:38 am

same problem, here i spent that night solving that,, and finally found that forum.,,, omg :D ,,, dead day :D lol

,,,,,,, i really don't know what I, did but once it was working ............... on googledrive
B
14
S
2
Posts: 82
Reputation: 1,059


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 1 guest