webgl game problem

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
win7-7
Fanatic
Fanatic
Posts: 183
Joined: 2013-09-16, 15:18
Location: --

webgl game problem

Unread post by win7-7 » 2016-11-12, 17:14

http://www.funnygames.nl/spel/battle_fo ... alaxy.html

This webgl game doesn't work in Tycho.

first good Mozilla central build is: 29.8.2015

https://hg.mozilla.org/mozilla-central/ ... 1bda26828b

Moonchild, can you backport fix from changelog?

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35591
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: webgl game problem

Unread post by Moonchild » 2016-11-12, 17:47

win7-7 wrote:Moonchild, can you backport fix from changelog?
I could if it was clear what the problem was. But it isn't.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

win7-7
Fanatic
Fanatic
Posts: 183
Joined: 2013-09-16, 15:18
Location: --

Re: webgl game problem

Unread post by win7-7 » 2016-11-12, 17:48

Problem is that the game stops loading at 31% and doesn't go any further. Browser console doesn't show anything useful related to error.
Last edited by win7-7 on 2016-11-12, 17:50, edited 2 times in total.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35591
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: webgl game problem

Unread post by Moonchild » 2016-11-12, 17:49

What i see in the error console is:

Code: Select all

Warning: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://define-service.bfg.amt-games.com/api/get/e61b1b19-84ad-454e-d8ed-5d3fb62e08b4?version=1.17.2&env=web&device_uid=e61b1b19-84ad-454e-d8ed-5d3fb62e08b4. (Reason: CORS header 'Access-Control-Allow-Origin' missing).
Which I gather is why it's not finishing its load. But.. that would be according to spec in that case.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

win7-7
Fanatic
Fanatic
Posts: 183
Joined: 2013-09-16, 15:18
Location: --

Re: webgl game problem

Unread post by win7-7 » 2016-11-12, 17:52

Moonchild wrote:What i see in the error console is:

Code: Select all

Warning: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://define-service.bfg.amt-games.com/api/get/e61b1b19-84ad-454e-d8ed-5d3fb62e08b4?version=1.17.2&env=web&device_uid=e61b1b19-84ad-454e-d8ed-5d3fb62e08b4. (Reason: CORS header 'Access-Control-Allow-Origin' missing).
Which I gather is why it's not finishing its load. But.. that would be according to spec in that case.
This same error also happens later Firefox versions in browser console and later firefox versions still load game just fine so this error can't be what is causing game to stop loading.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35591
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: webgl game problem

Unread post by Moonchild » 2016-11-12, 18:00

The pushlog you indicated doesn't have any obvious patches that stand out. Without knowing what exactly it tries to do at 31% it'd just be random guess work. We need a pointer of some sort to move forward with this.

Of note, it's in a frame. If you open the frame in a new tab, it continues loading. So I'd say it IS a CORS issue.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

win7-7
Fanatic
Fanatic
Posts: 183
Joined: 2013-09-16, 15:18
Location: --

Re: webgl game problem

Unread post by win7-7 » 2016-11-16, 13:13

I have narrowed down the specific bug fixes for this problem.

I built manually from mozilla-inbound:

https://hg.mozilla.org/integration/mozi ... ghtml/1964

It took several attempts but I found what should be bug fixes for this problem and I tested the game with this Firefox build and it worked. Problem seems to be local storage.

Bug 1184973 - Part 1: Add nsContentUtils::StorageAllowedForWindow as a unified mechanism for determining storage avaliability, r=ehsan, r=smaug
Bug 536509 - Update localStorage to use common StorageAllowedForWindow logic, r=ehsan
Bug 1147821 - Update IndexedDB to use common StorageAllowedForWindow logic, r=khuey
Bug 1145744 - Update CacheStorage to use common StorageAllowedForWindow logic, r=bkelly
Michael Layzell — Bug 1184973 - Part 2: Tests for new storage permissions model, r=ehsan, r=smaug

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35591
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: webgl game problem

Unread post by Moonchild » 2016-11-17, 21:47

Patches welcome! :)
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

Locked