voyent
ICEpdf 6.3.2: NPE in PageViewComponentImpl  XML
Forum Index -> ICEpdf General
Author Message
schlenol

Joined: 17/Jun/2005 00:00:00
Messages: 17
Offline


We have viewer ri embedded in our application. When we open a pdf document within ICEpdf 6.3.2, we always get the following NullPointerException:

2019-04-09 10:07:15,193 ERROR [STDERR] java.lang.NullPointerException
2019-04-09 10:07:15,193 ERROR [STDERR] at org.icepdf.ri.common.views.PageViewComponentImpl.initializeAnnotationsComponent(PageViewComponentImpl.java:483)
2019-04-09 10:07:15,193 ERROR [STDERR] at org.icepdf.ri.common.views.PageViewComponentImpl.lambda$refreshAnnotationComponents$2(PageViewComponentImpl.java:472)
2019-04-09 10:07:15,193 ERROR [STDERR] at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
2019-04-09 10:07:15,193 ERROR [STDERR] at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
2019-04-09 10:07:15,193 ERROR [STDERR] at java.awt.EventQueue.access$500(EventQueue.java:97)
2019-04-09 10:07:15,193 ERROR [STDERR] at java.awt.EventQueue$3.run(EventQueue.java:709)
2019-04-09 10:07:15,193 ERROR [STDERR] at java.awt.EventQueue$3.run(EventQueue.java:703)
2019-04-09 10:07:15,193 ERROR [STDERR] at java.security.AccessController.doPrivileged(Native Method)
2019-04-09 10:07:15,193 ERROR [STDERR] at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
2019-04-09 10:07:15,193 ERROR [STDERR] at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
2019-04-09 10:07:15,193 ERROR [STDERR] at de.dzsh.vbs.form.FormsEventQueue.dispatchEvent(FormsEventQueue.java:30)
2019-04-09 10:07:15,193 ERROR [STDERR] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
2019-04-09 10:07:15,193 ERROR [STDERR] at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
2019-04-09 10:07:15,193 ERROR [STDERR] at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
2019-04-09 10:07:15,193 ERROR [STDERR] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
2019-04-09 10:07:15,193 ERROR [STDERR] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
2019-04-09 10:07:15,193 ERROR [STDERR] at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

It seems, that "documentViewController.getAnnotationCallback()" returns null.
This code line is new with 6.3.2, therefore with 6.3.1 we don't get this NPE.

I attached one of our documents, but we get this NPE with all our documents, so I don't believe the specific document to be relevant. Can this be a configuration issue? Do I have to register an AnnotationCallback on the documentViewController?

Best regards,
Oliver Schlenzka
 Filename PdfAusdruck.pdf [Disk] Download
 Description
 Filesize 74 Kbytes
 Downloaded:  1 time(s)

[Email]
patrick.corless

Joined: 26/Oct/2004 00:00:00
Messages: 1975
Offline


I accidentally introduced this bug in 6.3.2. A check for the callback should have been made before calling

Code:
documentViewController.getAnnotationCallback().pageAnnotationsInitialized(page);


I'll get this fixed up for the next patch release. As a workaround you can add a callback or add the null pointer check.
[Email]
 
Forum Index -> ICEpdf General
Go to:   
Powered by JForum 2.1.7ice © JForum Team