I'm looking for suggestions and/or resources to help me debug an issue I'm having with an App I developed for Windows Phone. The App has a static class which contains a bunch of constants. Most of the constants are in the format of read-only arrays of value types. The value types are complex, but only contain intrinsic values types (like int, float, etc) and strings.
The problem I'm facing (only happens on some WP8 devices) is that when the static class' constructor initializes the App crashes with an IndexOutOfRangeException. This only happens on Windows Phone 8 and only on some devices (none of which I own of course). This does not reproduce in the emulators.
If anyone knows of good debugging tactics for issues like this, or common problematic patterns I should be looking for, please let me know.
The large static data blobs were the source of the problem. For reasons not completely understood, on several multicore systems the initialization (JIT) was happening out of order and causing errors. Thus the IndexOutOfBoundsExceptions being thrown.
The solution was to break the data out into a separate file which is loaded at run-time into read-only arrays and otherwise treated identically.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments