Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Random TA Error? via LL Bug Report #123

Closed
JoshPiper opened this issue Dec 20, 2019 · 8 comments
Closed

Random TA Error? via LL Bug Report #123

JoshPiper opened this issue Dec 20, 2019 · 8 comments
Labels
bug Something's broken that shouldn't be.

Comments

@JoshPiper
Copy link
Member

JoshPiper commented Dec 20, 2019

Error Messages (if any)

[ERROR] addons/photon/lua/autorun/photon/sh_emv_helper.lua:142: attempt to index a nil value
*  1. GetTASequence - addons/photon/lua/autorun/photon/sh_emv_helper.lua:142*
*   2. FetchUsedLights - addons/photon/lua/autorun/photon/sh_emv_helper.lua:273*
*    3. Photon_CalculateUsedLights - addons/photon/lua/autorun/photon/cl_emv_meta.lua:178*
*     4. Photon_GetELUsedLights - addons/photon/lua/autorun/photon/cl_emv_meta.lua:173*
*      5. Photon_UpdateFrameLightPositions - addons/photon/lua/autorun/photon/cl_emv_meta.lua:317*
*       6. Photon_RenderEL - addons/photon/lua/autorun/photon/cl_emv_meta.lua:383*
*        7. DrawEMVLights - addons/photon/lua/autorun/photon/cl_emv_init.lua:44*
*         8. v - addons/photon/lua/autorun/photon/cl_emv_init.lua:92*
*          9. unknown - lua/includes/modules/hook.lua:84

Details

  • Source (Workshop / Github): Github v73 tag.
@JoshPiper JoshPiper added the bug Something's broken that shouldn't be. label Dec 20, 2019
@creator2013
Copy link
Member

creator2013 commented Feb 17, 2020

[ERROR] lua/autorun/photon/sh_emv_helper.lua:142: attempt to index a nil value
  1. GetTASequence - lua/autorun/photon/sh_emv_helper.lua:142
   2. FetchUsedLights - lua/autorun/photon/sh_emv_helper.lua:273
    3. Photon_CalculateUsedLights - lua/autorun/photon/cl_emv_meta.lua:178
     4. Photon_GetELUsedLights - lua/autorun/photon/cl_emv_meta.lua:173
      5. Photon_UpdateFrameLightPositions - lua/autorun/photon/cl_emv_meta.lua:317
       6. Photon_RenderEL - lua/autorun/photon/cl_emv_meta.lua:383
        7. DrawEMVLights - lua/autorun/photon/cl_emv_init.lua:44
         8. v - lua/autorun/photon/cl_emv_init.lua:92
          9. unknown - lua/includes/modules/hook.lua:84

I assume that this happened after a photon car got spawned via a car dealer (spawned correctly).
It seems that a car with components, which use bone manipulation, caused this error. The props of the car didn't get spawned. Error got spammed while the car was still on the world.

@creator2013
Copy link
Member

According to someone in photon support he gets this error as soon as a photon car leaves the players rendering radius. The props will stay in the position where the car left the radius.

@CGMonkey01
Copy link

I am the person from photon support. Information was miscommunicated. The components and props stay in the position where the car left the view radius, but I only get spammed the error when the car activates its lights after it reenters the view radius. The floating components do not activate, they are just the models. However, this is all inconsistent and hasn't proven to be a reliable way to recreate this error.

My vehicles are spawned through the spawn menu. No car dealer.

@CGMonkey01
Copy link

CGMonkey01 commented Apr 15, 2020

Result of adding code to line 141:

print(name)
print(option)
print(vehicle)
if IsValid(vehicle) and name then print(EMVU.Sequences[name]) else print ("1") end
if IsValid(vehicle) and name then print(EMVU.Sequences[name]["Traffic"]) else print ("2") end
if IsValid(vehicle) and name and option then print(EMVU.Sequences[name]["Traffic"][option]) else print ("3") end

Console output (spammed while lights are activated):

2015 Chevrolet Tahoe PPV
0
Vehicle [62][prop_vehicle_jeep]
table: 0x75873a90
table: 0x76af14e0
nil

[ERROR] addons/photon/lua/autorun/photon/sh_emv_helper.lua:149: attempt to index a nil value
  1. GetTASequence - addons/photon/lua/autorun/photon/sh_emv_helper.lua:149
   2. FetchUsedLights - addons/photon/lua/autorun/photon/sh_emv_helper.lua:280
    3. Photon_CalculateUsedLights - addons/photon/lua/autorun/photon/cl_emv_meta.lua:178
     4. Photon_GetELUsedLights - addons/photon/lua/autorun/photon/cl_emv_meta.lua:173
      5. Photon_UpdateFrameLightPositions - addons/photon/lua/autorun/photon/cl_emv_meta.lua:317
       6. Photon_RenderEL - addons/photon/lua/autorun/photon/cl_emv_meta.lua:383
        7. DrawEMVLights - addons/photon/lua/autorun/photon/cl_emv_init.lua:44
         8. fn - addons/photon/lua/autorun/photon/cl_emv_init.lua:92
          9. unknown - addons/ulib/lua/ulib/shared/hook.lua:109

So from doing some random testing. Does not work being near each other. At a far distance, if you spawn your car right after the other person spawns their car you have a chance of getting the error when they turn on their lights. I was able to reproduce it a number of times but not consistently every time, which may have come down to timing trying to spawn my car after he spawns his car. Sometimes, if you did it quick enough and already had errors, they could spawn their car and you would see no equipment on the vehicle at all, nothing spammed in console, and no errors.

Hope this helps. If you need anything else, I am glad to help some more.

Forgot to add my imgur link with pics: https://imgur.com/a/j4np6tx

@creator2013
Copy link
Member

After following the code, the only reason why option is 0 would be because GetNW2Int returned the fallback because it wasn't able to get the var.

@CGMonkey01
Copy link

The car does have auxiliary lights. Also, error occurred today when i joined the server and he spawned a vehicle right next to me.

Line added:

if IsValid(vehicle) and name then PrintTable(EMVU.Sequences[name]["Traffic"]) else print ("4") end

Console Result:

[ERROR] addons/photon/lua/autorun/photon/sh_emv_helper.lua:150: attempt to index a nil value
  1. GetTASequence - addons/photon/lua/autorun/photon/sh_emv_helper.lua:150
   2. FetchUsedLights - addons/photon/lua/autorun/photon/sh_emv_helper.lua:281
    3. Photon_CalculateUsedLights - addons/photon/lua/autorun/photon/cl_emv_meta.lua:178
     4. Photon_GetELUsedLights - addons/photon/lua/autorun/photon/cl_emv_meta.lua:173
      5. Photon_UpdateFrameLightPositions - addons/photon/lua/autorun/photon/cl_emv_meta.lua:317
       6. Photon_RenderEL - addons/photon/lua/autorun/photon/cl_emv_meta.lua:383
        7. DrawEMVLights - addons/photon/lua/autorun/photon/cl_emv_init.lua:44
         8. fn - addons/photon/lua/autorun/photon/cl_emv_init.lua:92
          9. unknown - addons/ulib/lua/ulib/shared/hook.lua:109

2011 CVPI Wilco SO
0
Vehicle [71][prop_vehicle_jeep]
table: 0x7d235f28
table: 0x7d236400
nil
1:
		Components:
		Disconnect:
		EL_Disconnect:
				1	=	11
				2	=	12
				3	=	13
				4	=	14
				5	=	15
				6	=	48
				7	=	49
				8	=	53
				9	=	54
				10	=	53
				11	=	54
				12	=	58
				13	=	59
				14	=	58
				15	=	59
				16	=	58
				17	=	59
				18	=	63
				19	=	64
				20	=	63
				21	=	64
				22	=	63
				23	=	64
				24	=	63
				25	=	64
				26	=	68
				27	=	69
				28	=	68
				29	=	69
				30	=	68
				31	=	69
				32	=	68
				33	=	69
				34	=	68
				35	=	69
				36	=	73
				37	=	74
				38	=	73
				39	=	74
				40	=	73
				41	=	74
				42	=	73
				43	=	74
				44	=	73
				45	=	74
				46	=	73
				47	=	74
				48	=	78
				49	=	79
				50	=	78
				51	=	79
				52	=	78
				53	=	79
				54	=	78
				55	=	79
				56	=	78
				57	=	79
				58	=	78
				59	=	79
				60	=	78
				61	=	79
				62	=	83
				63	=	84
				64	=	83
				65	=	84
				66	=	83
				67	=	84
				68	=	83
				69	=	84
				70	=	83
				71	=	84
				72	=	83
				73	=	84
				74	=	83
				75	=	84
				76	=	83
				77	=	84
				78	=	88
				79	=	89
				80	=	88
				81	=	89
				82	=	88
				83	=	89
				84	=	88
				85	=	89
				86	=	88
				87	=	89
				88	=	88
				89	=	89
				90	=	88
				91	=	89
				92	=	88
				93	=	89
				94	=	88
				95	=	89
				96	=	93
				97	=	94
				98	=	93
				99	=	94
				100	=	93
				101	=	94
				102	=	93
				103	=	94
				104	=	93
				105	=	94
				106	=	93
				107	=	94
				108	=	93
				109	=	94
				110	=	93
				111	=	94
				112	=	93
				113	=	94
				114	=	93
				115	=	94
		Name	=	CRUISE
		Selection_Components:
				1:
						1:
								auto_fedsig_valor_corner_1	=	cruise
				7:
						1:
								auto_int5cruise_10	=	cruise
								auto_int5cruise_11	=	cruise
								auto_int5cruise_12	=	cruise
								auto_int5cruise_13	=	cruise
								auto_int5cruise_14	=	cruise
								auto_int5cruise_15	=	cruise
								auto_int5cruise_16	=	cruise
								auto_int5cruise_17	=	cruise
								auto_int5cruise_18	=	cruise
								auto_int5cruise_19	=	cruise
		Stage	=	C
2:
		Components:
		Disconnect:
		EL_Disconnect:
				1	=	17
				2	=	18
				3	=	19
				4	=	20
				5	=	21
				6	=	22
				7	=	23
				8	=	24
		Name	=	LEFT
		Selection_Components:
				1:
						1:
								auto_fedsig_valor_signalmaster_1	=	left
				4:
						1:
								auto_tomar_200s_rear_5	=	left
		Stage	=	L
3:
		Components:
		Disconnect:
		EL_Disconnect:
				1	=	17
				2	=	18
				3	=	19
				4	=	20
				5	=	21
				6	=	22
				7	=	23
				8	=	24
		Name	=	DIVERGE
		Selection_Components:
				1:
						1:
								auto_fedsig_valor_signalmaster_1	=	diverge
				4:
						1:
								auto_tomar_200s_rear_5	=	diverge
		Stage	=	D
4:
		Components:
		Disconnect:
		EL_Disconnect:
				1	=	17
				2	=	18
				3	=	19
				4	=	20
				5	=	21
				6	=	22
				7	=	23
				8	=	24
		Name	=	RIGHT
		Selection_Components:
				1:
						1:
								auto_fedsig_valor_signalmaster_1	=	right
				4:
						1:
								auto_tomar_200s_rear_5	=	right
		Stage	=	R

@creator2013
Copy link
Member

creator2013 commented Oct 14, 2020

After following the code, the only reason why option is 0 would be because GetNW2Int returned the fallback because it wasn't able to get the var.

After some testing on the server of my friend I get this result:

] lua_run_cl print(ents.FindByClass("prop_vehicle_jeep")[4]:GetNW2Int( "PhotonLE.EMV_TRF_OPTION" ))

[ulib] lua/autorun/photon/sh_emv_helper.lua:272: attempt to index a nil value
  1. GetTASequence - lua/autorun/photon/sh_emv_helper.lua:272
   2. FetchUsedLights - lua/autorun/photon/sh_emv_helper.lua:403
    3. Photon_CalculateUsedLights - lua/autorun/photon/cl_emv_meta.lua:183
     4. Photon_GetELUsedLights - lua/autorun/photon/cl_emv_meta.lua:178
      5. Photon_UpdateFrameLightPositions - lua/autorun/photon/cl_emv_meta.lua:324
       6. Photon_RenderEL - lua/autorun/photon/cl_emv_meta.lua:390
        7. DrawEMVLights - lua/autorun/photon/cl_emv_init.lua:44
         8. fn - lua/autorun/photon/cl_emv_init.lua:92
          9. unknown - addons/ulib/lua/ulib/shared/hook.lua:109 (x6)

0

It is indeed a networking issue and the default value causes this error to occur

@creator2013
Copy link
Member

#166 probably fixed this. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something's broken that shouldn't be.
Projects
None yet
Development

No branches or pull requests

3 participants