Linux/ppc64 - Bugreport and Fix - GraphicsCriticalError: [0][GFX1]: Unknown image format

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.
rpxrpx

Linux/ppc64 - Bugreport and Fix - GraphicsCriticalError: [0][GFX1]: Unknown image format

Unread post by rpxrpx » 2019-03-04, 12:58

Hi.

Recently I compiled Palemoon 28.2, 28.3 and 28.4 for Linux/ppc64.
Runnig Palemoon afterwards shows a lot of error messages (in the terminal) like this:

Code: Select all

GraphicsCriticalError: [0][GFX1]: Unknown image format
Fortunately I found the solution (patch) in an followup posting for Ubuntu-Bug report 1562385:
https://lists.ubuntu.com/archives/ubuntu-mozillateam-bugs/2016-September/154635.html

After applying this patch the error messages went away and Palemoon runs well.

Can you incorporate this patch in Palemoon please?

Thank you very much.

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

Re: Linux/ppc64 - Bugreport and Fix - GraphicsCriticalError: [0][GFX1]: Unknown image format

Unread post by Moonchild » 2019-03-04, 13:53

I investigated this and it seems to be an incorrect patch because while fixing BE machines, it'll switch LE machines to the wrong format. Looks like we can simply remove the endian-ness check there, since it looks like it's a check of endian-ness where none is actually needed.

Tracking in Issue #986 (UXP).
"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

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

Re: Linux/ppc64 - Bugreport and Fix - GraphicsCriticalError: [0][GFX1]: Unknown image format

Unread post by Moonchild » 2019-03-04, 14:20

See if applying this patch fixes it for you and doesn't break anything else?

Code: Select all

diff --git a/gfx/2d/Types.h b/gfx/2d/Types.h
index 7b1676ab2..3cdf077b1 100644
--- a/gfx/2d/Types.h
+++ b/gfx/2d/Types.h
@@ -65,18 +65,8 @@ enum class SurfaceFormat : int8_t {
   // This represents the unknown format.
   UNKNOWN,

-  // The following values are endian-independent synonyms. The _UINT32 suffix
-  // indicates that the name reflects the layout when viewed as a uint32_t
-  // value.
-#if MOZ_LITTLE_ENDIAN
   A8R8G8B8_UINT32 = B8G8R8A8,       // 0xAARRGGBB
   X8R8G8B8_UINT32 = B8G8R8X8        // 0x00RRGGBB
-#elif MOZ_BIG_ENDIAN
-  A8R8G8B8_UINT32 = A8R8G8B8,       // 0xAARRGGBB
-  X8R8G8B8_UINT32 = X8R8G8B8        // 0x00RRGGBB
-#else
-# error "bad endianness"
-#endif
 };

 inline bool IsOpaque(SurfaceFormat aFormat)
"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

rpxrpx

Re: Linux/ppc64 - Bugreport and Fix - GraphicsCriticalError: [0][GFX1]: Unknown image format

Unread post by rpxrpx » 2019-03-04, 23:15

I applied the patch and recompiled.
Palemoon is running and there are no error messages. Everything else seems normal, icons and fonts are ok.

You are right, this endian-ness check can be removed.

Thank you for the very quick response.
:mrgreen: :mrgreen: :mrgreen:

rpxrpx

Re: Linux/ppc64 - Bugreport and Fix - GraphicsCriticalError: [0][GFX1]: Unknown image format

Unread post by rpxrpx » 2019-04-20, 19:06

Hi.

I am a bit disappointed.
I just compiled Palemoon 28.4.1 and the patch is not included. :(

In my opinion it would be wonderful to have a "Palemoon Source" that compiles on as much platforms as possible.

Nevertheless I hope it will be included sometime in the future...

Thanks and keep up the good work!

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

Re: Linux/ppc64 - Bugreport and Fix - GraphicsCriticalError: [0][GFX1]: Unknown image format

Unread post by Moonchild » 2019-04-20, 19:37

The patch was merged to master after the release of 28.4.0and not critical for the point release to warrant an uplift.
It will be in 28.5.0.
"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