Closed Bug 918732 Opened 8 years ago Closed 7 years ago

Mochitest test_cocoa_focus.html gives me Error calling method on NPObject!

Categories

(Core :: Plug-ins, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: martijn.martijn, Unassigned)

References

()

Details

While trying to run this test on my Macbook with OSX10.7.5, I get this js error (and the test stalls):
 0:07.74 JavaScript error: http://mochi.test:8888/tests/dom/plugins/test/mochitest/cocoa_focus.html, line 63: Error calling method on NPObject!

http://mxr.mozilla.org/mozilla-central/source/dom/plugins/test/mochitest/cocoa_focus.html?force=1#63
63       is(plugin1.getFocusState(), true, "Plugin should have focus.");
Does this happen all the time, or only intermittently?

Is this a new problem?

(Since our tests are so, um, unpredictable, I rarely run them locally any more.)
This happens all the time here on my trunk debug build.
I can't tell if this is a new problem, I only tested it since this week, as part of my work in bug 918604.
> my trunk debug build

Could you attach the mozconfig file you used to build it?

I'll duplicate your build and try to reproduce locally.
Sure, my .mozconfig consists of this:

ac_add_options --enable-debug
ac_add_options --enable-trace-malloc
ac_add_options --enable-accessibility
ac_add_options --enable-signmar

# Enable parallel compiling
mk_add_options MOZ_MAKE_FLAGS="-j12"
mk_add_options AUTOCLOBBER=1

# Treat warnings as errors in directories with FAIL_ON_WARNINGS.
ac_add_options --enable-warnings-as-errors
ac_add_options --with-ccache


# Package js shell.
export MOZ_PACKAGE_JSSHELL=1

Thanks for looking into this.
I wasn't able to get to this today.  I should be able to next week, though.
I now tried this with an opt build on the same machine, this is the .mozconfig:
# Enable parallel compiling
mk_add_options MOZ_MAKE_FLAGS="-j12"
mk_add_options AUTOCLOBBER=1

# Treat warnings as errors in directories with FAIL_ON_WARNINGS.
ac_add_options --enable-warnings-as-errors
ac_add_options --with-ccache

# Package js shell.
export MOZ_PACKAGE_JSSHELL=1

Still getting the same error with that test file.

Anyway, I managed to workaround this bug by a workaround I described in bug 920013, comment 11.
I'm actually working on this right now (with a tree pulled this Monday, 2013-09-23).

I see the failure running the test_cocoa_focus.html test individually, but not running it together with all the other tests in dom/plugins/test/mochitest.
My guess is that when you run the test_cocoa_focus.html test by itself, part of it runs before the test plugin has been fully initialized.  I'll look further into this when I review your patch for bug 920013 next week.

By the way, do you also only see the error running the test by itself?
No, I'm also seeing this error when doing ./mach mochitest-plain dom/plugins/test/mochitest/
I still only see "Error calling method on NPObject!" when I run test_cocoa_focus.html by itself (using ./mach mochitest-plain dom/plugins/test/mochitest/test_cocoa_focus.html), and not when I run it together with the other plugin mochitests (using ./mach mochitest-plain dom/plugins/test/mochitest/).  But in both cases the test gets stuck (in different places), and eventually times out.

When I run test_cocoa_focus.html by itself the test gets stuck here:

https://hg.mozilla.org/mozilla-central/annotate/cc4a3f3f899e/dom/plugins/test/mochitest/cocoa_focus.html#l63

If I put in a try/catch block the test no longer gets stuck, but fails instead.

When I run test_cocoa_focus.html together with the other plugin mochitests it gets stuck here:

https://hg.mozilla.org/mozilla-central/annotate/cc4a3f3f899e/dom/plugins/test/mochitest/cocoa_focus.html#l59

This happens even if I add a try/catch block around this line.

I'm going to try to get to the bottom of this, before I review your patch for bug 920013.
I've given up on this.  And in any case it seems my patch for bug 1117027 has stopped this happening even in local testruns.
I can't reproduce this anymore. And since I'm the only one that could reproduce this, marking worksforme.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.