Project: appceleratorstudio
Issue TISTUD-1352: Studio: Insert line below current returned divide by zero error.
While testing APSTUD-3553 I went to edit an file that I had opened from the FTP server. When I tried to add a second line, the machine hung and gave me a / by zero error and told me to check the log. Attached is the photo of the error and below is the event from the log. {noformat} !ENTRY org.eclipse.ui 4 4 2012-03-14 13:15:36.553 !MESSAGE "Insert Line Below Current Line" did not complete normally. Please see the log for more information. !ENTRY org.eclipse.ui 4 0 2012-03-14 13:15:36.554 !MESSAGE / by zero !STACK 0 java.lang.ArithmeticException: / by zero com.aptana.editor.php.internal.ui.editor.formatting.AbstractPHPAutoEditStrategy.getIndentationString(AbstractPHPAutoEditStrategy.java:690) com.aptana.editor.php.internal.ui.editor.formatting.AbstractPHPAutoEditStrategy.getIndentationAtOffset(AbstractPHPAutoEditStrategy.java:607) com.aptana.editor.php.internal.ui.editor.formatting.PHPAutoIndentStrategy.customizeCloseCurly(PHPAutoIndentStrategy.java:405) com.aptana.editor.php.internal.ui.editor.formatting.PHPAutoIndentStrategy.innerCustomizeDocumentCommand(PHPAutoIndentStrategy.java:194) com.aptana.editor.php.internal.ui.editor.formatting.PHPAutoIndentStrategy.customizeDocumentCommand(PHPAutoIndentStrategy.java:58) org.eclipse.jface.text.TextViewer.customizeDocumentCommand(TextViewer.java:3745) org.eclipse.jface.text.TextViewer.handleVerifyEvent(TextViewer.java:3782) org.eclipse.jface.text.source.projection.ProjectionViewer.handleVerifyEvent(ProjectionViewer.java:1277) org.eclipse.jface.text.TextViewer$TextVerifyListener.verifyText(TextViewer.java:435) org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:265) org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258) org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1282) org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1267) org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1061) org.eclipse.swt.custom.StyledText.modifyContent(StyledText.java:7148) org.eclipse.swt.custom.StyledText.replaceTextRange(StyledText.java:7762) org.eclipse.ui.texteditor.InsertLineAction.run(InsertLineAction.java:144) org.eclipse.jface.action.Action.runWithEvent(Action.java:498) org.eclipse.ui.commands.ActionHandler.execute(ActionHandler.java:185) org.eclipse.ui.internal.handlers.LegacyHandlerWrapper.execute(LegacyHandlerWrapper.java:109) org.eclipse.core.commands.Command.executeWithChecks(Command.java:476) org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508) org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169) org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:468) org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:786) org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:885) org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:567) org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(WorkbenchKeyboard.java:508) org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter.handleEvent(WorkbenchKeyboard.java:123) org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) org.eclipse.swt.widgets.Display.filterEvent(Display.java:1531) org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1257) org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1282) org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1267) org.eclipse.swt.widgets.Control.traverse(Control.java:4858) org.eclipse.swt.widgets.Control.translateTraversal(Control.java:4836) org.eclipse.swt.widgets.Composite.translateTraversal(Composite.java:1542) org.eclipse.swt.widgets.Control.gtk_key_press_event(Control.java:3016) org.eclipse.swt.widgets.Composite.gtk_key_press_event(Composite.java:734) org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1743) org.eclipse.swt.widgets.Control.windowProc(Control.java:5016) org.eclipse.swt.widgets.Display.windowProc(Display.java:4408) org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method) org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:8422) org.eclipse.swt.widgets.Display.eventProc(Display.java:1245) org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method) org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:2276) org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3207) org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696) org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660) org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494) org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674) org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667) org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) com.appcelerator.titanium.rcp.IDEApplication.start(IDEApplication.java:125) org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344) org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:616) org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622) org.eclipse.equinox.launcher.Main.basicRun(Main.java:577) org.eclipse.equinox.launcher.Main.run(Main.java:1410) {noformat}
Story points: 5