Hi all,
So I'm programming using Arduino IDE, version 1.8.15 for a 64-Bit Windows computer, with an ESP32 Development Module. I'm making a flight computer for a model rocket, and I go to upload some code that I'd been working on for a few days. It starts compiling, and takes longer than usual for the green bar to start. After about 30 seconds, with the bar only having moved forward once, I get the following error message:
Arduino: 1.8.15 (Windows Store 1.8.49.0) (Windows 10), Board: "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, None"
runtime: out of memory: cannot allocate 1073741824-byte block (1086193664 in use)
fatal error: out of memory
runtime stack:
runtime.throw(0xcb7827, 0xd)
/home/jenkins/go-latest/src/runtime/panic.go:1116 +0x64
runtime.largeAlloc(0x3ffffe00, 0x12820101, 0x12e84620)
/home/jenkins/go-latest/src/runtime/malloc.go:1154 +0x103
runtime.mallocgc.func1()
/home/jenkins/go-latest/src/runtime/malloc.go:1047 +0x39
runtime.systemstack(0x0)
/home/jenkins/go-latest/src/runtime/asm_386.s:395 +0x53
runtime.mstart()
/home/jenkins/go-latest/src/runtime/proc.go:1041
goroutine 11 [running]:
runtime.systemstack_switch()
/home/jenkins/go-latest/src/runtime/asm_386.s:356 fp=0x1283de70 sp=0x1283de6c pc=0x45ccd0
runtime.mallocgc(0x3ffffe00, 0xbb4ee0, 0x1201, 0x12ea6c00)
/home/jenkins/go-latest/src/runtime/malloc.go:1046 +0x686 fp=0x1283dec4 sp=0x1283de70 pc=0x40b316
runtime.makeslice(0xbb4ee0, 0x3ffffe00, 0x3ffffe00, 0x4d8008)
/home/jenkins/go-latest/src/runtime/slice.go:49 +0x4f fp=0x1283ded8 sp=0x1283dec4 pc=0x4465ef
bytes.makeSlice(0x3ffffe00, 0x0, 0x0, 0x0)
/home/jenkins/go-latest/src/bytes/buffer.go:229 +0x64 fp=0x1283def4 sp=0x1283ded8 pc=0x4f7b74
bytes.(*Buffer).grow(0x12df2e20, 0x200, 0x129c)
/home/jenkins/go-latest/src/bytes/buffer.go:142 +0x11c fp=0x1283df1c sp=0x1283def4 pc=0x4f75cc
bytes.(*Buffer).ReadFrom(0x12df2e20, 0xdf6950, 0x12eb23b0, 0x32f91e58, 0x12df2e20, 0x1, 0x12e84620)
/home/jenkins/go-latest/src/bytes/buffer.go:202 +0x45 fp=0x1283df58 sp=0x1283df1c pc=0x4f79a5
io.copyBuffer(0xdf3a10, 0x12df2e20, 0xdf6950, 0x12eb23b0, 0x0, 0x0, 0x0, 0x11857, 0x404724, 0x12e86280, ...)
/home/jenkins/go-latest/src/io/io.go:391 +0x29b fp=0x1283df98 sp=0x1283df58 pc=0x46b32b
io.Copy(...)
/home/jenkins/go-latest/src/io/io.go:364
os/exec.(*Cmd).writerDescriptor.func1(0x12e86280, 0x1283dfdc)
/home/jenkins/go-latest/src/os/exec/exec.go:311 +0x55 fp=0x1283dfd4 sp=0x1283df98 pc=0x51ef35
os/exec.(*Cmd).Start.func1(0x13148000, 0x129c6250)
/home/jenkins/go-latest/src/os/exec/exec.go:441 +0x1d fp=0x1283dfe8 sp=0x1283dfd4 pc=0x51ef9d
runtime.goexit()
/home/jenkins/go-latest/src/runtime/asm_386.s:1337 +0x1 fp=0x1283dfec sp=0x1283dfe8 pc=0x45e5e1
created by os/exec.(*Cmd).Start
/home/jenkins/go-latest/src/os/exec/exec.go:440 +0x4f4
goroutine 1 [syscall, locked to thread]:
syscall.Syscall(0x773530d0, 0x2, 0x37c, 0xffffffff, 0x0, 0x0, 0x0, 0x0)
/home/jenkins/go-latest/src/runtime/syscall_windows.go:188 +0xbb
syscall.WaitForSingleObject(0x37c, 0xffffffff, 0x12bbc030, 0x0, 0x0)
/home/jenkins/go-latest/src/syscall/zsyscall_windows.go:738 +0x53
os.(*Process).wait(0x12bbc030, 0x0, 0x0, 0x0)
/home/jenkins/go-latest/src/os/exec_windows.go:18 +0x70
os.(*Process).Wait(...)
/home/jenkins/go-latest/src/os/exec.go:125
os/exec.(*Cmd).Wait(0x13148000, 0x0, 0x0)
/home/jenkins/go-latest/src/os/exec/exec.go:507 +0x53
github.com/arduino/arduino-cli/legacy/builder/utils.ExecCommand(0x1290a200, 0x13148000, 0x2, 0x3, 0x9, 0x10, 0x13148000, 0x0, 0x0, 0x129c6160, ...)
/home/jenkins/go/pkg/mod/github.com/arduino/arduino-cli@v0.0.0-20210514123546-d710b642ef79/legacy/builder/utils/utils.go:205 +0x1e0
github.com/arduino/arduino-cli/legacy/builder.GCCPreprocRunnerForDiscoveringIncludes(0x1290a200, 0x12eb23e8, 0x12eb23f0, 0x12e86880, 0x9, 0x10, 0x0, 0x0, 0x1fe00, 0xdf52f0, ...)
/home/jenkins/go/pkg/mod/github.com/arduino/arduino-cli@v0.0.0-20210514123546-d710b642ef79/legacy/builder/gcc_preproc_runner.go:50 +0x10d
github.com/arduino/arduino-cli/legacy/builder.findIncludesUntilDone(0x1290a200, 0x12d861c0, 0xb590e0, 0x12d87080, 0x12eb23a8, 0x12aac100, 0x0)
/home/jenkins/go/pkg/mod/github.com/arduino/arduino-cli@v0.0.0-20210514123546-d710b642ef79/legacy/builder/container_find_includes.go:340 +0x972
github.com/arduino/arduino-cli/legacy/builder.(*ContainerFindIncludes).Run(0x13db448, 0x1290a200, 0x13db448, 0x0)
/home/jenkins/go/pkg/mod/github.com/arduino/arduino-cli@v0.0.0-20210514123546-d710b642ef79/legacy/builder/container_find_includes.go:137 +0x408
github.com/arduino/arduino-cli/legacy/builder.runCommands(0x1290a200, 0x12849df8, 0x20, 0x20, 0x0, 0x0)
/home/jenkins/go/pkg/mod/github.com/arduino/arduino-cli@v0.0.0-20210514123546-d710b642ef79/legacy/builder/builder.go:191 +0x198
github.com/arduino/arduino-cli/legacy/builder.(*Builder).Run(0x1286bf26, 0x1290a200, 0x13db380, 0x130f24b0)
/home/jenkins/go/pkg/mod/github.com/arduino/arduino-cli@v0.0.0-20210514123546-d710b642ef79/legacy/builder/builder.go:97 +0x7c8
github.com/arduino/arduino-cli/legacy/builder.RunBuilder(...)
/home/jenkins/go/pkg/mod/github.com/arduino/arduino-cli@v0.0.0-20210514123546-d710b642ef79/legacy/builder/builder.go:209
main.main()
/home/jenkins/workspace/arduino-builder-all-cross-cli-inception/main.go:401 +0x73f
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.49.0_x86__mdqgnx93n4wtt\arduino-builder returned 2
Error compiling for board ESP32 Dev Module.
Looking at the first 'Out of Memory' error, I tried increasing memory in various ways, deleting unused files, closing apps, etcetera. But alas, the error persisted. Consulting google showed that different people had the same (or a similar) message, but none of their solutions helped me. I uninstalled IDE, and reinstalled it, to no avail. I tried changing versions, and even attempted to use the 2.0 Beta release, but none of that worked. This happens with every board, every sketch, and every version I try to use. If you'd like me to send the program as well, I can, but since it contains multiple tabs, is quite large, and it seems that the problem is not specific to it, I did not.
Thanks.