vkCreateDevice validation is failing because a dependency of an included extension is not also included. However, this dependency has been promoted to Vulkan 1.1 and that is the version I am using. If I try to include the dependency, the system complains that the extension is not available, which does not make sense. I want to understand if this failure is legitimate.
I am trying to include the external memory Android hardware buffer extension: https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VK_ANDROID_external_memory_android_hardware_buffer . I am including the following elements to the device extension names:
VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_EXTENSION_NAME
VK_KHR_SAMPLER_YCBCR_CONVERSION_EXTENSION_NAME
VK_EXT_QUEUE_FAMILY_FOREIGN_EXTENSION_NAME
I get the following errors from validation:
ERROR: (INSTANCE 0x0) [Validation] [ VUID-vkCreateDevice-ppEnabledExtensionNames-01387 ] Object: VK_NULL_HANDLE (Type = 1) | Missing extension required by the device extension VK_ANDROID_external_memory_android_hardware_buffer: VK_KHR_external_memory. The Vulkan spec states: All required extensions for each extension in the VkDeviceCreateInfo::ppEnabledExtensionNames list must also be present in that list. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkCreateDevice-ppEnabledExtensionNames-01387)
ERROR: (INSTANCE 0x0) [Validation] [ VUID-vkCreateDevice-ppEnabledExtensionNames-01387 ] Object: VK_NULL_HANDLE (Type = 1) | Missing extensions required by the device extension VK_KHR_sampler_ycbcr_conversion: VK_KHR_maintenance1, VK_KHR_bind_memory2, VK_KHR_get_memory_requirements2, VK_KHR_get_physical_device_properties2. The Vulkan spec states: All required extensions for each extension in the VkDeviceCreateInfo::ppEnabledExtensionNames list must also be present in that list. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkCreateDevice-ppEnabledExtensionNames-01387)
ERROR: (INSTANCE 0x0) [Validation] [ VUID-vkCreateDevice-ppEnabledExtensionNames-01387 ] Object: VK_NULL_HANDLE (Type = 1) | Missing extension required by the device extension VK_EXT_queue_family_foreign: VK_KHR_external_memory. The Vulkan spec states: All required extensions for each extension in the VkDeviceCreateInfo::ppEnabledExtensionNames list must also be present in that list. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkCreateDevice-ppEnabledExtensionNames-01387)
VK_KHR_external_memory has been promoted to 1.1 and when I query vkEnumerateInstanceVersion I get a 1.1 version. If I add VK_KHR_external_memory it in turn requests VK_KHR_external_memory_capabilities, and when I add VK_KHR_external_memory_capabilities the system complains that the extension is not available, although it has also been promoted to 1.1 .
I mistakenly was adding VK_KHR_external_memory_capabilities as a device extension when in fact it is an instance extension, even though it is a dependency of a device extension. Once I added all the dependencies correctly, I didn't have any failures or validation errors.
Additionally, I was not requesting the 1.1 API version correctly. Once I did that, I no longer needed to explicitly specify the 1.1 promoted extensions.
Related
Running
val myAvroObject = MyAvroObject.newBuilder()
results in a compilation error:
Cannot access class 'MyAvroObject.Builder'. Check your module classpath for missing or conflicting dependencies
I am able to access other MyAvroObject variables. More precisely, methods such as
val schema = MyAvroObject.getClassSchema()
val decoder = MyAvroObject.getDecoder()
compiles fine. What makes it even stranger is that I can access newBuilder() in my test/ folder, but not in my src/ folder.
Why do I get a compile error when using newBuilder()? Is the namespace of the avro-schema used to generate MyAvroObject of importance?
Check your module classpath generally means, that your dependencies (which you didn't provide) are messed up. One of them should read implementation instead of testImplementation, in order to have the method available in the main source-set, instead of only the test source-set - but this may well have to do with the input classes, the output location of generated classes, or annotations alike #VisibleForTesting (just see what it even generates). Command gradlew can also list the dependencies per configuration. The builder seems to be called org.apache.avro.SchemaBuilder... there's only avro-1.11.0.jar & avro-tools-1.11.0.jar. With the "builder" design pattern, .newBuilder() tries to return inner class Builder.
had the same problem today and was able to solve it by adding the following additional source folder
<sourceDir>${project.basedir}/target/generated-sources/avro</sourceDir>
to the kotlin-maven-plugin.
Warning message
WARN [io.qua.hib.orm.dep.HibernateOrmProcessor] Could not find a suitable persistence unit for model classes:
- io.quarkus.hibernate.orm.panache.kotlin.PanacheEntity
- io.quarkus.hibernate.orm.panache.kotlin.PanacheEntityBase
The same issue with both io.quarkus:quarkus-hibernate-orm-panache and io.quarkus:quarkus-hibernate-orm-panache-kotlin (PanacheCompanion).
My project has multiple named persistent units and datasources (no default). I'm also using multitenant feature.
INFO [io.quarkus] Installed features: [agroal, cache, cdi, config-yaml, hibernate-orm, hibernate-orm-panache-kotlin, jdbc-mysql, kotlin, mutiny, narayana-jta, resteasy, resteasy-jackson, security, smallrye-context-propagation, smallrye-jwt, smallrye-openapi, swagger-ui, vertx, vertx-web]
It seems that the ORM processor doesn't exclude those base entities, and tries to attach them to a non-existent "default" persistent units. Hence the warning.
I could get rid of it by either define "default" PU or assign io.quarkus.hibernate.orm.panache.kotlin to a named one.
quarkus:
hibernate-orm:
dummy:
pakages: io.quarkus.hibernate.orm.panache.kotlin
datasource: dummy
We are looking at requiring the Kubernetes extension as a dependency for one of our extensions, so we are guaranteed that the kubectl CLI is installed ahead of time. That said, it doesn't seem to be enough to "activate" an extension in a test (though it seems to work at runtime) to bring the dependency into play.
If I have a test like this:
let extension = vscode.extensions.getExtension(extensionId);
if (extension !== null && extension !== undefined) {
extension.activate().then(() => {
assert.ok(true);
done();
});
}
And it returns this:
rejected promise not handled within 1 second: Error: Unknown dependency 'ms-kubernetes-tools.vscode-kubernetes-tools'
stack trace: Error: Unknown dependency 'ms-kubernetes-tools.vscode-kubernetes-tools'
at p._handleActivateRequest (/home/travis/build/camel-tooling/vscode-camelk/.vscode-test/vscode-1.37.1/VSCode-linux-x64/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:496:149)
at p._activateExtensions (/home/travis/build/camel-tooling/vscode-camelk/.vscode-test/vscode-1.37.1/VSCode-linux-x64/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:496:607)
at p.activateByEvent (/home/travis/build/camel-tooling/vscode-camelk/.vscode-test/vscode-1.37.1/VSCode-linux-x64/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:494:635)
at I._activateByEvent (/home/travis/build/camel-tooling/vscode-camelk/.vscode-test/vscode-1.37.1/VSCode-linux-x64/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:760:680)
at I._handleEagerExtensions (/home/travis/build/camel-tooling/vscode-camelk/.vscode-test/vscode-1.37.1/VSCode-linux-x64/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:764:710)
at define._startExtensionHost._readyToStartExtensionHost.wait.then.then (/home/travis/build/camel-tooling/vscode-camelk/.vscode-test/vscode-1.37.1/VSCode-linux-x64/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:768:386)
Is there a way to test that the dependent extension is pulled in correctly? Can we trigger an installation of the dependent extension prior to testing activate? Can we mock this somehow?
Thanks.
I used to use proguard 5 on java 8, but as I now use Java 11, I've downloaded proguard 6.1.1, but I've encountered issues.
1 - Lot of warnings are generated because proguard does not find basic classes present in java.awt or java.lang:
Warning: ...: can't find referenced class java.awt.image.BufferedImage
Warning: ...: can't find referenced class javax.swing.JPanel
Warning: ...: can't find referenced class java.lang.management.ManagementFactory
I can remove all the warning by adding a global or specifics -dontwarn, but I don't think it's ideal. Is there a better solution?
2 - If I remove the warnings, with the option -dontwarn, an error is generated:
Unexpected error while performing partial evaluation:
Class = [...]
Method = [<init>()V]
Exception = [java.lang.IllegalArgumentException] (Can't find common super class of [softwares/progeria/nuclei/NucleiLabeling] (with 1 known super classes) and [java/lang/InterruptedException] (with 4 known super classes))
Unexpected error while preverifying:
Class = [...]
Method = [<init>()V]
Exception = [java.lang.IllegalArgumentException] (Can't find common super class of [...] (with 1 known super classes) and [java/lang/InterruptedException] (with 4 known super classes))
Error: Can't find common super class of [...] (with 1 known super classes) and [java/lang/InterruptedException] (with 4 known super classes)
The class that generates this error extends a JFrame and runs perfectly. How can I fix this error?
Your application depends on various runtime libraries which you need to tell ProGuard about.
Prior to Java 8, all of the built-in java libraries such as AWT, Swing etc. were bundled together in rt.jar. You would have supplied something like the following parameter to ProGuard:
-libraryjars <java.home>/lib/rt.jar
or if using Ant:
<libraryjar file="${java.home}/jre/lib/rt.jar" />
Since Java 9, these runtime libraries are packaged as a number of jmod files under <java.home>/jmods. As a minimum you will probably need:
-libraryjars <java.home>/jmods/java.base.jmod(!**.jar;!module-info.class)
or if using Ant:
<libraryjar file="${java.home}/jmods/java.base.jmod(!**.jar;!module-info.class)" />
However this will not include AWT or Swing, which are now in java.desktop.jmod. Precisely which of the jmods you need to link will depend on which Java runtime libraries your application makes use of.
In your case it looks like you need
-libraryjars <java.home>/jmods/java.base.jmod(!**.jar;!module-info.class)
-libraryjars <java.home>/jmods/java.destop.jmod(!**.jar;!module-info.class)
-libraryjars <java.home>/jmods/java.management.jmod(!**.jar;!module-info.class)
or
<libraryjar file="${java.home}/jmods/java.base.jmod" jarfilter="!**.jar" filter="!module-info.class" />
<libraryjar file="${java.home}/jmods/java.desktop.jmod" jarfilter="!**.jar" filter="!module-info.class" />
<libraryjar file="${java.home}/jmods/java.management.jmod" jarfilter="!**.jar" filter="!module-info.class" />
A web search for jmod <some class or package> or simply JDK Module Summary should help you identify any others you might need.
Note: If there is no <java.home>/jmods folder, and you use openjdk please note that there's a separate package for it search for java-11-openjdk-jmods to install the right package
I am writing a Play Framework module in order to share some common logic among multiple Play apps. One of the things I would like my module to do is provide some frequently-used functionality by way of 3rd-party modules, for example the excellent Markdown module.
First of all, is it possible to do this? I want all the apps that include my module to be able to use the .markdown().raw() String extension without needing to explicitly declare the Markdown module as a dependency. The Play Framework Cookbook chapter 5 seems to imply that it is possible, unless I am reading it wrong.
Secondly, if it is possible, how does it work? I have created the following vanilla example case, but I'm still getting errors.
I created a new, empty application "myapp", and a new, empty module "mymod", both in the same parent directory. I then modified mymod/conf/dependencies.yml to:
self: mymod -> mymod 0.1
require:
- play
- play -> markdown [1.5,)
I ran play deps on mymod and it successfully downloaded and installed the Markdown module. Running play build-module also worked fine with no errors.
Then, I modified myapp/conf/dependencies.yml to:
# Application dependencies
require:
- play
- mymod -> mymod 0.1
repositories:
- Local Modules:
type: local
artifact: ${application.path}/../[module]
contains:
- mymod
I ran play deps on myapp and it successfully found mymod, and generated the myapp/modules/mymod file, containing the absolute path to mymod.
I ran myapp using play run and was able to see the welcome page on http://localhost:9000/. So far so good.
Next, I modified myapp/app/views/Application/index.html to:
#{extends 'main.html' /}
#{set title:'Home' /}
${"This is _MarkDown_, by [John Gruber](http://daringfireball.net/projects/markdown/).".markdown().raw()}
I restarted myapp, and now I get the following error.
09:03:23,425 ERROR ~
#6a6eppo46
Internal Server Error (500) for request GET /
Template execution error (In /app/views/Application/index.html around line 4)
Execution error occured in template /app/views/Application/index.html. Exception raised was MissingMethodException : No signature of method: java.lang.String.markdown() is applicable for argument types: () values: [].
play.exceptions.TemplateExecutionException: No signature of method: java.lang.String.markdown() is applicable for argument types: () values: []
at play.templates.BaseTemplate.throwException(BaseTemplate.java:86)
at play.templates.GroovyTemplate.internalRender(GroovyTemplate.java:257)
at play.templates.Template.render(Template.java:26)
at play.templates.GroovyTemplate.render(GroovyTemplate.java:187)
at play.mvc.results.RenderTemplate.<init>(RenderTemplate.java:24)
at play.mvc.Controller.renderTemplate(Controller.java:660)
at play.mvc.Controller.renderTemplate(Controller.java:640)
at play.mvc.Controller.render(Controller.java:695)
at controllers.Application.index(Application.java:13)
at play.mvc.ActionInvoker.invokeWithContinuation(ActionInvoker.java:548)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:502)
at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:478)
at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:473)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:161)
at Invocation.HTTP Request(Play!)
Caused by: groovy.lang.MissingMethodException: No signature of method: java.lang.String.markdown() is applicable for argument types: () values: []
at /app/views/Application/index.html.(line:4)
at play.templates.GroovyTemplate.internalRender(GroovyTemplate.java:232)
... 13 more
And just to confirm I'm not crazy, I tried adding the play -> markdown [1.5,) line to myapp/conf/dependencies.yml and restarted the app, and confirmed that it works.
I feel like I'm missing something obvious. Many thanks in advance to anyone who can help! :)
Yes I had the same problem, it seems that transitive dependencies through custom home made modules does not work