GVKun编程网logo

Delphi – 让Allen Bauer的TMulticastEvent工作(delphi twebbrowers)

25

本篇文章给大家谈谈Delphi–让AllenBauer的TMulticastEvent工作,以及delphitwebbrowers的知识点,同时本文还将给你拓展ApplicationEventMult

本篇文章给大家谈谈Delphi – 让Allen Bauer的TMulticastEvent工作,以及delphi twebbrowers的知识点,同时本文还将给你拓展ApplicationEventMulticaster未初始化-在通过上下文多播事件之前调用“刷新”、chrome新版浏览器Unable to preventDefault inside passive event listener due to... 暂时解决方案、com.intellij.openapi.editor.event.EditorEventMulticaster的实例源码、com.intellij.openapi.editor.impl.event.EditorEventMulticasterImpl的实例源码等相关知识,希望对各位有所帮助,不要忘了收藏本站喔。

本文目录一览:

Delphi – 让Allen Bauer的TMulticastEvent工作(delphi twebbrowers)

Delphi – 让Allen Bauer的TMulticastEvent工作(delphi twebbrowers)

我已经厌倦了Allen Bauer的一个通用组播事件调度程序的代码(参见他的博客文章 here)。

他给了足够的代码让我想使用它,不幸的是他还没有发布完整的源代码。我有一个bash,让它上班,但我的汇编技能是不存在的。

我的问题是InternalSetdispatcher方法。天真的方法是使用与其他InternalXXX方法相同的汇编器:

procedure InternalSetdispatcher;
begin
   XCHG  EAX,[ESP]
   POP   EAX
   POP   EBP
   JMP   SetEventdispatcher
end;

但是这是用于具有一个const参数的过程,如下所示:

procedure Add(const AMethod: T); overload;

而Setdispatcher有两个参数,一个是var:

procedure SetEventdispatcher(var Adispatcher: T; ATypeData: PTypeData);

所以,我认为堆栈会被破坏。我知道代码正在做什么(通过弹出隐藏的引用到self来清理从InternalSetdispatcher调用的堆栈帧,我假设返回地址),但是我无法弄清楚那一点汇编程序能够得到整体事情去了

编辑:只是为了澄清,我正在寻找的是汇编程序,我可以使用它来使InternalSetdispatcher方法工作,即汇编器清除具有两个参数的一个过程的堆栈,一个var。

编辑2:我已经修改了一些问题,谢谢你,梅森的回答到目前为止。我应该提到上面的代码不起作用,当SetEventdispatcher返回时,AV被引发。

解决方法

答案是在Web上完成了大量的运行之后,汇编程序假定在调用InternalSetdispatcher时存在一个堆栈框架。

似乎没有为调用InternalSetdispatcher生成一个堆栈帧。

因此,修复与使用{$ stackframes on}编译器指令和重建的堆栈框架一样简单。

感谢梅森帮助我得到这个答案。

总结

以上是小编为你收集整理的Delphi – 让Allen Bauer的TMulticastEvent工作全部内容。

如果觉得小编网站内容还不错,欢迎将小编网站推荐给好友。

ApplicationEventMulticaster未初始化-在通过上下文多播事件之前调用“刷新”

ApplicationEventMulticaster未初始化-在通过上下文多播事件之前调用“刷新”

我正在开发一个Spring Boot应用程序,并使用HikariCP连接池和JDBC模板将数据插入数据库。但是当我启动时出现错误。

java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call 'refresh' before multicasting events via the context: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@1c90ca10: startup date [Wed Jul 26 13:55:18 SGT 2017]; root of context hierarchy
    at org.springframework.context.support.AbstractApplicationContext.getApplicationEventMulticaster(AbstractApplicationContext.java:404) [spring-context-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.context.support.ApplicationListenerDetector.postProcessBeforeDestruction(ApplicationListenerDetector.java:97) ~[spring-context-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:253) ~[spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:578) [spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:554) [spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingleton(DefaultListableBeanFactory.java:961) [spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:523) [spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingletons(DefaultListableBeanFactory.java:968) [spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1033) [spring-context-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:555) [spring-context-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) [spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:737) [spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE]
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:370) [spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:314) [spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1162) [spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1151) [spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE]
    at com.dmmltasmu.DriverguidanceapiApplication.main(DriverguidanceapiApplication.java:24) [classes/:na]

2017-07-26 13:55:20.222 ERROR 10164 --- [           main] o.s.b.f.s.DefaultListableBeanFactory     : Destroy method on bean with name 'org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor' threw an exception

java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call 'refresh' before multicasting events via the context: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@1c90ca10: startup date [Wed Jul 26 13:55:18 SGT 2017]; root of context hierarchy
    at org.springframework.context.support.AbstractApplicationContext.getApplicationEventMulticaster(AbstractApplicationContext.java:404) [spring-context-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.context.support.ApplicationListenerDetector.postProcessBeforeDestruction(ApplicationListenerDetector.java:97) ~[spring-context-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:253) ~[spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:578) [spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:554) [spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingleton(DefaultListableBeanFactory.java:961) [spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:523) [spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingletons(DefaultListableBeanFactory.java:968) [spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1033) [spring-context-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:555) [spring-context-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) [spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:737) [spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE]
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:370) [spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:314) [spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1162) [spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1151) [spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE]
    at com.dmmltasmu.DriverguidanceapiApplication.main(DriverguidanceapiApplication.java:24) [classes/:na]

2017-07-26 13:55:20.222 ERROR 10164 --- [           main] o.s.b.f.s.DefaultListableBeanFactory     : Destroy method on bean with name 'org.springframework.boot.autoconfigure.internalCachingMetadataReaderFactory' threw an exception

java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call 'refresh' before multicasting events via the context: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@1c90ca10: startup date [Wed Jul 26 13:55:18 SGT 2017]; root of context hierarchy
    at org.springframework.context.support.AbstractApplicationContext.getApplicationEventMulticaster(AbstractApplicationContext.java:404) [spring-context-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.context.support.ApplicationListenerDetector.postProcessBeforeDestruction(ApplicationListenerDetector.java:97) ~[spring-context-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:253) ~[spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:578) [spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:554) [spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingleton(DefaultListableBeanFactory.java:961) [spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:523) [spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingletons(DefaultListableBeanFactory.java:968) [spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1033) [spring-context-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:555) [spring-context-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) [spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:737) [spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE]
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:370) [spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:314) [spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1162) [spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1151) [spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE]
    at com.dmmltasmu.DriverguidanceapiApplication.main(DriverguidanceapiApplication.java:24) [classes/:na]

2017-07-26 13:55:20.227 ERROR 10164 --- [           main] o.s.boot.SpringApplication               : Application startup failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'persistenceExceptionTranslationPostProcessor' defined in class path resource [org/springframework/boot/autoconfigure/dao/PersistenceExceptionTranslationAutoConfiguration.class]: Initialization of bean failed; nested exception is java.lang.IllegalStateException: No persistence exception translators found in bean factory. Cannot perform exception translation.
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:564) ~[spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) ~[spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.context.support.PostProcessorRegistrationDelegate.registerBeanPostProcessors(PostProcessorRegistrationDelegate.java:223) ~[spring-context-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:702) ~[spring-context-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:527) ~[spring-context-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~[spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:737) [spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE]
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:370) [spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:314) [spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1162) [spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1151) [spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE]
    at com.dmmltasmu.DriverguidanceapiApplication.main(DriverguidanceapiApplication.java:24) [classes/:na]
Caused by: java.lang.IllegalStateException: No persistence exception translators found in bean factory. Cannot perform exception translation.
    at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.detectPersistenceExceptionTranslators(PersistenceExceptionTranslationInterceptor.java:142) ~[spring-tx-3.1.1.RELEASE.jar:3.1.1.RELEASE]
    at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.<init>(PersistenceExceptionTranslationInterceptor.java:79) ~[spring-tx-3.1.1.RELEASE.jar:3.1.1.RELEASE]
    at org.springframework.dao.annotation.PersistenceExceptionTranslationAdvisor.<init>(PersistenceExceptionTranslationAdvisor.java:70) ~[spring-tx-3.1.1.RELEASE.jar:3.1.1.RELEASE]
    at org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor.setBeanFactory(PersistenceExceptionTranslationPostProcessor.java:103) ~[spring-tx-3.1.1.RELEASE.jar:3.1.1.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeAwareMethods(AbstractAutowireCapableBeanFactory.java:1647) ~[spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1615) ~[spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555) ~[spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    ... 15 common frames omitted

我的pom.xml如下:

    <dependencies>

<dependency>
    <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>




<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-tx</artifactId>
    <version>3.1.1.RELEASE</version>
</dependency>


<dependency>
    <groupId>com.zaxxer</groupId>
    <artifactId>HikariCP-java7</artifactId>
    <version>2.4.12</version>
</dependency>
    <dependency>
         <groupId>org.asynchttpclient</groupId>
    <artifactId>async-http-client</artifactId>
    <version>2.0.11</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.springframework/spring-jdbc -->
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-jdbc</artifactId>
    <version>2.0.6</version>
</dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-thymeleaf</artifactId>
        </dependency>
        <dependency>
    <groupId>io.jsonwebtoken</groupId>
    <artifactId>jjwt</artifactId>
    <version>0.6.0</version>
    </dependency>



    <dependency>
            <groupId>org.springframework.security.oauth</groupId>
            <artifactId>spring-security-oauth2</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-war-plugin</artifactId>
            <version>3.0.0</version>
        </dependency>
    <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.security.oauth</groupId>
            <artifactId>spring-security-oauth2</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
<dependency>
            <groupId>org.springframework.mobile</groupId>
            <artifactId>spring-mobile-device</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>


     <dependency>
    <groupId>com.opencsv</groupId>
    <artifactId>opencsv</artifactId>
    <version>1.0</version>
    </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-logging</artifactId>
            <version>1.4.1.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
            <version>2.8.5</version>
        </dependency>
        <!-- <dependency> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> 
            <version>3.1</version> </dependency> -->
        <dependency>
            <groupId>org.codehaus.jackson</groupId>
            <artifactId>jackson-mapper-asl</artifactId>
            <version>1.9.13</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>2.5.3</version>
        </dependency>
        <dependency>
    <groupId>org.postgresql</groupId>
    <artifactId>postgresql</artifactId>
    <version>9.4-1201-jdbc41</version>
</dependency>

<dependency>
    <groupId>com.google.code.gson</groupId>
    <artifactId>gson</artifactId>
    <version>2.8.1</version>
</dependency>
<dependency>
    <groupId>org.apache.commons</groupId>
    <artifactId>commons-dbcp2</artifactId>
    <version>2.0</version>
</dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-configuration-processor</artifactId>
            <optional>true</optional>
        </dependency>
    </dependencies>

我的应用程序类如下:

@SpringBootApplication
@EnableScheduling
@EnableCaching
@EnableAsync
@EnableAutoConfiguration
public class DriverguidanceapiApplication implements AsyncConfigurer {

    public static void main(String[] args) {
        SpringApplication.run(DriverguidanceapiApplication.class,args);
    }

    @Override
    public Executor getAsyncExecutor() {
         ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
            executor.setCorePoolSize(1000);
            executor.setMaxPoolSize(3000);
            executor.setQueueCapacity(1000);
            executor.setThreadNamePrefix("DGS -");
            executor.initialize();
            return executor;
    }

    @Override
    public AsyncUncaughtExceptionHandler getAsyncUncaughtExceptionHandler() {
        return null;
    }


}

我不确定是什么引起此错误,因为我所有的依赖项都在那里,并且它在另一个应用程序中也能很好地运行。任何帮助表示赞赏。

chrome新版浏览器Unable to preventDefault inside passive event listener due to... 暂时解决方案

chrome新版浏览器Unable to preventDefault inside passive event listener due to... 暂时解决方案

暂时解决方案:

$(document).on(''mousewheel''
不能直接用document
要自己弄一个div包起来:$(''#bbbbb'').on(''mousewheel''

原因:

com.intellij.openapi.editor.event.EditorEventMulticaster的实例源码

com.intellij.openapi.editor.event.EditorEventMulticaster的实例源码

项目:appetizer-intellij    文件:RemoteCallComponent.java   
public void initComponent() {
  final int port = mySettings.getPortNumber();
  final boolean allowRequestsFromLocalhostOnly = mySettings.isAllowRequestsFromLocalhostOnly();
  EditorEventMulticaster eventMulticaster = EditorFactory.getInstance().getEventMulticaster();
  eventMulticaster.addDocumentListener(new Documentchangelistener());
  try {
    serverSocket = new ServerSocket();
    serverSocket.bind(new InetSocketAddress(allowRequestsFromLocalhostOnly ? "localhost" : "0.0.0.0",port));
    log.info("Listening " + port);
  }
  catch (IOException e) {
    ApplicationManager.getApplication().invokelater(new Runnable() {
      public void run() {
        Messages.showMessageDialog("Can't bind with " + port + " port. Appetizer plugin won't work","Appetizer Plugin Error",Messages.getErrorIcon());
      }
    });
    return;
  }

  MessageNotifier messageNotifier = new SocketMessageNotifier(serverSocket);
  messageNotifier.addMessageHandler(new OpenFileMessageHandler(new FileNavigatorImpl()));
  listenerThread = new Thread(messageNotifier);
  listenerThread.start();
}
项目:DarkyenusTimeTracker    文件:TimeTrackerWidget.java   
private void setupAutoStartDocumentListener(boolean enabled) {
    final EditorEventMulticaster editorEventMulticaster = EditorFactory.getInstance().getEventMulticaster();
    if (autoStartDocumentListener != null) {
        editorEventMulticaster.removeDocumentListener(autoStartDocumentListener);
        autoStartDocumentListener = null;
    }
    if (enabled) {
        editorEventMulticaster.addDocumentListener(autoStartDocumentListener = new DocumentListener() {
            @Override
            public void documentChanged(DocumentEvent e) {
                if (running) return;
                //getSelectedTextEditor() must be run from event dispatch thread
                EventQueue.invokelater(() -> {
                    final Editor selectedTextEditor = FileEditorManager.getInstance(project).getSelectedTextEditor();
                    if (selectedTextEditor == null) return;
                    if(e.getDocument().equals(selectedTextEditor.getDocument())) {
                        setRunning(true);
                    }
                });
            }
        });
    }
}
项目:stylint-plugin    文件:StylintConfigFileChangeTracker.java   
public void startIfNeeded() {
    if (TRACKING.compareAndSet(false,true))
        ApplicationManager.getApplication().invokelater(() -> ApplicationManager.getApplication().runWriteAction(() -> {
            VirtualFileManager.getInstance().addVirtualFileListener(new StylintConfigFileVfsListener(),StylintConfigFileChangeTracker.this.project);
            EditorEventMulticaster multicaster = EditorFactory.getInstance().getEventMulticaster();
            multicaster.addDocumentListener(new StylintConfigFileDocumentListener(),StylintConfigFileChangeTracker.this.project);
        }));
}
项目:sass-lint-plugin    文件:SassLintConfigFileListener.java   
private void startListener() {
    if (LISTENING.compareAndSet(false,true))
        ApplicationManager.getApplication().invokelater(new Runnable() {
            public void run() {
                ApplicationManager.getApplication().runWriteAction(new Runnable() {
                    public void run() {
                        VirtualFileManager.getInstance().addVirtualFileListener(new SassLintConfigFileVfsListener(),SassLintConfigFileListener.this.project);
                        EditorEventMulticaster multicaster = EditorFactory.getInstance().getEventMulticaster();
                        multicaster.addDocumentListener(new SassLintConfigFileDocumentListener(),SassLintConfigFileListener.this.project);
                    }
                });
            }
        });
}
项目:coffee-lint-plugin    文件:CoffeeLintConfigFileListener.java   
private void startListener() {
    if (LISTENING.compareAndSet(false,true))
        ApplicationManager.getApplication().invokelater(new Runnable() {
            public void run() {
                ApplicationManager.getApplication().runWriteAction(new Runnable() {
                    public void run() {
                        VirtualFileManager.getInstance().addVirtualFileListener(new CoffeeLintConfigFileVfsListener(),CoffeeLintConfigFileListener.this.project);
                        EditorEventMulticaster multicaster = EditorFactory.getInstance().getEventMulticaster();
                        multicaster.addDocumentListener(new CoffeeLintConfigFileDocumentListener(),CoffeeLintConfigFileListener.this.project);
                    }
                });
            }
        });
}
项目:eslint-plugin    文件:ESLintConfigFileListener.java   
private void startListener() {
    if (LISTENING.compareAndSet(false,true))
        ApplicationManager.getApplication().invokelater(new Runnable() {
            public void run() {
                ApplicationManager.getApplication().runWriteAction(new Runnable() {
                    public void run() {
                        VirtualFileManager.getInstance().addVirtualFileListener(new ESLintConfigFileVfsListener(),ESLintConfigFileListener.this.project);
                        EditorEventMulticaster multicaster = EditorFactory.getInstance().getEventMulticaster();
                        multicaster.addDocumentListener(new ESLintConfigFileDocumentListener(),ESLintConfigFileListener.this.project);
                    }
                });
            }
        });
}
项目:intellij-ce-playground    文件:MockEditorFactory.java   
@Override
@NotNull
public EditorEventMulticaster getEventMulticaster() {
  return new MockEditorEventMulticaster();
}
项目:intellij-ce-playground    文件:EditorFactoryImpl.java   
@Override
@NotNull
public EditorEventMulticaster getEventMulticaster() {
  return myEditorEventMulticaster;
}
项目:tools-idea    文件:MockEditorFactory.java   
@Override
@NotNull
public EditorEventMulticaster getEventMulticaster() {
  return new MockEditorEventMulticaster();
}
项目:tools-idea    文件:EditorFactoryImpl.java   
@Override
@NotNull
public EditorEventMulticaster getEventMulticaster() {
  return myEditorEventMulticaster;
}
项目:consulo    文件:MockEditorFactory.java   
@Override
@Nonnull
public EditorEventMulticaster getEventMulticaster() {
  return new MockEditorEventMulticaster();
}
项目:consulo    文件:EditorFactoryImpl.java   
@Override
@Nonnull
public EditorEventMulticaster getEventMulticaster() {
  return myEditorEventMulticaster;
}
项目:intellij-ce-playground    文件:EditorFactory.java   
/**
 * Returns the service for attaching event listeners to all editor instances.
 *
 * @return the event multicaster instance.
 */
@NotNull
public abstract EditorEventMulticaster getEventMulticaster();
项目:tools-idea    文件:EditorFactory.java   
/**
 * Returns the service for attaching event listeners to all editor instances.
 *
 * @return the event multicaster instance.
 */
@NotNull
public abstract EditorEventMulticaster getEventMulticaster();
项目:consulo    文件:EditorFactory.java   
/**
 * Returns the service for attaching event listeners to all editor instances.
 *
 * @return the event multicaster instance.
 */
@Nonnull
public abstract EditorEventMulticaster getEventMulticaster();

com.intellij.openapi.editor.impl.event.EditorEventMulticasterImpl的实例源码

com.intellij.openapi.editor.impl.event.EditorEventMulticasterImpl的实例源码

项目:intellij-ce-playground    文件:EditorListenerTracker.java   
@H_301_7@
public EditorListenerTracker() {
  EncodingManager.getInstance(); //adds listeners
  EditorEventMulticasterImpl multicaster = (EditorEventMulticasterImpl)EditorFactory.getInstance().getEventMulticaster();
  before = multicaster.getListeners();
  myDefaultProjectinitialized = ((ProjectManagerImpl)ProjectManager.getInstance()).isDefaultProjectinitialized();
}

今天关于Delphi – 让Allen Bauer的TMulticastEvent工作delphi twebbrowers的介绍到此结束,谢谢您的阅读,有关ApplicationEventMulticaster未初始化-在通过上下文多播事件之前调用“刷新”、chrome新版浏览器Unable to preventDefault inside passive event listener due to... 暂时解决方案、com.intellij.openapi.editor.event.EditorEventMulticaster的实例源码、com.intellij.openapi.editor.impl.event.EditorEventMulticasterImpl的实例源码等更多相关知识的信息可以在本站进行查询。

本文标签: