groue / GRMustache

Flexible and production-ready Mustache templates for MacOS Cocoa and iOS
http://mustache.github.com/
MIT License
1.44k stars 190 forks source link

Some standard library filters not working on latest iOS (12.1) ONLY on device #113

Open elsurudo opened 5 years ago

elsurudo commented 5 years ago

As of the most current iOS version (12.1), using a filter such as uppercase or lowercase causes the rendering to fail with an error such as the following:

Object does not conform to GRMustacheFilter protocol in tag '{{ uppercase(depthString) }}' at line 1 of template

I dug into the debugger on the error and noticed something strange when this line of GRMustacheExpressionInvocation.m is executed:

image

The _value, _filterExpression and argumentExpression look fine, but why is filter a BOOL? Without being familiar with the internals, I so far have no idea how it could arrive at this state.

The strange thing is that this works without error on the simulator (also iOS 12.1)! I also tried lowercase for kicks – same results. When I remove the filter, it works on both device and simulator...

I am using GRMustache 7.3.2 (currently the latest).

Any idea of what the issue may be? I'm not doing any crazy multithreading so a memory stomp seems unlikely (and besides, I can reproduce this every time based on the input).