Comments (7)
Is this happening under the latest 0.9.0-dev build of Substance from Radiance? The line numbers do not match the stack trace.
Looking at the CellRepaintCallback in SubstanceListUI, it is marked as UIThreadTimelineCallbackAdapter which means that everything in it should be run on the UI thread by Trident. In this stack trace it should be in Timeline.Chain.handleStateChange where it looks at the callback and its annotations.
If this is still happening under the latest Radiance sources, I would need the matching stack trace and, ideally, a small complete test app that shows this issue.
from radiance.
When I try to build 0.9.0-dev with ./gradlew I get
Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
Seems like gradle/wrapper/gradle-wrapper.jar is missing?
from radiance.
My bad. I'll remove gradle from the .gitignore, but it will take me a few days.
In the meantime, you can get substance, trident and neon jars from drop/0.9-dev/core and add them to the classpath.
https://github.com/kirill-grouchnikov/radiance/tree/master/drop/0.9-dev/core
from radiance.
As far as I can tell from the code if (shouldRunOnUIThread && (Timeline.this.uiToolkitHandler != null))
in Timeline.Chain.handleStateChange:~197
the annotation on UIThreadTimelineCallbackAdapter
is ignored if there is no uiToolkitHandler
. This happens when the mainTimelineObject
given to the Timeline
constructor is not a Component
.
This happens in In StateTransitionTracker.java:345
this.transitionTimeline = new Timeline(this);
this.transitionTimeline.setName("Model transitions");
this.transitionTimeline.addCallback(this.repaintCallback
.getRepaintCallback());
where this
(StateTransitionTracker) is not a Component
.
Timeline.java:197:
if (shouldRunOnUIThread && (Timeline.this.uiToolkitHandler != null)) {
Timeline.this.uiToolkitHandler.runOnUIThread(mainObject,
() -> callback.onTimelineStateChanged(oldState, newState, durationFraction,
timelinePosition));
} else {
callback.onTimelineStateChanged(oldState, newState, durationFraction,
timelinePosition);
}
So even if this.repaintCallback.getRepaintCallback()
is a UIThreadTimelineCallbackAdapter
it will get called outside the EDT?
Here is how it looks in my debugger with an older version of Substance, uiToolkitHandler is null and shouldRunOnUIThread is true:
this Timeline$Chain (id=540)
callbacks ArrayList<E> (id=548)
this$0 Timeline (id=556)
callback Timeline$Chain (id=540)
cycleDelay 0
doneCount 1
duration 200
durationFraction 1.0
ease Spline (id=559)
fullObjectID TimelineEngine$FullObjectID (id=562)
id 36501
initialDelay 0
isLooping false
mainObject StateTransitionTracker (id=564)
name "Model transitions" (id=566)
propertiesToInterpolate ArrayList<E> (id=567)
repeatBehavior null
repeatCount 0
secondaryId null
stateStack Stack<E> (id=568)
timelinePosition 1.0
timeUntilPlay 0
toCancelAtCycleBreak false
uiToolkitHandler null
callback SubstanceListUI$CellRepaintCallback (id=539)
cellIndex 1898
list BasicComboPopup$1 (id=572)
this$0 SubstanceListUI (id=538)
cellHeight -1
cellHeights (id=658)
cellWidth 378
columnCount 1
focusListener BasicListUI$Handler (id=660)
handler BasicListUI$Handler (id=660)
isFileList false
isLeftToRight true
lafWidgets HashSet<E> (id=664)
layoutOrientation 0
list BasicComboPopup$1 (id=572)
listDataListener BasicListUI$Handler (id=660)
listHeight 0
listSelectionListener BasicListUI$Handler (id=660)
listWidth 0
mouseInputListener BasicListUI$Handler (id=660)
preferredHeight 0
propertyChangeListener BasicListUI$Handler (id=660)
rendererPane CellRendererPane (id=668)
rolledOverIndex -1
rowsPerColumn 0
selectedIndices HashMap<K,V> (id=670)
stateTransitionMultiTracker StateTransitionMultiTracker<T> (id=673)
substanceComponentListener SubstanceListUI$2 (id=675)
substanceFadeRolloverListener SubstanceListUI$RolloverFadeListener (id=678)
substanceListDataListener SubstanceListUI$SubstanceListDataListener (id=680)
shouldRunOnUIThread true
clazz Class<T> (org.pushingpixels.trident.callback.TimelineCallbackAdapter) (id=544)
i 1
durationFraction 0.205
timelinePosition 0.12563747
from radiance.
Thanks for tracking that. Can't believe that the bug has been in there for so long.
That timeline should be getting this.component instead of this. It'll take me until early next week to commit it to Git.
from radiance.
No problem, we have been haunted by this for years.
from radiance.
This introduced broken behavior whereas views tracked by StateTransitionTracker are not properly painted when the first time. Fix coming up this week.
from radiance.
Related Issues (20)
- [Component] Use dimension-based sizes for icons
- [Component] Remove the top spacer in ribbon application menu
- [Component] Fix ribbon issues in the ktx DSL wrappers
- [Component] Use consistent group header background painting in color selector popup menu
- [Component] Configurable number of derived color rows in color selector
- [Component] Incorrect display in recent section of color selector menu
- (Theming) Inconsistent highlighting for long JTables HOT 21
- [Component] RTL-aware Side enum values
- [Theming] Maximizing windows incorrect with Windows scaling and multiple screens HOT 12
- [Theming] Support customizing title pane buttons HOT 3
- [Component] Revisit CommandButtonPresentationModel.isMenu
- Radiance theming of SwingX components HOT 1
- [Component] Revisit the class hierarchy of commands and presentation models
- [Theming] RadiancePanelTreeCellRenderer like a RadiancePanelListCellRenderer
- [Gradle] SVG Transcoder run error HOT 5
- [Component] Add model-based label component
- [Component] Customizable popup icons for command buttons
- [Component] Customizable popup anchor bounds provider for command buttons
- Issue Building the package. HOT 3
- [Component] Support projecting radio buttons in the ribbon component
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from radiance.