Parametric methods crash server in bigger projects

Please select what you are reporting on:

Verse

What Type of Bug are you experiencing?

Verse

Summary

I’ve seen this issue in many projects with different types of parametric methods.

The bigger project gets the chance of parametric methods crashing server increases.

Example methods:

  • any array sort method
  • methods returning t like:
(Arr:[]t where t:type).FirstData<public>(Check:type{_(:t,:t2)<decides><transacts>:void}, Data:t2 where t2:type)<decides><transacts>:t=
	var Ret:?t = false
	N := Arr.Length
	var X :int= 0 
	loop:
		if(Item := Arr[X], Check[Item, Data]):
			set Ret = option. Item
			break

		set X += 1
		if(X >= N):
			break
			
	if(Item := Ret?):
		Item
	else:
		Fail[]
		Err()

Replacing these methods with non-parametric versions stops crashing.

Steps to Reproduce

  1. Open island with private version 5629-5012-5598
  2. Run
  3. Wait for player to fall down
  4. Crash (visible by top money popup not disappearing, waiting longer will kick player from the server)

It’s caused by line 167 in house_manager_devic.verse file, replacing with commented non parametric method stops crashing:

	GetAgentsHouse(Agent:agent)<decides><transacts>:house_manager=
		HouseManagers.FirstDataHouseAgent[IsPlayerOwningHouse, Agent]
		# HouseManagers.FirstData[IsPlayerOwningHouse, Agent]

Expected Result

No crash when using parametric method

Observed Result

Server crash

Platform(s)

Windows

Island Code

5629-5012-5598

The status of FORT-727850 incident has been moved from ‘Needs Triage’ to ‘To Do’.

Bump, anyone with the same issue - upvote please.

1 Like