Issue information

Issue ID
#5671
Status
Fixed
Severity
None
Started
Hercules Elf Bot
Apr 29, 2012 14:52
Last Post
Hercules Elf Bot
May 9, 2012 7:34
Confirmation
N/A

Hercules Elf Bot - Apr 29, 2012 14:52

Originally posted by [b]Elliott[/b]
I was porting scripts from eAthena to rAthena when mapserver kept crashing, I isolated it to this line:

[CODE]
set .gm_array_size, getarraysize(.GM_RANK$[0]);
[/CODE]

Which is under an [b]OnInit[/b] trigger. An additional script that I used also had an OnInit trigger which has a getarraysize on variable .prizeMedium, that was another cause of the server crash as well.

Not sure if this is intended for rAthena or not but it did not happen in eAthena hence I am reporting it as a bug.

Also using clean r16001, no src mods or anything.


[b]TL;DR:[/b] A script that has any of the OnInit labels that calls "getarraysize" on an NPC variable (.foo, .foobar, etc.) crashes the map server immediately upon loading the script.

This post has been edited by Elliott on Apr 29, 2012 15:08

Hercules Elf Bot - Apr 29, 2012 16:07

Originally posted by [b]Epoque[/b]
Hm, first, I'd like to point out that you're running [i]getarraysize()[/i] on a variable, not an array? [i]getarraysize(.GM_RANK$[0])[/i] is a variable, so surely this should be [i]getarraysize(.GM_RANK$)[/i] ?

Second, can you confirm this crash still occurs after updating to [rev='16003']? These commits were made to resolve the issues with the variable engine.

Hercules Elf Bot - Apr 29, 2012 17:04

Originally posted by [b]Elliott[/b]
Sorry, my wording was off (I did get rid of the [0] earlier but it crashed still), but ANYWAY! More importantly I updated like you said and the problem is [b]fixed[/b], so this can be closed. Thanks!