App crashes immediately due to segmentation fault 11 error! HELP!

Hi there everyone!

 

I have encountered a problem with implementation of a custom shader that for some odd reason, causes my app to crash on an iPhone 5 and iPad mini  but not an iPhone 6 or iPhone 6 plus!   I am getting a segmentation fault 11 error that causes my app to crash immediately after it is opened.  Any help is appreciated!  

 

Below is the code for my custom shader and my implementation of it:

 

  1. –kernel file to make shader
  2. local kernel = {}
  3.  
  4. kernel.language = “glsl”
  5. kernel.category = “generator”
  6. kernel.name = “wheel”
  7. kernel.isTimeDependent = true
  8.  
  9.  
  10. kernel.fragment =
  11. [[
  12. P_COLOR vec4 FragmentKernel( P_UV vec2 texCoord )
  13. {
  14. P_UV vec2 pos = 2. * (texCoord - .5); // Get relative position and normalize it to [-1, 1]
  15.     P_UV float len = length(pos);
  16.  
  17.     if (len > .9) return vec4(0.); // “outside”, use clear color
  18. if (len < .8) return vec4(0., 0., 1., 0.); // inner body, blue
  19.  
  20. P_UV float PI_OVER_TWO = 2. * atan(1.); // arctangent of 1 = pi / 4
  21. P_UV float angle = atan(pos.y, pos.x); // returns value in [-pi / 2, pi / 2]
  22.  
  23. if (angle < -PI_OVER_TWO) return vec4(1., 0., 0., 1.); // red
  24. else if (angle < 0.) return vec4(1., 1., 0., 1.); // yellow
  25. else if (angle < PI_OVER_TWO) return vec4(.5, 0., .5, 1.); // purple;
  26. else return vec4(0., 1., 0., 1.); // green
  27. }
  28.  
  29.  
  30. ]]
  31. return kernel

 

 

  1. –place in menu file where shader is implemented 
  2. –create circle to be made into wheel
  3. local wheel = display.newCircle(150, 100, 100)
  4. wheel.x = display.contentCenterX; wheel.y = display.contentCenterY
  5. wheel:scale(1.7, 1.7)
  6. group:insert(wheel)
  7. print(“creating circle”)
  8.  
  9.  
  10. –initialize kernel to create wheel effect
  11. local kernel = require “kernel_generator_custom_wheel”
  12. graphics.defineEffect( kernel )
  13.  
  14. –create wheel using effect on circle
  15. wheel.fill.effect = “generator.custom.wheel”
  16. print(“create wheel effect”)

What version of Corona are you using? My app was crashing as well (noticed segmentation fault 11 in my iOS log), but only at a certain section when I was using touch interactions.

I was using version 2015.2598. 

App stopped crashing once I started using 2015.2617

I know it’s a long shot that we’re having the same exact issue, but figured I’d try. 

Good luck!

What version of Corona are you using? My app was crashing as well (noticed segmentation fault 11 in my iOS log), but only at a certain section when I was using touch interactions.

I was using version 2015.2598. 

App stopped crashing once I started using 2015.2617

I know it’s a long shot that we’re having the same exact issue, but figured I’d try. 

Good luck!