Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add additional class to ImageIOProcessor #13409

Merged
merged 1 commit into from
Nov 23, 2020

Conversation

sherl0cks
Copy link
Contributor

Fixes the following issue found for native builds on quay.io/quarkus/ubi-quarkus-native-image:20.3.0-java11

Error: No instances of java.awt.color.ICC_ColorSpace are allowed in the image heap as this class should be initialized at image runtime. To see how this object got instantiated use --trace-object-instantiation=java.awt.color.ICC_ColorSpace.
Detailed message:
Trace: Object was reached by 
        reading field java.awt.image.ColorModel.colorSpace of
                constant java.awt.image.DirectColorModel@52f9255c reached by 
        reading field java.awt.image.ColorModel.RGBdefault

com.oracle.svm.core.util.UserError$UserException: No instances of java.awt.color.ICC_ColorSpace are allowed in the image heap as this class should be initialized at image runtime. To see how this object got instantiated use --trace-object-instantiation=java.awt.color.ICC_ColorSpace.
Detailed message:
Trace: Object was reached by 
        reading field java.awt.image.ColorModel.colorSpace of
                constant java.awt.image.DirectColorModel@52f9255c reached by 
        reading field java.awt.image.ColorModel.RGBdefault

        at com.oracle.svm.core.util.UserError.abort(UserError.java:82)
        at com.oracle.svm.hosted.FallbackFeature.reportAsFallback(FallbackFeature.java:217)
        at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:768)
        at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:558)
        at com.oracle.svm.hosted.NativeImageGenerator.lambda$run$0(NativeImageGenerator.java:471)
        at java.base/java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1407)
        at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
        at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
        at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
        at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
        at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Caused by: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: No instances of java.awt.color.ICC_ColorSpace are allowed in the image heap as this class should be initialized at image runtime. To see how this object got instantiated use --trace-object-instantiation=java.awt.color.ICC_ColorSpace.
Detailed message:
Trace: Object was reached by 
        reading field java.awt.image.ColorModel.colorSpace of
                constant java.awt.image.DirectColorModel@52f9255c reached by 
        reading field java.awt.image.ColorModel.RGBdefault

        at com.oracle.graal.pointsto.constraints.UnsupportedFeatures.report(UnsupportedFeatures.java:126)
        at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:765)
        ... 8 more
Error: Image build request failed with exit status 1

@ghost ghost added the area/core label Nov 20, 2020
@gsmet gsmet added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Nov 22, 2020
@gsmet gsmet force-pushed the awt-fix-for-graal-20.3-native branch from 54e4eac to 31d44f6 Compare November 22, 2020 15:26
@gsmet
Copy link
Member

gsmet commented Nov 22, 2020

I squashed the commits. CI will probably fail because of unrelated issues. I will rebase this evening as soon as the CI issue fix is merged.

@gsmet gsmet force-pushed the awt-fix-for-graal-20.3-native branch from 31d44f6 to af31023 Compare November 22, 2020 17:51
@gsmet
Copy link
Member

gsmet commented Nov 22, 2020

Rebased to get a CI fix.

@gsmet gsmet merged commit 74705c1 into quarkusio:master Nov 23, 2020
@ghost ghost added this to the 1.11 - master milestone Nov 23, 2020
@gsmet gsmet modified the milestones: 1.11 - master, 1.10.1.Final Nov 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core triage/waiting-for-ci Ready to merge when CI successfully finishes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants