Search Issue Tracker

Fixed

Votes

0

Found in

4.6.1p5

Issue ID

671157

Regression

No

IL2CPP: Accessing System.Globalization.CurrentCulture.RegionInfo throws an exception

Scripting

-

See attached "GlobalizationIL2CPP" project.

Reproduction steps:
1 - Open attached GlobalizationIL2CPP project.
2 - Open Build Settings, switch to iOS build target
3 - Open Player Settings, ensure project is set to build with IL2CPP, Universal target
4 - Attach iOS device, if necessary
5 - Hit "Build & Run"
6 - Watch Unity build
7 - XCode launches and builds correctly-transpiled project
8 - Unity app runs on iOS device
9 - (EXPECTED) Unity app opens properly, logs out "null" and exits
9 - (OBSERVED) Unity app crashes with the following stacktrace:

2015-02-10 10:24:51.720 global[448:149057] -> registered mono modules
0xd68810
-> applicationDidFinishLaunching()
-> applicationDidBecomeActive()
Requesting Resolution: 768x1024
Renderer: PowerVR SGX 543
Vendor: Imagination Technologies
Version: OpenGL ES 2.0 IMGSGX543-113.3
GL_OES_depth_texture GL_OES_depth24 GL_OES_element_index_uint
GL_OES_fbo_render_mipmap GL_OES_mapbuffer GL_OES_packed_depth_stencil
GL_OES_rgb8_rgba8 GL_OES_standard_derivatives GL_OES_texture_float
GL_OES_texture_half_float GL_OES_texture_half_float_linear
GL_OES_vertex_array_object GL_EXT_blend_minmax
GL_EXT_color_buffer_half_float GL_EXT_debug_label GL_EXT_debug_marker
GL_EXT_discard_framebuffer GL_EXT_draw_instanced GL_EXT_instanced_arrays
GL_EXT_map_buffer_range GL_EXT_occlusion_query_boolean GL_EXT_pvrtc_sRGB
GL_EXT_read_format_bgra GL_EXT_separate_shader_objects
GL_EXT_shader_framebuffer_fetch GL_EXT_shader_texture_lod
GL_EXT_shadow_samplers GL_EXT_sRGB GL_EXT_texture_filter_anisotropic
GL_EXT_texture_rg GL_EXT_texture_storage GL_APPLE_clip_distance
GL_APPLE_color_buffer_packed_float GL_APPLE_copy_texture_levels
GL_APPLE_framebuffer_multisample GL_APPLE_rgb_422 GL_APPLE_sync
GL_APPLE_texture_format_BGRA8888 GL_APPLE_texture_max_level
GL_APPLE_texture_packed_float GL_IMG_read_format GL_IMG_texture_comp
ression_pvrtc
Creating OpenGLES2.0 graphics device
Initialize engine version: 4.6.2p1 (d5c84eeb5d80)
ArgumentException: Culture ID 0 (0x0000) is not a supported culture.
Parameter name: culture
at Mono.Globalization.Unicode.SimpleCollator.FilterOptions (Int32 i,
CompareOptions opt) [0x00000] in <filename unknown>:0
at System.Globalization.CultureInfo..ctor (Int32 culture, Boolean
useUserOverride, Boolean read_only) [0x00000] in <filename unknown>:0
at System.Globalization.CultureInfo.GetCultureInfo (Int32 culture)
[0x00000] in <filename unknown>:0
at System.Globalization.RegionInfo..ctor (Int32 culture) [0x00000] in
<filename unknown>:0
at System.Globalization.RegionInfo.get_CurrentRegion () [0x00000] in
<filename unknown>:0
at Logger.Start () [0x00000] in <filename unknown>:0
at Replacements.Attribute.CheckParameters (System.Object element,
System.Type attributeType) [0x00000] in <filename unknown>:0
Replacements.Attribute:CheckParameters(Object, Type)

(Filename: currently not available on il2cpp Line: -1)

Comments (1)

  1. xpkoalz

    Mar 26, 2015 04:33

    this is fixed? I'm faced with a similar issue with Unity 5.0, which I suspect is caused by writing a image file and saving it.

    IEnumerator SaveNewItem () { ....

    Texture2D tex = new Texture2D ((int)Screen.width, (int)rectHt, TextureFormat.ARGB32, false);
    Rect readArea = new Rect (0, Screen.height - (rectY + rectHt), Screen.width, rectHt);

    yield return new WaitForEndOfFrame ();

    tex.ReadPixels (readArea, 0, 0, false);
    tex.Apply ();
    byte[] bytes = tex.EncodeToJPG ();
    newdata.imagepath = Application.persistentDataPath + "/" + newdata.id + "_img.jpeg";
    FileManager.SaveImageFile (newdata.imagepath, bytes);
    ....
    }

    saves the file and displays it correctly..but fail on the 2nd time...with the error:
    (Filename: currently not available on il2cpp Line: -1)

    and this was resolved? how?

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.