Aptana Studio
  1. Aptana Studio
  2. APSTUD-3187

Opening *.phtml files results in NullPointerException

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: Aptana Studio 3.0.4
    • Fix Version/s: Aptana Studio 3.0.4
    • Component/s: editor, php
    • Environment:

      Aptana Studio Standalone
      Windows Vista Business x86 SP2

      Description

      Opening many *.phtml files results in following exception since the update to 3.0.4:

      Example code that causes the problem:

      1. Create new blank .phtml file
      2. Paste in the following code:
        <?= $this->layout()->sidenav ?>
        
      3. close and reopen the editor. It will fail to open and log the following to the log file:
      java.lang.NullPointerException
      	at com.aptana.editor.php.internal.ui.editor.scanner.tokenMap.PHP53TokenMapper.mapToken(PHP53TokenMapper.java:16)
      	at com.aptana.editor.php.internal.ui.editor.scanner.PHPCodeScanner.nextToken(PHPCodeScanner.java:138)
      	at org.eclipse.jface.text.rules.DefaultDamagerRepairer.createPresentation(DefaultDamagerRepairer.java:175)
      	at com.aptana.editor.common.text.rules.ThemeingDamagerRepairer.createPresentation(ThemeingDamagerRepairer.java:60)
      	at com.aptana.editor.common.text.reconciler.CommonPresentationReconciler.createPresentation(CommonPresentationReconciler.java:94)
      	at com.aptana.editor.common.text.reconciler.CommonPresentationReconciler.createPresentation(CommonPresentationReconciler.java:76)
      	at org.eclipse.jface.text.presentation.PresentationReconciler.processDamage(PresentationReconciler.java:566)
      	at org.eclipse.jface.text.presentation.PresentationReconciler.access$3(PresentationReconciler.java:564)
      	at org.eclipse.jface.text.presentation.PresentationReconciler$InternalListener.inputDocumentChanged(PresentationReconciler.java:119)
      	at org.eclipse.jface.text.TextViewer.fireInputDocumentChanged(TextViewer.java:2884)
      	at org.eclipse.jface.text.TextViewer.setDocument(TextViewer.java:2933)
      	at org.eclipse.jface.text.source.SourceViewer.setDocument(SourceViewer.java:629)
      	at org.eclipse.jface.text.source.projection.ProjectionViewer.setDocument(ProjectionViewer.java:376)
      	at org.eclipse.jface.text.source.SourceViewer.setDocument(SourceViewer.java:584)
      	at org.eclipse.ui.texteditor.AbstractTextEditor.initializeSourceViewer(AbstractTextEditor.java:3873)
      	at org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl(AbstractTextEditor.java:3401)
      	at org.eclipse.ui.texteditor.StatusTextEditor.createPartControl(StatusTextEditor.java:53)
      	at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.createPartControl(AbstractDecoratedTextEditor.java:432)
      	at com.aptana.editor.common.internal.AbstractFoldingEditor.createPartControl(AbstractFoldingEditor.java:47)
      	at com.aptana.editor.common.AbstractThemeableEditor.createPartControl(AbstractThemeableEditor.java:240)
      	at com.aptana.editor.html.HTMLEditor.createPartControl(HTMLEditor.java:163)
      	at com.aptana.editor.php.internal.ui.editor.PHPSourceEditor.createPartControl(PHPSourceEditor.java:153)
      	at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:670)
      	at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
      	at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
      	at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:289)
      	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2863)
      	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2768)
      	at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2760)
      	at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2711)
      	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
      	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2707)
      	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2691)
      	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2682)
      	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651)
      	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:610)
      	at org.eclipse.ui.actions.OpenFileAction.openFile(OpenFileAction.java:99)
      	at org.eclipse.ui.actions.OpenSystemEditorAction.run(OpenSystemEditorAction.java:99)
      	at org.eclipse.ui.actions.RetargetAction.run(RetargetAction.java:221)
      	at org.eclipse.ui.navigator.CommonNavigatorManager$3.open(CommonNavigatorManager.java:185)
      	at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48)
      	at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:845)
      	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
      	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
      	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
      	at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:843)
      	at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1131)
      	at org.eclipse.ui.navigator.CommonViewer.handleOpen(CommonViewer.java:462)
      	at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1235)
      	at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:264)
      	at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:258)
      	at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:298)
      	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
      	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
      	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
      	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
      	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
      	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
      	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
      	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
      	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
      	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
      	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
      	at com.aptana.rcp.IDEApplication.start(IDEApplication.java:125)
      	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
      	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
      	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
      	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
      	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	at java.lang.reflect.Method.invoke(Unknown Source)
      	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
      	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
      	at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
      
      1. sample.phtml
        0.0 kB
        Raphael von der Grün

        Issue Links

          Activity

          Hide
          Ingo Muschenetz added a comment -

          Please attach a sample file that causes the problem.

          Show
          Ingo Muschenetz added a comment - Please attach a sample file that causes the problem.
          Hide
          Raphael von der Grün added a comment -

          It seems the problem only occurs when object properties are accessed directly.

          Show
          Raphael von der Grün added a comment - It seems the problem only occurs when object properties are accessed directly.
          Hide
          Shalom Gibly added a comment -

          Fixed for 3.0.4
          It was actually happening in *.php file as well.

          Show
          Shalom Gibly added a comment - Fixed for 3.0.4 It was actually happening in *.php file as well.
          Hide
          Joel Witt (Inactive) added a comment -

          Aptana Studio 3, build: 3.0.4.201108051342
          Ubuntu 10.10

          Placed sample code in empty .phtml file, saved, closed and reopened with no errors.

          Show
          Joel Witt (Inactive) added a comment - Aptana Studio 3, build: 3.0.4.201108051342 Ubuntu 10.10 Placed sample code in empty .phtml file, saved, closed and reopened with no errors.

            People

            • Assignee:
              Shalom Gibly
              Reporter:
              Raphael von der Grün
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: