View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003302 | The Dark Mod | Coding | public | 25.01.2013 23:50 | 27.01.2013 00:12 |
Reporter | Obsttorte | Assigned To | tels | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | TDM 1.08 | ||||
Target Version | TDM 2.00 | Fixed in Version | TDM 2.00 | ||
Summary | 0003302: Placing the playerstart inside a trigger_once_entityname causes crash. | ||||
Description | If you set the place the playerstart inside a trigger_once_entityname entity which reacts to the player (by setting "entityname" "player1", the map will crash after you pressed the mouse button after map load. The error message is "Event overflow: possible infinite loop in script". | ||||
Steps To Reproduce | make a brush, create entity trigger_once_entityname, set the spawnarg "entityname" "player1" on it, move the playerstart inside the trigger volume, start the map | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
related to | 0003308 | closed | nbohr1more | Targets of worldspawn are triggered in frame 0, but their script objects are initialized later |
I cannot really replicate the issue, but I found another (or releated) bug: Putting warnings inside the code and adding a function shows this: WARNING:idTrigger_EntityName 'trigger_once_entityname_1' TriggerAction was called WARNING:idTrigger_EntityName 'trigger_once_entityname_1' was touched (next: 0, time 0) [other messages] WARNING:idTrigger_EntityName 'trigger_once_entityname_1' was touched (next: 1, time 16) WARNING:idTrigger_EntityName 'trigger_once_entityname_1' TriggerAction was called [other messages] myfunc called from myfunc called from Which indicates that the trigger fired twice, even tho it should only fire once. However, I cannot make it fire infinitely. Can you please provide a small testmap that exhibits the crash? |
|
Sorry. I forgot to mention that the trigger targets an electric lamp. | |
File uploaded. | |
Thank you, can now reproduce the crash. Since the trigger is only triggered twice, the event queue shouldn't overflow, but who knows what's happening. Maybe it schedules the event before the event system is initialized? Investigating... |
|
The reason the event queue overflowed was because the trigger was targeting a light. The trigger was then tiggered in frame number 0, while the light's script object is not initialized until frame number 1. This caused the light to flip/flop between On/Off states because the script object thought the light was on, while the light thought it was off. This caused an event queue overflow rather quickly. Triggers now get their nextTriggerTime set to 32 - since the first frame happens at game time 0, the second at 16 and the third at 32ms, this makes them trigger in frame number 3. At this point of time the script objects are initialized, so the targeted entity can react properly to the trigger. Technically, this might be a chance that could change the timing of things that are triggered by triggers at map start, but in practical terms before this was unreliable - it might work, or it might crash, depending on spawn order, initialization order or whether you targeted a light or another entity. Obsttorte said that targeting the light from worldspawn worked, so it is a bit unclear why it would crash with a trigger but not with worldspawn. However, since the worldspawn trigger happens in frame 0, and the light is initialized later on, this doesn't actually turn the light of at map start. This is tracked as a new bug 0003308. |
|
Date Modified | Username | Field | Change |
---|---|---|---|
25.01.2013 23:50 | Obsttorte | New Issue | |
26.01.2013 09:27 | tels | Product Version | => TDM 1.08 |
26.01.2013 09:27 | tels | Target Version | => TDM 2.00 |
26.01.2013 10:10 | tels | Note Added: 0005026 | |
26.01.2013 10:10 | tels | Assigned To | => tels |
26.01.2013 10:10 | tels | Status | new => feedback |
26.01.2013 17:32 | Obsttorte | Note Added: 0005030 | |
26.01.2013 17:32 | Obsttorte | Status | feedback => assigned |
26.01.2013 17:36 | Obsttorte | File Added: toe_crash.map | |
26.01.2013 17:36 | Obsttorte | Note Added: 0005031 | |
26.01.2013 20:47 | tels | Note Added: 0005032 | |
27.01.2013 00:11 | tels | Note Added: 0005035 | |
27.01.2013 00:11 | tels | Status | assigned => resolved |
27.01.2013 00:11 | tels | Fixed in Version | => TDM 2.00 |
27.01.2013 00:11 | tels | Resolution | open => fixed |
27.01.2013 00:12 | tels | Note Edited: 0005035 | |
27.01.2013 00:12 | tels | Relationship added | related to 0003308 |