### 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. 
int32_t *surface_indicesw = surface_indices.ptrw();
	int widx = 0;
	for (int i = 0; i < get_surface_count(); i++) {
		Mesh::PrimitiveType primitive = surface_get_primitive_type(i);
		if (primitive != PRIMITIVE_TRIANGLES && primitive != PRIMITIVE_TRIANGLE_STRIP) {
			continue;
		}
		int len = (surface_get_format(i) & ARRAY_FORMAT_INDEX) ? surface_get_array_index_len(i) : surface_get_array_len(i);
		if ((primitive == PRIMITIVE_TRIANGLES && (len == 0 || (len % 3) != 0)) ||
				(primitive == PRIMITIVE_TRIANGLE_STRIP && len < 3) ||
				(surface_get_format(i) & ARRAY_FLAG_USES_EMPTY_VERTEX_ARRAY)) {
			
			continue;
		}
		Array a = surface_get_arrays(i);
		ERR_FAIL_COND_V(a.is_empty(), Ref<TriangleMesh>());
		int vc = surface_get_array_len(i);
		Vector<Vector3> vertices = a[ARRAY_VERTEX];
		ERR_FAIL_COND_V(vertices.is_empty(), Ref<TriangleMesh>());
		const Vector3 *vr = vertices.ptr();
		int32_t from_index = widx / 3;
		if (surface_get_format(i) & ARRAY_FORMAT_INDEX) {
			int ic = surface_get_array_index_len(i);
			Vector<int> indices = a[ARRAY_INDEX];
			const int *ir = indices.ptr();
			if (primitive == PRIMITIVE_TRIANGLES) {
				for (int j = 0; j < ic; j++) {
					int index = ir[j];
					facesw[widx++] = vr[index];
				}