cxhttt233 opened a new issue, #8477:
URL: https://github.com/apache/hop/issues/8477

   ### Apache Hop version?
   
   2.20.0-SNAPSHOT-20260919
   
   ### Java version?
   
   Java 21
   
   ### Operating system
   
   Docker / Linux ARM64
   
   ### What happened?
   
   Enabling a project in Hop Web can fail while saving/restoring GUI state.
   
   The first error occurs when the execution perspective has not been 
initialized:
   
   ```text
   HopException:
   Error enabling project 'hfgc' in HopGui
   
   Cannot invoke
   
"org.apache.hop.ui.hopgui.perspective.execution.ExecutionPerspective.saveState()"
   because the return value of
   "ExecutionPerspective.getInstance()" is null
   ```
   
   `ProjectsGuiPlugin` currently calls:
   
   ```java
   ExecutionPerspective.getInstance().saveState();
   ```
   
   without checking whether the perspective exists.
   
   A second failure can occur while restoring the Explorer layout:
   
   ```text
   java.lang.IllegalArgumentException: Argument cannot be null
     at org.eclipse.swt.widgets.MenuItem.<init>
     at 
org.apache.hop.ui.hopgui.perspective.explorer.ExplorerPerspective.createSingleTabFolder
     at 
org.apache.hop.ui.hopgui.perspective.explorer.ExplorerPerspective.resetEditorToSinglePane
     at 
org.apache.hop.ui.hopgui.perspective.explorer.ExplorerPerspective.applyRestoredEditorSplitState
     at 
org.apache.hop.ui.hopgui.perspective.explorer.ExplorerPerspective.applyRestoredState
   ```
   
   `createSingleTabFolder()` uses:
   
   ```java
   Menu menu = folder.getMenu();
   new MenuItem(menu, SWT.SEPARATOR);
   ```
   
   In Hop Web, `folder.getMenu()` can still be `null` during state restoration.
   
   This appears to be a RAP initialization-order issue: project activation can 
trigger perspective/layout state handling before all related UI objects exist.
   
   ### Issue Priority
   
   Priority: 2
   
   ### Issue Component
   
   Component: Hop Web
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to