-
Notifications
You must be signed in to change notification settings - Fork 12
Closed
Description
Hey there!
I was trying to use this amazing package to do some manipulation to the RNTesterPods project, in the React Native repository.
As you know, we are moving away from Cocoapods toward SwiftPM, but we still need a solution to modify the Xcode project.
The problem I'm facing is that the build function goes in OOM when trying to create the String representation of the RNTesterPods project.
This is the full stack trace:
<--- Last few GCs --->
[32490:0x130008000] 20341 ms: Scavenge (interleaved) 4043.1 (4121.6) -> 4043.0 (4122.6) MB, pooled: 0 MB, 10.00 / 0.00 ms (average mu = 0.121, current mu = 0.058) allocation failure;
[32490:0x130008000] 20431 ms: Scavenge (interleaved) 4044.1 (4122.6) -> 4044.1 (4145.3) MB, pooled: 0 MB, 90.04 / 0.00 ms (average mu = 0.121, current mu = 0.058) allocation failure;
<--- JS stacktrace --->
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
----- Native stack trace -----
1: 0x1042ef484 node::OOMErrorHandler(char const*, v8::OOMDetails const&) [/Users/cipolleschi/.nvm/versions/node/v22.15.0/bin/node]
2: 0x1044b5a48 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [/Users/cipolleschi/.nvm/versions/node/v22.15.0/bin/node]
3: 0x1046c39a0 v8::internal::Heap::stack() [/Users/cipolleschi/.nvm/versions/node/v22.15.0/bin/node]
4: 0x1046c1d40 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/Users/cipolleschi/.nvm/versions/node/v22.15.0/bin/node]
5: 0x1046b6328 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/Users/cipolleschi/.nvm/versions/node/v22.15.0/bin/node]
6: 0x1046b6b60 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/Users/cipolleschi/.nvm/versions/node/v22.15.0/bin/node]
7: 0x104699e80 v8::internal::Factory::NewFillerObject(int, v8::internal::AllocationAlignment, v8::internal::AllocationType, v8::internal::AllocationOrigin) [/Users/cipolleschi/.nvm/versions/node/v22.15.0/bin/node]
8: 0x104ab555c v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [/Users/cipolleschi/.nvm/versions/node/v22.15.0/bin/node]
9: 0x104f75e9c Builtins_WasmCEntry [/Users/cipolleschi/.nvm/versions/node/v22.15.0/bin/node]
10: 0x104f762e4 Builtins_StringAdd_CheckNone [/Users/cipolleschi/.nvm/versions/node/v22.15.0/bin/node]
11: 0x10ae8d520
12: 0x10ae8d4d8
13: 0x10ae8d4d8
14: 0x10ae8d4d8
15: 0x10ae8d4d8
16: 0x10ae8d4d8
17: 0x10ae8d4d8
18: 0x10ae8d4d8
19: 0x10ae8d4d8
20: 0x10ae8d4d8
21: 0x10ae8d4d8
22: 0x10ae8d4d8
23: 0x10ae8d4d8
24: 0x10ae8d4d8
25: 0x10ae8d4d8
26: 0x10ae8d4d8
27: 0x10ae8d4d8
28: 0x10ae8d4d8
29: 0x10ae8d4d8
30: 0x10ae8d4d8
31: 0x10ae8d4d8
32: 0x10ae8d4d8
33: 0x10ae8d4d8
34: 0x10ae8d4d8
35: 0x10ae8d4d8
36: 0x10ae8d4d8
37: 0x10ae8d4d8
38: 0x10ae8d4d8
39: 0x10ae8d4d8
40: 0x10ae8d4d8
41: 0x10ae8d4d8
42: 0x10ae8d4d8
43: 0x10ae8d4d8
44: 0x10ae8d4d8
45: 0x10ae8d4d8
46: 0x10ae8d4d8
47: 0x10ae8d4d8
48: 0x10ae8d4d8
49: 0x10ae8d4d8
50: 0x10ae8d4d8
51: 0x10ae8d4d8
52: 0x10ae8d4d8
53: 0x10ae8d4d8
54: 0x10ae8d4d8
55: 0x10ae8d4d8
56: 0x10ae8d4d8
57: 0x10ae8d4d8
58: 0x10ae8d4d8
59: 0x10ae8d4d8
60: 0x10ae8d4d8
61: 0x10ae8d4d8
62: 0x10ae8d4d8
63: 0x10ae8d4d8
64: 0x10ae8d4d8
65: 0x10ae8d4d8
66: 0x10ae8d4d8
67: 0x10ae8d4d8
68: 0x10ae8d4d8
69: 0x10ae8d4d8
70: 0x10ae8d4d8
71: 0x10ae8d4d8
72: 0x10ae8d4d8
73: 0x10ae8d4d8
74: 0x10ae8d4d8
75: 0x10ae8d4d8
76: 0x10ae8d4d8
77: 0x10ae8d4d8
78: 0x10ae8d4d8
79: 0x10ae8d4d8
80: 0x10ae8d4d8
81: 0x10ae8d4d8
82: 0x10ae8d4d8
83: 0x10ae8d4d8
84: 0x10ae8d4d8
85: 0x10ae8d4d8
86: 0x10ae8d4d8
87: 0x10ae8d4d8
88: 0x10ae8d4d8
89: 0x10ae8d4d8
90: 0x10ae8d4d8
91: 0x10ae8d4d8
92: 0x10ae8d4d8
93: 0x10ae8d4d8
94: 0x10ae8d4d8
95: 0x10ae8d4d8
96: 0x10ae8d4d8
97: 0x10ae8d4d8
98: 0x10ae8d4d8
99: 0x10ae8d4d8
100: 0x10ae8d4d8
101: 0x10ae8d4d8
102: 0x10ae8d4d8
103: 0x10ae8d4d8
104: 0x10ae8d4d8
105: 0x10ae8d4d8
106: 0x10ae8d4d8
107: 0x10ae8d4d8
108: 0x10ae8d4d8
109: 0x10ae8d4d8
110: 0x10ae8d4d8
111: 0x10ae8d4d8
112: 0x10ae8d4d8
113: 0x10ae8d4d8
114: 0x10ae8d4d8
115: 0x10ae8d4d8
116: 0x10ae8d4d8
117: 0x10ae8d4d8
118: 0x10ae8d4d8
119: 0x10ae8d4d8
120: 0x10ae8d4d8
121: 0x10ae8d4d8
122: 0x10ae8d4d8
123: 0x10ae8d4d8
124: 0x10ae8d4d8
125: 0x10ae8d4d8
126: 0x10ae8d4d8
127: 0x10ae8d4d8
128: 0x10ae8d4d8
129: 0x10ae8d4d8
130: 0x10ae8d4d8
131: 0x10ae8d4d8
132: 0x10ae8d4d8
133: 0x10ae8d4d8
134: 0x10ae8d4d8
135: 0x10ae8d4d8
136: 0x10ae8d4d8
137: 0x10ae8d4d8
138: 0x10ae8d4d8
139: 0x10ae8d4d8
140: 0x10ae8d4d8
141: 0x10ae8d4d8
142: 0x10ae8d4d8
143: 0x10ae8d4d8
144: 0x10ae8d4d8
145: 0x10ae8d4d8
146: 0x10ae8d4d8
147: 0x10ae8d4d8
148: 0x10ae8d4d8
149: 0x10ae8d4d8
150: 0x10ae8d4d8
151: 0x10ae8d4d8
152: 0x10ae8d4d8
153: 0x10ae8d4d8
154: 0x10ae8d4d8
155: 0x10ae8d4d8
156: 0x10ae8d4d8
157: 0x10ae8d4d8
158: 0x10ae8d4d8
159: 0x10ae8d4d8
160: 0x10ae8d4d8
161: 0x10ae8d4d8
162: 0x10ae8d4d8
163: 0x10ae8d4d8
164: 0x10ae8d4d8
165: 0x10ae8d4d8
166: 0x10ae8d4d8
167: 0x10ae8d4d8
168: 0x10ae8d4d8
169: 0x10ae8d4d8
170: 0x10ae8d4d8
171: 0x10ae8d4d8
172: 0x10ae8d4d8
173: 0x10ae8d4d8
174: 0x10ae8d4d8
175: 0x10ae8d4d8
176: 0x10ae8d4d8
177: 0x10ae8d4d8
178: 0x10ae8d4d8
179: 0x10ae8d4d8
180: 0x10ae8d4d8
181: 0x10ae8d4d8
182: 0x10ae8d4d8
183: 0x10ae8d4d8
184: 0x10ae8d4d8
185: 0x10ae8d4d8
186: 0x10ae8d4d8
187: 0x10ae8d4d8
188: 0x10ae8d4d8
189: 0x10ae8d4d8
190: 0x10ae8d4d8
191: 0x10ae8d4d8
192: 0x10ae8d4d8
193: 0x10ae8d4d8
194: 0x10ae8d4d8
195: 0x10ae8d4d8
196: 0x10ae8d4d8
197: 0x10ae8d4d8
198: 0x10ae8d4d8
199: 0x10ae8d4d8
200: 0x10ae8d4d8
201: 0x10ae8d4d8
202: 0x10ae8d4d8
203: 0x10ae8d4d8
204: 0x10ae8d4d8
205: 0x10ae8d4d8
206: 0x10ae8d4d8
207: 0x10ae8d4d8
208: 0x10ae8d4d8
209: 0x10ae8d4d8
210: 0x10ae8d4d8
211: 0x10ae8d4d8
212: 0x10ae8d4d8
213: 0x10ae8d4d8
214: 0x10ae8d4d8
215: 0x10ae8d4d8
216: 0x10ae8d4d8
217: 0x10ae8d4d8
218: 0x10ae8d4d8
219: 0x10ae8d4d8
220: 0x10ae8d4d8
221: 0x10ae8d4d8
222: 0x10ae8d4d8
223: 0x10ae8d4d8
224: 0x10ae8d4d8
225: 0x10ae8d4d8
226: 0x10ae8d4d8
227: 0x10ae8d4d8
228: 0x10ae8d4d8
229: 0x10ae8d4d8
230: 0x10ae8d4d8
231: 0x10ae8d4d8
232: 0x10ae8d4d8
233: 0x10ae8d4d8
234: 0x10ae8d4d8
235: 0x10ae8d4d8
236: 0x10ae8d4d8
237: 0x10ae8d4d8
238: 0x10ae8d4d8
239: 0x10ae8d4d8
240: 0x10ae8d4d8
241: 0x10ae8d4d8
242: 0x10ae8d4d8
243: 0x10ae8d4d8
244: 0x10ae8d4d8
245: 0x10ae8d4d8
246: 0x10ae8d4d8
247: 0x10ae8d4d8
248: 0x10ae8d4d8
249: 0x10ae8d4d8
250: 0x10ae8d4d8
251: 0x10ae8d4d8
252: 0x10ae8d4d8
253: 0x10ae8d4d8
254: 0x10ae8d4d8
255: 0x10ae8d4d8
I prepared a reproducer for this problem in this PR in the React Native repo.
To test this out, you can simply:
git clone https://github.com/facebook/react-native
cd react-native
git checkout cipolleschi/integrate-bacons/xcode // this is not a fork
yarn
cd packages/rn-tester
node scripts/test-bacons-xcode.js
Let me know if I can help somehow!
Edit: I tried to debug the Writer a little and there is something weird happening.
The indent variable reaches a value of 417, which is clearly not correct!

Metadata
Metadata
Assignees
Labels
No labels