GLib-GObject-CRITICAL **: gtype.c:2215: initialization assertion failed, use IA__g_type_init() prior to this function

RESOLVED FIXED

Status

()

--
blocker
RESOLVED FIXED
13 years ago
13 years ago

People

(Reporter: ajschult784, Assigned: ginnchen+exoracle)

Tracking

Trunk
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

3.77 KB, patch
roc
: review+
Details | Diff | Splinter Review
(Reporter)

Description

13 years ago
With today's trunk build, I get "(process:14288): GLib-GObject-CRITICAL **: gtype.c:2215: initialization assertion failed, use IA__g_type_init() prior to this function" during component regristration of nsAccessibilityModule.  This is probably from bug 339314
(Assignee)

Comment 1

13 years ago
seems it only happens with release build.
Assignee: aaronleventhal → ginn.chen
(Assignee)

Comment 2

13 years ago
gtk_init is called after g_type_register_static

the problem is the AtkTypeForMai array, initialization of this array will cause gtype registering in libatk.
with release build, it happens earlier than gtk_init in nsAppRunner.cpp
Status: NEW → ASSIGNED
(Assignee)

Updated

13 years ago
Blocks: 339314
(Assignee)

Comment 3

13 years ago
Posted patch patch (obsolete) — Splinter Review
use switch-case instead of array to avoid earlier initialization.

this bug only happens to release build because release build uses --enable-static, so the array will be initialized before firefox starts.
Otherwise it will be initialized when libaccessibility.so loads, which is after gtk_init().
(Assignee)

Comment 4

13 years ago
This bug causes gecko a11y doesn't work on Linux.
Severity: normal → blocker
(Assignee)

Updated

13 years ago
Attachment #223742 - Flags: review?(ajschult)
(Assignee)

Comment 5

13 years ago
Posted patch patchSplinter Review
fix some styles.

roc, Aaron is on vacation this week, this bug is a blocker of a11y on Linux
can you review this patch?

Thanks.
Attachment #223742 - Attachment is obsolete: true
Attachment #223750 - Flags: review?(roc)
Attachment #223742 - Flags: review?(ajschult)

Comment 6

13 years ago
*** Bug 339718 has been marked as a duplicate of this bug. ***
Comment on attachment 223750 [details] [diff] [review]
patch

+static const GType GetAtkTypeForMai(MaiInterfaceType type)

"const" is meaningless here, remove it.

+    if (typeRegCount++ > 4095) {
+        return G_TYPE_INVALID;
     }

I think you want >= here. With >, it might try to register 4096 types.
Attachment #223750 - Flags: superreview+
Attachment #223750 - Flags: review?(roc)
Attachment #223750 - Flags: review+
(Assignee)

Comment 8

13 years ago
Checking in src/atk/nsAccessibleWrap.cpp;
/cvsroot/mozilla/accessible/src/atk/nsAccessibleWrap.cpp,v  <--  nsAccessibleWrap.cpp
new revision: 1.33; previous revision: 1.32
done
Status: ASSIGNED → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.