Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8123573

error printing from non-FX thread

    XMLWordPrintable

Details

    • Bug
    • Resolution: Not an Issue
    • P2
    • 8
    • 8
    • javafx
    • win7 b110

    Description

      try to print scene with Text node:


      Exception in thread "Thread-11" java.lang.IllegalStateException: Not on FX application thread; currentThread = Thread-11
      at com.sun.javafx.tk.Toolkit.checkFxUserThread(Toolkit.java:209)
      at com.sun.javafx.tk.quantum.QuantumToolkit.checkFxUserThread(QuantumToolkit.java:392)
      at javafx.scene.Scene.addToDirtyList(Scene.java:512)
      at javafx.scene.Node.addToSceneDirtyList(Node.java:417)
      at javafx.scene.Node.impl_markDirty(Node.java:408)
      at javafx.scene.shape.Shape.impl_markDirty(Shape.java:927)
      at javafx.scene.Node.impl_geomChanged(Node.java:3686)
      at javafx.scene.text.Text.impl_geomChanged(Text.java:772)
      at javafx.scene.text.Text.needsTextLayout(Text.java:202)
      at javafx.scene.text.Text.needsFullTextLayout(Text.java:197)
      at javafx.scene.text.Text.access$400(Text.java:96)
      at javafx.scene.text.Text$4.invalidated(Text.java:396)
      at javafx.beans.property.StringPropertyBase.markInvalid(StringPropertyBase.java:109)
      at javafx.beans.property.StringPropertyBase.access$000(StringPropertyBase.java:49)
      at javafx.beans.property.StringPropertyBase$Listener.invalidated(StringPropertyBase.java:229)
      at com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(ExpressionHelper.java:135)
      at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
      at javafx.beans.binding.StringBinding.invalidate(StringBinding.java:171)
      at com.sun.javafx.binding.BindingHelperObserver.invalidated(BindingHelperObserver.java:51)
      at com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(ExpressionHelper.java:135)
      at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
      at javafx.beans.property.ReadOnlyObjectWrapper$ReadOnlyPropertyImpl.fireValueChangedEvent(ReadOnlyObjectWrapper.java:176)
      at javafx.beans.property.ReadOnlyObjectWrapper.fireValueChangedEvent(ReadOnlyObjectWrapper.java:142)
      at javafx.beans.property.ObjectPropertyBase.markInvalid(ObjectPropertyBase.java:112)
      at javafx.beans.property.ObjectPropertyBase.set(ObjectPropertyBase.java:145)
      at javafx.print.PrinterJob.endJob(PrinterJob.java:521)
      at test.printing.app.PrintingBase$PrintHandler.print(PrintingBase.java:287)
      at test.printing.app.PrintingBase$PrintHandler$2.run(PrintingBase.java:313)
      at java.lang.Thread.run(Thread.java:724)




      another one, starting from PrinterJob.printPage():

      Exception in thread "Thread-7" java.lang.IllegalStateException: Not on FX application thread; currentThread = Thread-7
      at com.sun.javafx.tk.Toolkit.checkFxUserThread(Toolkit.java:209)
      at com.sun.javafx.tk.quantum.QuantumToolkit.checkFxUserThread(QuantumToolkit.java:392)
      at javafx.scene.Scene.addToDirtyList(Scene.java:512)
      at javafx.scene.Node.addToSceneDirtyList(Node.java:417)
      at javafx.scene.Node.impl_markDirty(Node.java:408)
      at javafx.scene.shape.Shape.impl_markDirty(Shape.java:927)
      at javafx.scene.Node.impl_geomChanged(Node.java:3686)
      at javafx.scene.text.Text.impl_geomChanged(Text.java:772)
      at javafx.scene.text.Text.needsTextLayout(Text.java:202)
      at javafx.scene.text.Text.needsFullTextLayout(Text.java:197)
      at javafx.scene.text.Text.access$400(Text.java:96)
      at javafx.scene.text.Text$4.invalidated(Text.java:396)
      at javafx.beans.property.StringPropertyBase.markInvalid(StringPropertyBase.java:109)
      at javafx.beans.property.StringPropertyBase.access$000(StringPropertyBase.java:49)
      at javafx.beans.property.StringPropertyBase$Listener.invalidated(StringPropertyBase.java:229)
      at com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(ExpressionHelper.java:135)
      at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
      at javafx.beans.binding.StringBinding.invalidate(StringBinding.java:171)
      at com.sun.javafx.binding.BindingHelperObserver.invalidated(BindingHelperObserver.java:51)
      at com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(ExpressionHelper.java:135)
      at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
      at javafx.beans.property.ReadOnlyObjectWrapper$ReadOnlyPropertyImpl.fireValueChangedEvent(ReadOnlyObjectWrapper.java:176)
      at javafx.beans.property.ReadOnlyObjectWrapper.fireValueChangedEvent(ReadOnlyObjectWrapper.java:142)
      at javafx.beans.property.ObjectPropertyBase.markInvalid(ObjectPropertyBase.java:112)
      at javafx.beans.property.ObjectPropertyBase.set(ObjectPropertyBase.java:145)
      at javafx.print.PrinterJob.printPage(PrinterJob.java:365)
      at javafx.print.PrinterJob.printPage(PrinterJob.java:387)
      at test.printing.app.PrintingBase$PrintHandler.print(PrintingBase.java:285)
      at test.printing.app.PrintingBase$PrintHandler$2.run(PrintingBase.java:313)
      at java.lang.Thread.run(Thread.java:724)

      Attachments

        Activity

          People

            prr Philip Race
            vshubov Victor Shubov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported: