This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 190509 - InvocationTargetException in OSXNotifier
Summary: InvocationTargetException in OSXNotifier
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 6.x
Hardware: All Mac OS X
: P2 normal (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-22 09:14 UTC by Egor Ushakov
Modified: 2010-09-25 02:55 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Egor Ushakov 2010-09-22 09:14:17 UTC
new errors in tests on MacOS:

java.lang.reflect.InvocationTargetException
	    + 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	    + 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	    + 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	    + 	at java.lang.reflect.Method.invoke(Method.java:597)
	    + 	at com.sun.jna.CallbackReference$DefaultCallbackProxy.callback_inner(CallbackReference.java:295)
	    + 	at com.sun.jna.CallbackReference$DefaultCallbackProxy.callback(CallbackReference.java:317)
	    + 	at com.sun.jna.Function.invokeVoid(Native Method)
	    + 	at com.sun.jna.Function.invoke(Function.java:282)
	    + 	at com.sun.jna.Function.invoke(Function.java:223)
	    + 	at com.sun.jna.Library$Handler.invoke(Library.java:204)
	    + 	at $Proxy4.CFRunLoopRun(Unknown Source)
	    + 	at org.netbeans.modules.masterfs.watcher.OSXNotifier$1.run(OSXNotifier.java:129)
	    + 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	    + 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	    + 	at java.lang.Thread.run(Thread.java:637)
	    + Caused by: java.lang.NullPointerException
	    + 	at org.netbeans.modules.masterfs.watcher.OSXNotifier$EventCallbackImpl.invoke(OSXNotifier.java:266)
	    + 	... 15 more
	    + java.lang.reflect.InvocationTargetException
	    + 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	    + 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	    + 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	    + 	at java.lang.reflect.Method.invoke(Method.java:597)
	    + 	at com.sun.jna.CallbackReference$DefaultCallbackProxy.callback_inner(CallbackReference.java:295)
	    + 	at com.sun.jna.CallbackReference$DefaultCallbackProxy.callback(CallbackReference.java:317)
	    + 	at com.sun.jna.Function.invokeVoid(Native Method)
	    + 	at com.sun.jna.Function.invoke(Function.java:282)
	    + 	at com.sun.jna.Function.invoke(Function.java:223)
	    + 	at com.sun.jna.Library$Handler.invoke(Library.java:204)
	    + 	at $Proxy4.CFRunLoopRun(Unknown Source)
	    + 	at org.netbeans.modules.masterfs.watcher.OSXNotifier$1.run(OSXNotifier.java:129)
	    + 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	    + 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	    + 	at java.lang.Thread.run(Thread.java:637)
	    + Caused by: java.lang.NullPointerException
	    + 	at org.netbeans.modules.masterfs.watcher.OSXNotifier$EventCallbackImpl.invoke(OSXNotifier.java:266)
	    + 	... 15 more
Comment 1 Petr Nejedly 2010-09-22 09:26:02 UTC
The problem boils down to NPE at OSXNotifier.java:266
    final int[] flags = eventFlags.getIntArray(0, length);

It seems that the eventFlags pointer was null, though there's no indication of this being possible in the Apple's documentation.

Are you able to reproduce this? Can I reproduce it locally (ant target to run)?
Comment 2 Tomas Zezula 2010-09-22 09:37:38 UTC
The eventFlags should not be NULL according to doc http://developer.apple.com/library/mac/#documentation/Darwin/Reference/FSEvents_Ref/FSEvents_h/index.html%23//apple_ref/c/tdef/FSEventStreamCallback.

Feel free to reassign to me :-)
Comment 3 Egor Ushakov 2010-09-22 13:18:30 UTC
it fails randomly in different tests on MacOS
Comment 4 Tomas Zezula 2010-09-22 13:25:47 UTC
Which tests in which module should I run?
Thanks
Comment 5 Egor Ushakov 2010-09-22 13:36:00 UTC
You can try running all tests in cnd cluster,
cnd.kit/misc-build.xml has a special target "test" for that.
So far we've seen failures in:
org.netbeans.modules.cnd.navigation.switchfiles.CppSwitchTest.testTwoNamesakes
org.netbeans.modules.cnd.modelimpl.trace.FileModelTest.testTemplateFunctionInTemp
org.netbeans.modules.cnd.modelimpl.trace.FileModelTest.testTypedefInsideFunc
Comment 6 Tomas Zezula 2010-09-22 13:39:16 UTC
OK, thanks.
Comment 7 Egor Ushakov 2010-09-23 10:04:14 UTC
faster way is to run only tests from cnd.modelimpl, at least one failure happens in 80% runs.
It is really annoying, please fix.
Comment 8 Tomas Zezula 2010-09-23 13:21:39 UTC
I am not able to reproduce it on my Mac (Snow Leopard 10.6.4) running the cnd.modelimpl. I've tried 7 times. Now I am running all the cnd.kit tests. I can prevent the NPE but I would rather collect some more info. Can you send me the OS version? As a part of the fix I will also add logging of the case when events == NULL. Can you send me back the logs (when the change set will be merged from jet-main into cnd)?
Thanks
Comment 9 Tomas Zezula 2010-09-23 14:36:43 UTC
Fixed jet-main 3c01d83b2cbf.
Please send me the log with the warnings.
Thanks
Comment 10 Vladimir Voskresensky 2010-09-24 09:22:28 UTC
I've sent link to our Hudson for Tomas privately.
Comment 11 Egor Ushakov 2010-09-24 09:41:23 UTC
OS version: Darwin Kernel Version 9.8.0
Comment 12 Tomas Zezula 2010-09-24 12:09:31 UTC
Decreased the log level. Fixing another NPE reported by the cnd Hudson.
Comment 13 Tomas Zezula 2010-09-24 12:13:03 UTC
jet-main 581ac32d12a0
Comment 14 Quality Engineering 2010-09-25 02:55:04 UTC
Integrated into 'main-golden', will be available in build *201009250000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/3c01d83b2cbf
User: Tomas Zezula <tzezula@netbeans.org>
Log: #190509:InvocationTargetException in OSXNotifier