### Godot version

4.0 beta 10

### System information

Android 12gb ram Mediatek G95

### Issue description

Editor is crashing when opening a project from pc to Android editor. 

### Steps to reproduce

Create a scene from pc editor MEDIUM complex.
Now try to open it in Android editor. 

### Minimal reproduction project

https://github.com/selgesel/godot4-third-person-controller
This project. 

### I recommend.
I recommend to add a crash handler for Android editor.
CustomActivityoncrash is a good library to handle crash and logs are displayed on screen. 
} else { 
				for (int j = 2; j < ic; j++) {
					facesw[widx++] = vr[ir[j - 2]];
					facesw[widx++] = vr[ir[j - 1]];
					facesw[widx++] = vr[ir[j]];
				}
			}
		} else {
			if (primitive == PRIMITIVE_TRIANGLES) {
				for (int j = 0; j < vc; j++) {
					facesw[widx++] = vr[j];
				}
			} else { 
				for (int j = 2; j < vc; j++) {
					facesw[widx++] = vr[j - 2];
					facesw[widx++] = vr[j - 1];
					facesw[widx++] = vr[j];
				}
			}
		}
		int32_t to_index = widx / 3;
		for (int j = from_index; j < to_index; j++) {
			surface_indicesw[j] = i;
		}
	}
	triangle_mesh = Ref<TriangleMesh>(memnew(TriangleMesh));
	triangle_mesh->create(faces);
	return triangle_mesh;
}
Ref<TriangleMesh> Mesh::generate_surface_triangle_mesh(int p_surface) const {