[ nice-Bugs-1074874 ] Multithreading Bug in bossa.modules.CompilationListener
"SourceForge.net" <[email protected]> Sun, 28 Nov 2004 14:37:31 -0800
| Newsgroups | gmane.comp.lang.nice.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #1074874, was opened at 2004-11-28 23:37
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=1074874&group_id=12788
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Martin Gamsjaeger (gamsl)
Assigned to: Nobody/Anonymous (nobody)
Summary: Multithreading Bug in bossa.modules.CompilationListener
Initial Comment:
This 2 java classes trigger the bug. Unnecessary
methods are left out here, although the code cannot
compile like this due to lacking implementation of
interface methods. Maybe the bug is somehow related
with multithreading?
import org.eclipse.core.runtime.IProgressMonitor;
class NiceCompilationListener implements
bossa.modules.CompilationListener
{
private IProgressMonitor monitor = null;
private NiceBuildNotifier notifier = null;
// ...
public void progress(float proportion)
{
/*
* FIXME Bug in Nice Compiler
*/
notifier.updateProgress(proportion);
}
// ...
}
class NiceBuildNotifier
{
private IProgressMonitor monitor;
int workDone = 0;
int totalWork = 1000000;
float proportionComplete = 0f;
// ...
public void updateProgress(float newProportionComplete)
{
if (newProportionComplete > proportionComplete)
{
proportionComplete =
Math.min(newProportionComplete, 1.0f);
int work = Math.round(proportionComplete *
totalWork);
if (work > workDone)
{
if (monitor == null)
return;
monitor.worked(work - workDone);
workDone = work;
}
}
}
// ...
}
Using the latest development nice.jar:
Severity Description Resource In Folder Location
Creation Time
2 A bug has occured in the Nice compiler:
Exception in thread "Worker-3"
java.lang.NullPointerException
at
net.sourceforge.nice.ndt.builder.NiceCompilationListener.progress(NiceCompilationListener.java:115)
at bossa.modules.fun.addProgress(fun.nice:89)
at bossa.modules.Compilation.addProgress(Compilation.nice)
at bossa.modules.Package.addProgress(Package.java:219)
at bossa.modules.Package.scope(Package.java:240)
at mlsub.compilation.fun.lambda29(fun.nice:27)
at mlsub.compilation.fun.apply1(fun.nice)
at gnu.expr.ModuleMethod.apply1(ModuleMethod.java:89)
at nice.lang.fun.foreach(fun.nice:711)
at nice.lang.dispatch.foreach(dispatch.nice)
at mlsub.compilation.fun.loadComponent(fun.nice:27)
at mlsub.compilation.dispatch.loadComponent(dispatch.nice)
at mlsub.compilation.fun$load.lambda28(fun.nice:1)
at mlsub.compilation.fun$load.apply1(fun.nice)
at gnu.expr.ModuleMethod.apply1(ModuleMethod.java:89)
at nice.lang.fun.foreach(fun.nice:711)
at nice.lang.dispatch.foreach(dispatch.nice)
at mlsub.compilation.fun.load(fun.nice:22)
at mlsub.compilation.dispatch.load(dispatch.nice)
at mlsub.compilation.fun.make(fun.nice:1)
at mlsub.compilation.dispatch.make(dispatch.nice)
at nice.tools.compiler.fun.compile(fun.nice:133)
at bossa.modules.Compilation.compile(Compilation.nice)
at
net.sourceforge.nice.ndt.builder.NiceBuilder.buildAll(NiceBuilder.java:228)
at
net.sourceforge.nice.ndt.builder.NiceBuilder.fullBuild(NiceBuilder.java:182)
at
net.sourceforge.nice.ndt.builder.NiceBuilder.build(NiceBuilder.java:129)
at
org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:574)
at
org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:616)
at
org.eclipse.core.runtime.Platform.run(Platform.java:747)
at
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:158)
at
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:192)
at
org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:221)
at
org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:616)
at
org.eclipse.core.runtime.Platform.run(Platform.java:747)
at
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:224)
at
org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:293)
at
org.eclipse.core.internal.resources.Project.build(Project.java:105)
at
org.eclipse.ui.actions.BuildAction.invokeOperation(BuildAction.java:195)
at
org.eclipse.ui.actions.WorkspaceAction.execute(WorkspaceAction.java:136)
at
org.eclipse.ui.actions.WorkspaceAction$2.run(WorkspaceAction.java:396)
at
org.eclipse.core.internal.jobs.Worker.run(Worker.java:66)
Please reports this bug at the following address:
http://sourceforge.net/tracker/?func=add&group_id=12788&atid=112788
test November 28, 2004 11:33:33 PM
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=1074874&group_id=12788
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/