Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BIRT 4.14 null pointer exception with HTML output concerning background image #1436

Closed
reiner-killet opened this issue Sep 27, 2023 · 10 comments
Assignees
Labels
BugFix Change to correct issues
Milestone

Comments

@reiner-killet
Copy link

Hi,
I'm currently testing 4.14 with the RCP designer. All templates were previously running with 4.8.
WIth the 4.14 HTML emitter I get a null pointer exception:

java.lang.NullPointerException: Cannot invoke "org.eclipse.birt.report.engine.nLayout.area.style.BackgroundImageInfo.setUri(String)" because "backgroundImage" is null

The same templates are running error-free with DOCX or PDF output.
Can a BIRT developer please view that problem?
I could send rptDesigm & XML files.

Thanks, Reiner

Full stack trace.txt

@speckyspooky
Copy link
Contributor

speckyspooky commented Sep 27, 2023

Hello @reiner-killet,
thanks for your noet and also for the StackTrace. At first yes, there are some changes on the background images.
Based on your StackTrace I figured out the situation that the main object "BackgroundImageInfo" could be null
and therefore the NullPointerException appears.

Could you please provide an example according to your description because all of my reports with backgroundimages on Tabel, Grid, Row, Cell are running.
I tested different options embedded and URL-reference but I'm not able to get your error.

At which element is the background image located?

The fix would be a special check of the object but I wants to test with your report that the backgroundimage will be displayed.

@speckyspooky speckyspooky added this to the 4.14 milestone Sep 27, 2023
@speckyspooky speckyspooky self-assigned this Sep 27, 2023
@speckyspooky speckyspooky added the BugFix Change to correct issues label Sep 27, 2023
@reiner-killet
Copy link
Author

reiner-killet commented Sep 28, 2023 via email

@speckyspooky
Copy link
Contributor

Nevertheless could you provide me an example report because I didn't get the exception with my test cases.

And additional question do due got the exception only on background images or also at standard images?
You wrote that the error is only with background images.

@reiner-killet
Copy link
Author

I attached 4 files to my last e-mail. Didn't you receive them?
In #1436 I'm not able to add files of type xml or rptDesign.

@merks
Copy link
Contributor

merks commented Sep 28, 2023

I think you really need to visit the webpage #1436 in a browser and then drop the attachments into the browser's comment area rather than using an email reply for that purpose.

@reiner-killet
Copy link
Author

Sorry I did not see, that it accepts zip files:
Issue-1436-1.zip

@speckyspooky
Copy link
Contributor

Many thanks for that and I will take a look into it this evening.

@speckyspooky
Copy link
Contributor

@reiner-killet
This is a very interesting constellation because you use an internal HTML-document definition with an image-tag to create the images. In my point of view this isn't the standard way to handle it but you are right it was running with BIRT 4.8 and
I have a first drafting version how I can handle this specific situation.
But I have to finalize the draft and to test the standard backrgound functionality with it.

speckyspooky added a commit to speckyspooky/birt that referenced this issue Sep 28, 2023
@speckyspooky
Copy link
Contributor

The fix is added with PR #1440

The current preview can be created without the Exception and the images will be displayed,
the current result is:

html-image

speckyspooky added a commit that referenced this issue Sep 29, 2023
@speckyspooky
Copy link
Contributor

This issue is fixed with the current nightly built of BIRT 4.14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BugFix Change to correct issues
Projects
None yet
Development

No branches or pull requests

3 participants