How do I find error shown in specific .js line?

Get help using Construct 2

Post » Fri Jun 17, 2016 11:45 pm

I put months of work into my first game, never exported it though in later versions, just tested it daily in C2´s previewer & debugger from the capx file. Today after finally managing implementing highscores on a mysql database I did my first export and uploaded, ready to finish it.

I get a damned black screen after the preloader icon and progress bar finish loàding! Pretty desperate...
In FF I managed to see my game menu layout once, never after. I´m used to get and solve game breaking errors every day but this is a bit much :shock:

First I removed the recent Ajax additions, nope wasn´t it. Developer tools in FF and Chrome show me different errors. FF is missing some sound formats, probably a MIME type thing, so I deleted all sounds from project, didn´t help. Also deleted all Spriter files & assets to see if that is the issue. Apparently not.

Chrome´s developer tools console shows this error dozens of times a second->
c2runtime.js:243 Uncaught TypeError: Cannot read property 'type' of null.
FF konsole says error is in
C2runtime_ 243:145

Could "type" be an undefined variable of same name I use in certain object families?
In C2´s previewer the game runs without problems though.
So does the runtime line 243 from browser help me somehow find the reason for all this or does anybody have an idea what´s going on here?
B
10
S
4
G
4
Posts: 23
Reputation: 3,170

Post » Sat Jun 18, 2016 1:35 am

Null probably means it's a plugin as C2 itself doesn't use that by default.
Getting it every second would means its running every tick.

I would start by updating any third party plugs.
Spriter being the most obvious place to start.
Image ImageImage
B
169
S
50
G
169
Posts: 8,289
Reputation: 108,222

Post » Sat Jun 18, 2016 2:34 pm

Thanks newt, it´s probably something else. After I removed the plugin (it is the only 3rd party thing I´m using) and anything else suspicious the problem persisted. Started to roll back to some very early version adding 1 thing at a time + export + upload to find out what causes it. A very time consuming and annoying process since browser cache is a b*** and I need to change URL all the time (a most primitive method I guess) to prevent cache showing wrong versions.
B
10
S
4
G
4
Posts: 23
Reputation: 3,170

Post » Mon Jun 27, 2016 7:54 pm

I feel like a dumb monkey. :oops:
After running numerous tests I figured FF on two different webhosts does not load any image file and gets stuck after having displayed the C2 splash screen.
For testing I created a new empty project in C2 with default settings, adding 1 single grey box sprite, event sheet is blank, and exported, uploaded.
try here: http://snya.comxa.com/test4/
-> splash screen -> doesn´t even switch to the layout. works in editor preview though.

capx is: http://snya.comxa.com/test4/test4.capx
error is:
Error loading image 'http://snya.comxa.com/test4/images/sprite-sheet0.png': error { target: <img>, isTrusted: true, currentTarget: <img>, eventPhase: 2, bubbles: false, cancelable: false, defaultPrevented: false, timeStamp: 1467056079622000, originalTarget: <img>, explicitOriginalTarget: <img>, NONE: 0 }

I must be I missing something basic & general when exporting to html in C2? this is weird I used this method to host 2 other little projects like 2 years before.
B
10
S
4
G
4
Posts: 23
Reputation: 3,170

Post » Mon Jun 27, 2016 10:54 pm

Have you tried re-uploading the images?
when i go to the image url with the browser the image doesn't show.
http://snya.comxa.com/test4/images/sprite-sheet0.png
Image
B
92
S
32
G
107
Posts: 5,274
Reputation: 69,959

Post » Tue Jun 28, 2016 10:09 am

http://snya.comxa.com/test9/images/sprite-sheet0.png

the image is definitely there,
in filezilla I changed the CHMOD file permissions to 644 for any files or 755 for the images directory to check they are permitted publicly. tried setting png recompression to none in exporter. tried saving the png manually from C2´s animation editor and reuploading to check if it gets corrupted in export process somehow. browser konsole is showing MIME type is set correctly to images/png... I´m running out of ideas.

The image [image] cannot be displayed because it contains errors.


this is really weird, the png to show the splah screen C2 logo is working.

will try to upload to google drive next and see if this persists.

edit: the thing on google drive works http://googledrive.com/host/0B6NfLUcljsEUUkROdy1wa3VzVXc
B
10
S
4
G
4
Posts: 23
Reputation: 3,170


Return to How do I....?

Who is online

Users browsing this forum: MadSpy, tarek2, Yahoo [Bot] and 56 guests