Jython

Message12842

Author jeff.allen
Recipients gbach, jeff.allen
Date 2019年12月14日.20:54:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1576356897.95.0.647165513284.issue2848@roundup.psfhosted.org>
In-reply-to
Content
I haven't seen the NoneType error again, but I've seen several NPEs like this:
Unhandled exception in thread started by <function do_something at 0x2>
Traceback (most recent call last):
 File "test2848.py", line 49, in do_something
 for idx in range(els.getLength()):
 at org.apache.xerces.dom.DeepNodeListImpl.nextMatchingElementAfter(Unknown Source)
 at org.apache.xerces.dom.DeepNodeListImpl.item(Unknown Source)
 at org.apache.xerces.dom.DeepNodeListImpl.getLength(Unknown Source)
 at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:498)
java.lang.NullPointerException: java.lang.NullPointerException
Notice this is deep inside Xerces, navigating internal data structures. Research turns up that the Xerces DOM implementation is thread unsafe. You might think reading the parse result would be ok, but the DOM is lazily constructed as clients navigate it.
I suggest this unsafe use of Xerces is the explanation for the observations and that Jython is in the clear on this one.
History
Date User Action Args
2019年12月14日 20:54:57jeff.allensetmessageid: <1576356897.95.0.647165513284.issue2848@roundup.psfhosted.org>
2019年12月14日 20:54:57jeff.allensetrecipients: + jeff.allen, gbach
2019年12月14日 20:54:57jeff.allenlinkissue2848 messages
2019年12月14日 20:54:57jeff.allencreate

Supported by Python Software Foundation,
Powered by Roundup

AltStyle によって変換されたページ (->オリジナル) /