Community
Participate
Working Groups
Importing an executable and launching as C/C++ application (using EDC Create Process Windows Launcher) causes a divide by zero exception in: ava.lang.ArithmeticException: / by zero at org.eclipse.cdt.launch.AbstractCLaunchDelegate2$1.run(AbstractCLaunchDelegate2.java:304) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1957) at org.eclipse.cdt.launch.AbstractCLaunchDelegate2.buildProject(AbstractCLaunchDelegate2.java:344) at org.eclipse.cdt.launch.AbstractCLaunchDelegate2.buildForLaunch(AbstractCLaunchDelegate2.java:265) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:821) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:702) at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:923) at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1126) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
My bad. Will fix asap...
Created attachment 170804 [details] Fix Committed to HEAD.
I was just about to fix it but had the wrong ws open! You beat me to it! :) I was going to change line 304 to: final int subtaskTicks = TOTAL_TICKS / Math.max(1, buildCount);
Fixed.
(In reply to comment #3) > I was just about to fix it but had the wrong ws open! You beat me to it! :) > > I was going to change line 304 to: > final int subtaskTicks = TOTAL_TICKS / Math.max(1, buildCount); There's nothing to build in that case so we should just return.
(In reply to comment #5) > (In reply to comment #3) > > I was just about to fix it but had the wrong ws open! You beat me to it! :) > > > > I was going to change line 304 to: > > final int subtaskTicks = TOTAL_TICKS / Math.max(1, buildCount); > > There's nothing to build in that case so we should just return. I see that. I was looking at the trees and missed the forest. :P
*** cdt cvs genie on behalf of jcortell *** Bug 315396: EDC launch imported executable causes divide by zero exception [*] AbstractCLaunchDelegate2.java 1.9 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate2.java?root=Tools_Project&r1=1.8&r2=1.9