-
Notifications
You must be signed in to change notification settings - Fork 389
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.15 rcp-designer: "XML Source"-tab of report not available (empty page due to NullPointerException, provider = null) #1589
Comments
I thought the same fix to for the first option, but we have to check the effect on layout level, The second issue is a good question. I will spend a little bit more time this evening. |
I will try to help out where I can within my ability to understand the frameworks. Certain for the getProvider() NPE I see the explicit and implicit providers being set so can't see why they would be null except if there are things happening after a dispose call... |
Update, with the last PR the Integer-cast-issue is solved but the document-provider issue is listed again together with another NullPointer: java.lang.NullPointerException: Cannot invoke "org.eclipse.swt.widgets.Control.setMenu(org.eclipse.swt.widgets.Menu)" because the return value of "org.eclipse.ui.forms.editor.IFormPage.getPartControl()" is null Latest Log-file of the RCP-designer |
Even doing that I don't see the problem: Normally one chooses the product here: I recall mentioning in the past that BIRT has quite a few products and I don't understand their purpose: Only two of them are "published" but I don't think anyone every clarified their purpose. Products are just different combinations of installed bundles... |
Moreover, when I download and unzip the nightly build with the constraint NPE fix: I also cannot reproduce the problem: So I'm getting a bit suspicious about the nature of the problem. Might it be specific to the report you are opening? |
It is not specific on my report because I have the effect also with "new report" which are created with that RCP-version. @merks Your screen above doesn't show the RCP-designer with the example-report on screen 2. This is the "all-in-one"-designer. It is for comparison between both versions right(?) The idea was from my side a little bit, can we change the RCP-configuration to avoid the error without further impact on RCP. |
I retested the nightly-build: Result with the same error - attached the demo-report (a blank report): new_report.zip |
Hi Ed, to get the error you have to select the "XML Source"-tab. All other register works fine on my side. |
Latest update on it: in some special cases I can get an empty "XML Source"-tab also with the all-in-one-designer. @merks You are able to see the empty "XML Source"-tab? @wimjongman |
This new preview prototype should not be part of the release. It is incomplete. |
The question is more the common situatione with the "XML Source"-tab and the situation we have with the latest eclipse-platform changes. Together with your eclipse experiences if we can go ahead with the milestone-release or we can do something to solve the topics. The "new preview prototype tab" is visible since 4.14 (I don't know where this has activated). |
I'm not sure the state of the progress here. I cannot reproduce the problem on Windows with the latest nightly build: It's inexplicable to me that you can reproduce a problem with the same binary that I'm trying for which I cannot reproduce that problem... |
I have retested the nightly build and I get the following result: 4.15-RCP (eclipse platform 2024-03): 4.15-All-In-One (eclipse platform 2024-03): BIRT-dev-local-eclipse-master (my development machine, eclipse platform 2024-06): The both errors for each tab every time the 2 same errors. error at -> Tab "XML Source":java.lang.NullPointerException: Cannot invoke "org.eclipse.ui.texteditor.IDocumentProvider.getDocument(Object)" because "provider" is null error at -> Tab "Preview Prototpye"java.lang.NullPointerException: Cannot invoke "org.eclipse.swt.widgets.Control.setMenu(org.eclipse.swt.widgets.Menu)" because the return value of "org.eclipse.ui.forms.editor.IFormPage.getPartControl()" is null |
The preview tab cannot work without the contribution from bundle org.eclipse.birt.report.designer.ui.preview.static_html so that bundle should be included in features and products that include org.eclipse.birt.report.designer.ui.preview. eclipse-birt#1589
The preview tab cannot work without the contribution from bundle org.eclipse.birt.report.designer.ui.preview.static_html so that bundle should be included in features and products that include org.eclipse.birt.report.designer.ui.preview. #1589
FYI, the Preview Prototype tab was broken because of a bundle missing from the product. In particular, this class Lines 43 to 64 in 03aec8a
can't create a report viewer without the contribution from the other bundle. To me this looks like a problem that has existed for a long time... This leaves the empty XML Source tab that I can reproduce nowhere and apparently no one else is testing anything to provide additional information about whether they can or cannot reproduce that problem. I can make no problem in a problem I cannot reproduce.... |
Hi Ed, for me it would be ok, to hide the "Preview Prototype" but I didn't know exactly where it can be hidden or remove. And if nobody else has the issue with the "XML Source"-tab then it must be a special situation on my devices. |
Note that I fixed the problem with the prototype tab. So both tabs work in the all-in-one from https://download.eclipse.org/birt/updates/nightly/N202403241246 And also for the other product: I'll start another milestone build. It would be great if at least one other person can confirm that these things work for them. |
@merks The problem with the "New Preivew Prototype" is solved. Based on the nightly build All-In-One & RCP is fine! The problem with the "XML Source"-tab is no longer reproducable on All-In-One. |
@wimjongman |
Your one comment about a "a new created reported" made me think what are all the ways to do that? Apparently there is a way to do that which doesn't involve creating a report in a project in the workspace but rather directly in the file system. which then uses a different mechanism to determine the document provider. In this case a ReportEditorInput is used as the editor's input, rather than IFileEditorInput, and that just isn't handled gracefully at all by the structure editor. Even if I try to hack in a document provider, the editor is not happy with that implementation (see error log warnings), though at least it shows some text: This makes me really suspicious. So I tried this with the 4.14 release and I see both this problem and the design tab problem happen in the 4.14 release: So indeed both these problem don't look new and in fact I am rather doubtful that either of these things worked correctly in the recent past, which makes me also wonder whether anyone actually normally cares. |
I thought, perhaps you would appreciate some feedback. Unfortunately I can't contribute in programming a solution for this, but some spare time for a quick test was available. I made a quick test with a simple new report containing a 3x3 grid with some labels, nothing fancy.
In AllInOne (1.) the XML source tab and the new preview prototype work for me.
When help is needed, I can test another version as well. |
Thank @doortokaos your help is much appreciated. I also ran it. Apologies for the low response but I am tied to a customer project. I tested the RCP and it is broken in many places. We cannot take that thing seriously. I think we can just drop that from the build. See below for some other weirdness in that product. The all-in-one works fantastic. Thanks for fixing the preview Ed @merks. |
If you ask me, you could scrap the RCP Designer entirely. I always used the AIO, since I have plugins the need parts of the "normal" eclipse, but that might be a special case. 🤷♂️ I really don't know why the RCP even exists. In the "old days" I understood, that the file is smaller, and it is more preconfigured. And concerning pre-configuration: I only noticed, that I have to choose a workspace manually in AIO, in RCP it is automatically chosen... Perhaps there are more differences, but at a first glance, they elude me. But that's just my 2 cents... |
FYI, I am removing the RCP product via this PR: |
The RCP is now offline. |
Use a subclass of org.eclipse.birt.report.designer.internal.ui.editors.ReportEditorInput that implements org.eclipse.ui.IStorageEditorInput. Also guard against stack overflow from ReportEditorInput.getAdapter(Class). eclipse-birt#1589
Use a subclass of org.eclipse.birt.report.designer.internal.ui.editors.ReportEditorInput that implements org.eclipse.ui.IStorageEditorInput. Also guard against stack overflow from ReportEditorInput.getAdapter(Class). #1589
The rcp-designer version 4.15 milestone (Windows) is currently brooken according to #1588.
The XML-source of a report isn't available (the page is gray) and there are NullPointerExceptions at the log-file.
The problem of the reproducing is the same like #1588 only on the designer of master and my synced fork but not on my dev-env.
The NullPointers are:
Error 01
java.lang.NullPointerException: Cannot invoke "org.eclipse.ui.texteditor.IDocumentProvider.getDocument(Object)" because "provider" is null
at org.eclipse.ui.texteditor.MarkerRulerAction.getDocument(MarkerRulerAction.java:285)
Error 02
java.lang.NullPointerException: Cannot invoke "java.lang.Integer.intValue()" because the return value of "org.eclipse.birt.report.designer.internal.ui.editors.rulers.EditorRulerLayout.getConstraint(org.eclipse.draw2d.IFigure)" is null
at org.eclipse.birt.report.designer.internal.ui.editors.rulers.EditorRulerLayout.layout(EditorRulerLayout.java:57)
Log-File
log-2024-03-11.zip
XML-Source register
The text was updated successfully, but these errors were encountered: