Split off from the topic JSBSim Piper J-3 Cub.
I have an issue with both the nasal light manager that controls procedural spot lights and the effects framework built in ALS interior landing light system.
They both are throwing a segfault when I either change to the exterior view or change the interior view to look out the left window. The left side, or wing, just so happens to be where the landing and taxi light objects happen to be located. I don't think that has anything to do with it though as I completely removed all other object animation, selection and effects pertaining to the landing and taxi light objects. Besides that the procedural lights really don't have anything to do specifically with the "left" side or views in any manner that I am aware of.
Now to complicate this, the exterior procedural and procedural spot nav lights are working fine. They are managed partially with the nasal view manager as well. You can even have the landing and taxi lights on and look to the right nav light from the interior view and not cause the segfault.
I have isolated only using default ALS lights (ie: /sim/rendering/als-secondary-lights) or only ALS procedural spot lights and they both trigger the segfault when looking to the left or going to an exterior view. Yet the nav spot and procedural work fine.
So I don't think the relationship is ALS procedural to either object animations, selections, or other lighting effects.
I think this is something deeper.
Now to add to this. This all started awhile back after some core changes I never isolated. The c172p started developing a similarly caused segfault (don't recall the exact trigger) other than it was related to the ALS nasal light manager. It had to do with where the listeners were located in the code section. Thanks to Richard who figured out that it was related to the listener locations (I think that was the bottom line) it was fixed in the c172p.
Unless I missed something (very well could have) the J3/pa-18 code is mostly the same as the c172p.
My code in the J3/PA-18 is unique in it is the only aircraft that is using this combination of procedural and ALS lighting effects all together. The c172p is close but not exactly the same.
The biggest difference between the two is the c172p is using only one spot light (nasal light manager controlled) that uses the "stretch" parameter and the J3 is using two spot lights that use the stretch parameter.
I know this is a lot of information and probably not explained all that well as I find it difficult to explain all the different effects used and their appropriate names when describing this. Nor the exact issue the c172p had that has been fixed. However the same steps taken on the c172p to fix it were done to the j3/pa-18, or at least I attempted this.
I could really use some help figuring this out and if it was something I am doing wrong or something else. Unfortunately the code for all this is complex. I think it all resides in Nasal/light-manager.nas and Systems/als-lights.xml as well as the ALS shader effects coding in fgdata and of course the object switch animations in Models/ j3cub.xml and Models/ pa-18.xml
I'm going to keep digging in the code but I am stumped at the moment and have no choice but to turn off the effects until it is figured out.
Examining any differences between the effects code of the c172p and j3/pa-18 may hold a clue.
I'm hoping a fresh set of eyes will spot something obvious.