当前位置: 首页 > news >正文

IDEA 学习之 编译内存问题

目录

      • 1. 正常的 IDEA build 日志
      • 2. 编译工具内存不足日志 (内存从小变大)
        • 2.1. 干脆无法启动
        • 2.2. Ant 任务执行报错
        • 2.3. 内存溢出:超出 GC 上限
        • 2.4. 内存溢出:超出 GC 上限,编译报错
        • 2.5. 内存溢出: 堆空间
        • 2.6. 内存溢出: 内存不足
        • 解决方案

1. 正常的 IDEA build 日志

Executing pre-compile tasks...
Loading Ant configuration...
Running Ant tasks...
Running 'before' tasks
Checking sources
Copying resources... [user]
Parsing java… [user]
java: JPS incremental annotation processing is disabled. Compilation results on partial recompilation may be inaccurate. Use build process "jps.track.ap.dependencies" VM flag to enable/disable incremental annotation processing environment.
Writing classes… [user]
Checking dependencies… [user]
Dependency analysis found 0 affected files
Updating dependency information… [user]
Adding @NotNull assertions… [user]
Adding pattern assertions… [user]
Adding the Threading Model assertions… [user]
Running 'after' tasks
javac 1.8.0_333 was used to compile java sources
Finished, saving caches…
Executing post-compile tasks...
Loading Ant configuration...
Running Ant tasks...
Synchronizing output directories...
2022/10/13, 10:04 AM - Build completed successfully with 2 warnings in 5 sec, 563 ms

2. 编译工具内存不足日志 (内存从小变大)

2.1. 干脆无法启动
2.2. Ant 任务执行报错
Executing pre-compile tasks...
Loading Ant configuration...
Running Ant tasks...
Internal error (java.lang.NullPointerException): null
java.lang.NullPointerExceptionat com.intellij.util.containers.hash.LinkedHashMap$Entry.access$200(LinkedHashMap.java:283)at com.intellij.util.containers.hash.LinkedHashMap.doRemoveEldestEntry(LinkedHashMap.java:137)at com.intellij.util.io.FilePageCache.ensureSize(FilePageCache.java:218)at com.intellij.util.io.FilePageCache.get(FilePageCache.java:186)at com.intellij.util.io.PagedFileStorage.getBufferWrapper(PagedFileStorage.java:370)at com.intellij.util.io.PagedFileStorage.getBuffer(PagedFileStorage.java:345)at com.intellij.util.io.PagedFileStorage.put(PagedFileStorage.java:246)at com.intellij.util.io.PagedFileStorage.fillWithZeros(PagedFileStorage.java:321)at com.intellij.util.io.PagedFileStorage.resize(PagedFileStorage.java:295)at com.intellij.util.io.ResizeableMappedFile.expand(ResizeableMappedFile.java:120)at com.intellij.util.io.ResizeableMappedFile.ensureSize(ResizeableMappedFile.java:89)at com.intellij.util.io.ResizeableMappedFile.putInt(ResizeableMappedFile.java:210)at com.intellij.util.io.PersistentEnumeratorBase.markDirty(PersistentEnumeratorBase.java:576)at com.intellij.util.io.PersistentEnumeratorBase.<init>(PersistentEnumeratorBase.java:143)at com.intellij.util.io.PersistentBTreeEnumerator.<init>(PersistentBTreeEnumerator.java:96)at com.intellij.util.io.PersistentEnumerator.createDefaultEnumerator(PersistentEnumerator.java:67)at com.intellij.util.io.PersistentMapImpl.<init>(PersistentMapImpl.java:136)at com.intellij.util.io.PersistentMapBuilder.buildImplementation(PersistentMapBuilder.java:62)at com.intellij.util.io.PersistentMapBuilder.build(PersistentMapBuilder.java:44)at com.intellij.util.io.PersistentHashMap.<init>(PersistentHashMap.java:39)at com.intellij.util.io.PersistentHashMap.<init>(PersistentHashMap.java:54)at org.jetbrains.jps.incremental.storage.AbstractStateStorage.createMap(AbstractStateStorage.java:116)at org.jetbrains.jps.incremental.storage.AbstractStateStorage.<init>(AbstractStateStorage.java:29)at org.jetbrains.jps.incremental.storage.FileTimestampStorage.<init>(FileTimestampStorage.java:27)at org.jetbrains.jps.incremental.storage.ProjectStamps.<init>(ProjectStamps.java:42)at org.jetbrains.jps.cmdline.BuildRunner.load(BuildRunner.java:102)at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:324)at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:175)at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler.lambda$channelRead0$0(BuildMain.java:218)at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)at java.lang.Thread.run(Thread.java:750)
Executing post-compile tasks...
Loading Ant configuration...
Running Ant tasks...
Synchronizing output directories...
2022/10/13, 9:51 AM - Build completed with 1 error and 0 warnings in 1 sec, 582 ms
2.3. 内存溢出:超出 GC 上限
Executing pre-compile tasks...
Loading Ant configuration...
Running Ant tasks...
build: Project rebuild forced: Storage version updated, file = /Users/zxguan/Library/Caches/JetBrains/IntelliJIdea2022.1/compile-server/springcloud2_9578806c/timestamps/data
Cleaning output directories…
Running 'before' tasks
Checking sources
Copying resources... [user]
Parsing java… [user]
java: JPS incremental annotation processing is disabled. Compilation results on partial recompilation may be inaccurate. Use build process "jps.track.ap.dependencies" VM flag to enable/disable incremental annotation processing environment.
java: java.lang.OutOfMemoryError: GC overhead limit exceeded
java: java.lang.OutOfMemoryError: GC overhead limit exceeded
Checking dependencies… [user]
2.4. 内存溢出:超出 GC 上限,编译报错
Executing pre-compile tasks...
Loading Ant configuration...
Running Ant tasks...
Running 'before' tasks
Checking sources
Copying resources... [user]
Parsing java… [user]
java: JPS incremental annotation processing is disabled. Compilation results on partial recompilation may be inaccurate. Use build process "jps.track.ap.dependencies" VM flag to enable/disable incremental annotation processing environment.
java: 系统资源不足。
java: 有关详细信息,请参阅以下堆栈跟踪。
java: java.lang.OutOfMemoryError: GC overhead limit exceeded
java:   at com.sun.tools.javac.util.List.of(List.java:135)
java:   at com.sun.tools.javac.util.List.append(List.java:272)
java:   at com.sun.tools.javac.comp.Resolve$MethodResolutionContext.addApplicableCandidate(Resolve.java:4338)
java:   at ......
java:   at ......
java: Compilation failed: internal java compiler error
Checking dependencies… [user]
Dependency analysis found 0 affected files
Errors occurred while compiling module 'user'
javac 1.8.0_333 was used to compile java sources
Finished, saving caches…
Executing post-compile tasks...
Loading Ant configuration...
Running Ant tasks...
Synchronizing output directories...
2022/10/13, 9:55 AM - Build completed with 2 errors and 1 warning in 12 sec, 377 ms
2.5. 内存溢出: 堆空间
Executing pre-compile tasks...
Loading Ant configuration...
Running Ant tasks...
Running 'before' tasks
Checking sources
Copying resources... [user]
Parsing java… [user]
java: JPS incremental annotation processing is disabled. Compilation results on partial recompilation may be inaccurate. Use build process "jps.track.ap.dependencies" VM flag to enable/disable incremental annotation processing environment.
java: java.lang.OutOfMemoryError: Java heap space
java: java.lang.OutOfMemoryError: Java heap space
Checking dependencies… [user]
Dependency analysis found 0 affected files
Errors occurred while compiling module 'user'
javac 1.8.0_333 was used to compile java sources
Finished, saving caches…
Executing post-compile tasks...
Loading Ant configuration...
Running Ant tasks...
Synchronizing output directories...
2022/10/13, 9:55 AM - Build completed with 2 errors and 1 warning in 12 sec, 377 ms
2.6. 内存溢出: 内存不足
Executing pre-compile tasks...
Loading Ant configuration...
Running Ant tasks...
Running 'before' tasks
Checking sources
Copying resources... [user]
Parsing java… [user]
java: JPS incremental annotation processing is disabled. Compilation results on partial recompilation may be inaccurate. Use build process "jps.track.ap.dependencies" VM flag to enable/disable incremental annotation processing environment.
java: 系统资源不足。
java: 有关详细信息,请参阅以下堆栈跟踪。
java:   at ......
java:   at ......
java:java.lang.OutOfMemoryError: insufficient memory
Checking dependencies… [user]
Dependency analysis found 0 affected files
Errors occurred while compiling module 'user'
javac 1.8.0_333 was used to compile java sources
Finished, saving caches…
Executing post-compile tasks...
Loading Ant configuration...
Running Ant tasks...
Synchronizing output directories...
2022/10/13, 9:55 AM - Build completed with 2 errors and 1 warning in 12 sec, 377 ms
解决方案

调大 IDEA 编译内存大小,File -> Settings -> Build, Execution, Deployment -> Compiler -> Shared build process heap size

相关文章:

IDEA 学习之 编译内存问题

目录 1. 正常的 IDEA build 日志2. 编译工具内存不足日志 &#xff08;内存从小变大&#xff09;2.1. 干脆无法启动2.2. Ant 任务执行报错2.3. 内存溢出&#xff1a;超出 GC 上限2.4. 内存溢出&#xff1a;超出 GC 上限&#xff0c;编译报错2.5. 内存溢出&#xff1a; 堆空间2.…...

如何将本地项目推送到gitee仓库

目录 为何用gitee管理自己项目&#xff1a; 如何将自己的项目推送到gitee仓库&#xff0c;步骤如下&#xff1a; 1.下载git 2.生成公钥 3.在gitee上添加公钥 4.在gitee上创建仓库 5.将本地项目推送到gitee仓库 为何用gitee管理自己项目&#xff1a; 1.可以使用多台电脑…...

产品经理基础入门

一、产品基础&#xff08;需求收集、需求管理、需求分析、结构图、流程图、原型、PRD文档、用户画像、后台的角色管理&#xff09; 产品经理定义&#xff1a; 1.市场分析&#xff1a;找准市场方向&#xff0c;确定哪个市场是值得进入的。 2.用户分析&#xff1a;针对目标市场…...

五子棋纯python手写,需要的拿去

import pygame,sys from pygame import * pygame.init()game pygame.display.set_mode((600,600)) gameover False circlebox [] # 棋盘坐标点存储 box [] def xy():for x in range(0,800//40): for y in range(0,800//40): box.append((x*40,y*40)) xy() defaultColor wh…...

C# Winform按钮避免重复点击以及解决WinForm中设置Enabled=False为什么还会响应Click事件

1、C# Winform按钮避免重复点击 代码如下 btn.Enablefalse; //执行任务的函数或代码 btn.Enabletrue; 在btn.Enabletrue前添加Application.DoEvents(); 就是让应用程序的消息队列自动走完&#xff08;即在按钮为Ture前清空消息队列&#xff09;。 2、解决WinForm中设置Enabl…...

谷歌SEO是什么意思?

谷歌SEO&#xff08;Search Engine Optimization&#xff09;是通过优化网站内容和结构&#xff0c;使其在谷歌搜索引擎中排名更高的策略和技术。这不仅仅是提高网站排名&#xff0c;更是吸引目标受众、增加流量并最终提升业务转化的关键方法之一。谷歌搜索引擎优化&#xff08…...

IPFoxy Tips:匿名海外代理IP的使用方法及注意事项

在互联网上&#xff0c;隐私和安全问题一直备受关注。为了保护个人隐私和数据安全&#xff0c;使用匿名代理IP是一种常用的方法。匿名代理IP可以隐藏用户的真实IP地址&#xff0c;使用户在访问网站时更加隐秘和安全。 本文将介绍匿名代理IP的基本原理和核心功能。 基本原则 匿…...

【MySQL进阶之路 | 小结篇】MySQL键约束KEY与索引INDEX

1. 键约束 关键字key 比如UNIQUE KEY就是一个唯一性约束&#xff0c;用于确保表中的某一列或多列的组合具有唯一性&#xff0c;不允许有重复值.当定义一个唯一性约束的时候&#xff0c;会自动创建一个唯一性索引来支持这一约束&#xff0c;这意味着它同时也起到了索引的作用.…...

【中学教资科目二】02中学课程

02中学课程 第一节 课程概述1.1 课程的分类 第二节 课程组织2.1 课程内容的文本表现形式2.2 课程评价 第三节 基础教育课程改革3.1 基础教育改革的目标3.2 新课改的课程结构 第一节 课程概述 1.1 课程的分类 学校课程有多种类型&#xff0c;其中最利于学生系统掌握人类所取得的…...

Stable Diffusion 亲测这几个SDXL大模型,真的非常好用!

大家好我是极客菌&#xff0c;前两周Stable Diffusion WebUI1.6.0发布了&#xff0c;新增了很多对SDXL生态的支持。 而ControlNET也对SDXL的支持也逐渐稳定。 SDXL的生态终于有一点起色了&#xff0c;我也觉得是时候&#xff0c;可以来写一篇SDXL的大模型推荐了。 在推荐之前…...

DLS策略洞察:如何应对AI数据中心网络交换机市场的爆发式增长?

摘要&#xff1a; 随着AI技术的发展和应用&#xff0c;AI数据中心对网络交换机的需求日益增加。摩根士丹利预计&#xff0c;2023-2026年间&#xff0c;AI数据中心网络交换机的收入复合年增长率&#xff08;CAGR&#xff09;将达到55%。本文将详细分析AI数据中心网络交换机市场…...

数据仓库架构设计

数据仓库架构设计是为了有效地收集、存储、处理和分析大规模数据&#xff0c;从而支持商业智能和数据分析活动。一个良好的数据仓库架构需要考虑数据源的多样性、数据存储的结构化、数据处理的高效性和数据分析的灵活性。以下是数据仓库架构设计的详细介绍。 数据仓库架构的层…...

EasyExcel动态表头多sheet录入,单元格操作样式,自动修改单元格格式

EasyExcel动态表头多sheet录入,单元格操作样式,自动修改单元格格式 说明 EasyExcel是一款开源的Java库&#xff0c;用于读取、写入和操作Excel文件。它是阿里巴巴集团开发的一款高效、功能丰富且易于使用的Excel操作工具。 EasyExcel提供了简洁的API&#xff0c;使得读写Excel…...

Linux的设备模型

在设备模型出现以前,Linux的驱动存在以下问题: 1,设备和驱动没有分离。也就是说设备的信息是硬编码在驱动代码中的,这给驱动程序造成了极大的限制。如果硬件有所改动,那么必然要修改驱动代码。比如LED如果修改了管脚,那么就必然要修改驱动程序。这样就导致驱动的通用性很…...

初始化一个Android项目时,Android Studio会自动生成一些文件和目录结构,以帮助你快速上手开发

当你初始化一个Android项目时&#xff0c;Android Studio会自动生成一些文件和目录结构&#xff0c;以帮助你快速上手开发。这些文件和目录各自有其特定的功能和用途。下面我为你解释一下这些自动生成的内容&#xff1a; 1. app 目录 这是你的应用模块的根目录&#xff0c;包…...

社区团购小程序开发

在快节奏的现代生活中&#xff0c;人们越来越追求便利与效率。社区团购小程序应运而生&#xff0c;以其独特的优势成为连接社区居民与优质商品的重要桥梁。本文将探讨社区团购小程序的特点、优势以及未来发展趋势&#xff0c;为大家揭示这一新型购物模式的魅力。 社区团购小程序…...

数据分析python基础实战分析

数据分析python基础实战分析 安装python&#xff0c;建议安装Anaconda 【Anaconda下载链接】https://repo.anaconda.com/archive/ 记得勾选上这个框框 安装完后&#xff0c;然后把这两个框框给取消掉再点完成 在电脑搜索框输入"Jupyter"&#xff0c;牛马启动&am…...

英语笔记-专升本

2024年6月23日15点01分&#xff0c;今天自己听老师讲了一张试卷&#xff0c;自己要开始不断地进行一个做事&#xff0c;使自己可以不断地得到一个提升&#xff0c;自己可以提升的内容&#xff0c; 英语试卷笔记 ------------------------------------ | 英语试卷笔记 …...

什么野指针(c++)

野指针定义 野指针&#xff08;Wild Pointer&#xff09;是指向不确定位置或者非法地址的指针。当一个指针指向的内存被释放后&#xff0c;如果没有将其设置为NULL&#xff0c;那么这个指针就变成了野指针。使用野指针会导致未定义行为&#xff0c;可能引发程序崩溃或数据损坏…...

【编译原理】绪论

1.计算机程序语言以及编译 编译是对高级语言的翻译 源程序是句子的集合&#xff0c;树可以较好的反应句子的结构 编译程序是一种翻译程序 2.编号器在语言处理系统中的位置 可重定位&#xff1a;在内存中存放的起始位置不是固定的 加载器&#xff1a;修改可重定位地址&#x…...

基于CircuitPython与GBoard的Android摩斯码输入外设制作指南

1. 项目概述与核心价值如果你对摩斯码感兴趣&#xff0c;或者身边有朋友因为行动不便&#xff0c;使用传统触摸屏键盘输入文字非常困难&#xff0c;那么这个项目可能会给你带来一些全新的思路。我们这次要做的&#xff0c;不是一个复杂的、需要焊接和精密加工的电子项目&#x…...

Spring Cloud整合XXL-Job避坑指南:调度过期策略选错,你的定时任务可能就白跑了

Spring Cloud微服务中XXL-Job调度策略深度解析与实战避坑 在微服务架构盛行的今天&#xff0c;定时任务作为业务系统中不可或缺的一环&#xff0c;其稳定性和可靠性直接影响着核心业务流程。XXL-Job作为一款轻量级分布式任务调度平台&#xff0c;凭借其简单易用、功能强大的特性…...

声明式工作流编排框架:从计划到执行的自动化实践

1. 项目概述&#xff1a;从“计划清单”到“框架”的蜕变如果你和我一样&#xff0c;在职业生涯中经历过从零到一构建复杂应用&#xff0c;或者维护过多个技术栈各异、需求多变的项目&#xff0c;那你一定对“计划”和“清单”这两个词深有感触。我们每天都在做计划&#xff0c…...

G-Helper终极指南:3步快速解决华硕笔记本色彩失真问题

G-Helper终极指南&#xff1a;3步快速解决华硕笔记本色彩失真问题 【免费下载链接】g-helper Lightweight Armoury Crate alternative for Asus laptops with nearly the same functionality. Works with ROG Zephyrus, Flow, TUF, Strix, Scar, ProArt, Vivobook, Zenbook, Ex…...

Rust命令行工具开发实战:从架构设计到工程化发布

1. 项目概述&#xff1a;为什么是Rust&#xff0c;为什么是命令行工具&#xff1f;最近几年&#xff0c;如果你关注过系统编程或者高性能工具领域&#xff0c;Rust这个词出现的频率会越来越高。它不再是一个“未来之星”&#xff0c;而是实实在在地在重塑我们手中的工具链。我自…...

Proteus仿真PCA9685踩坑实录:示波器不显示PWM波?可能是I2C调试器惹的祸

Proteus仿真PCA9685实战避坑指南&#xff1a;从波形消失到高效调试 当你在Proteus中搭建好PCA9685电路&#xff0c;满心期待看到整齐的PWM波形时&#xff0c;示波器却一片空白——这种挫败感每个电子工程师都经历过。本文将带你深入Proteus仿真的底层逻辑&#xff0c;揭示I2C调…...

BepInEx启动失败完整指南:从IL2CPP兼容性到游戏正常运行

BepInEx启动失败完整指南&#xff1a;从IL2CPP兼容性到游戏正常运行 【免费下载链接】BepInEx Unity / XNA game patcher and plugin framework 项目地址: https://gitcode.com/GitHub_Trending/be/BepInEx BepInEx作为Unity游戏插件框架&#xff0c;在IL2CPP编译模式下…...

路由器市场新机遇:从硬件到场景化解决方案的演进

1. 项目概述&#xff1a;一个被低估的“家门口”战场聊到路由器&#xff0c;很多人的第一反应可能是“运营商送的”、“能用就行”。确实&#xff0c;在过去很长一段时间里&#xff0c;家用Wi-Fi设备是一个典型的“黑盒”产品&#xff0c;用户对其性能、功能和体验的感知非常模…...

开发者必备:从聊天记录到结构化知识库的自动化工具实践

1. 项目概述&#xff1a;一个面向开发者的轻量级对话记录工具最近在整理几个开源项目的技术讨论记录时&#xff0c;我又一次陷入了混乱。Slack、Discord、Telegram、微信……不同平台的聊天记录散落各处&#xff0c;格式五花八门&#xff0c;想回溯一个关键的技术决策或一个报错…...

告别卡顿!CXPatcher:让Mac上的Windows游戏性能飙升的终极修复工具

告别卡顿&#xff01;CXPatcher&#xff1a;让Mac上的Windows游戏性能飙升的终极修复工具 【免费下载链接】CXPatcher A patcher to upgrade Crossover dependencies and improve compatibility 项目地址: https://gitcode.com/gh_mirrors/cx/CXPatcher 你是否曾在Mac上…...