Thread Tools Display Modes
02-24-13, 09:40 AM   #1
Crablouse
A Deviate Faerie Dragon
Join Date: Oct 2009
Posts: 10
Unhappy Error reported in Carbonite.Quests module & possible memeory leak

Hi!

I get massive errors from the carbonite.quests module:

62x Carbonite.Quests-1.0\NxQuest.lua:10212: attempt to index field "?" (a boolean value)
Carbonite.Quests-1.0\NxQuest.lua:10212: in function "DecodeComRcv"
Carbonite.Quests-1.0\NxQuest.lua:1724: in function <Carbonite.Quests\NxQuest.lua:1722>
<string>:"safecall Dispatcher[4]":4: in function <string>:"safecall Dispatcher[4]":4
<in C code>
<string>:"safecall Dispatcher[4]":13: in function "?"
Ace3-r1079\CallbackHandler-1.0\CallbackHandler-1.0-6.lua:92: in function "Fire"
Ace3-r1079\AceComm-3.0\AceComm-3.0-7.lua:339: in function <Ace3\AceComm-3.0\AceComm-3.0.lua:321>

Locals:
nil

Also I detected that the memory usage of carbonite is increasing very fast (about 45-90 Kbytes / secs). After 5 mins it reaches 20 MBytes. The memory is freed sometimes by the garbage collector so I don't worry about that at the moment.

Geetings.
 
02-24-13, 09:46 AM   #2
JimJoBlue
An Onyxian Warder
 
JimJoBlue's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2012
Posts: 362
This is posted in the wrong section...
You are using the BETA and should have been posted here:- http://www.wowinterface.com/forums/f...play.php?f=160

I can tell by the Carbonite.Quests in the report..
__________________
I still say a church steeple with a lightning rod on top shows a lack of confidence. Doug McLeod



Last edited by JimJoBlue : 02-24-13 at 09:59 AM.
 
02-24-13, 10:44 AM   #3
Crablouse
A Deviate Faerie Dragon
Join Date: Oct 2009
Posts: 10
Sorry me fault. I will post it in the beta forum.

So someone can close this thread here.
 
02-24-13, 11:08 AM   #4
Rythal
Featured Artist
Featured
Join Date: Aug 2012
Posts: 1,458
I'll move it... you can also find the temporary fix until I release next version in that forum aswell.
 
02-24-13, 11:15 AM   #5
Rythal
Featured Artist
Featured
Join Date: Aug 2012
Posts: 1,458
as for memory leak ... i've been trying to narrow down what or where is causing the increase every second happening... but yeah it hasn't been a top priority since as you also noticed garbage does free it.

It might not even be a memory leak but the new comms routines, since to talk to the modules I have to send whispers to yourself over the addon channel... this fires every second, so i'm using AceComm's queue's to ensure it's not considered spam by blizzard and kicks you off the server.
 
02-24-13, 11:47 AM   #6
Crablouse
A Deviate Faerie Dragon
Join Date: Oct 2009
Posts: 10
Thank you Rythal,

the quick fix solved the problem for me.

Regards.
 
02-24-13, 02:37 PM   #7
Rythal
Featured Artist
Featured
Join Date: Aug 2012
Posts: 1,458
update on the memory leak... it's being caused by my attempts to keep memory down, like carbonite of old I was trying to keep colours as a single variable instead of 4.. so like,

WatchList = "red|green|blue"alpha"

but in bringing them back, i'm using strsplit (well actually started with my own custom written explode .. didn't know blizzard had added strsplit) which is causing the memory jumps until garbage collection. Trying to find a better way to do things now instead of calling strsplit constantly.
 
02-24-13, 07:25 PM   #8
dhjohn
A Fallenroot Satyr
Join Date: Aug 2012
Posts: 21
Originally Posted by Rythal View Post
update on the memory leak... it's being caused by my attempts to keep memory down, like carbonite of old I was trying to keep colours as a single variable instead of 4.. so like,

WatchList = "red|green|blue"alpha"

but in bringing them back, i'm using strsplit (well actually started with my own custom written explode .. didn't know blizzard had added strsplit) which is causing the memory jumps until garbage collection. Trying to find a better way to do things now instead of calling strsplit constantly.
I'm not sure on lua, but my gut tells me you won't save much space by compacting multiple strings into one. Since a string has to hold each character as a byte, you can't gain space by putting strings together unlike with integers which can hold four bytes in one. (well, you can save the slight overhead of multiple objects, but I can't imagine it is worth the time splitting and joining the strings).
 
02-24-13, 08:55 PM   #9
Rythal
Featured Artist
Featured
Join Date: Aug 2012
Posts: 1,458
Originally Posted by dhjohn View Post
I'm not sure on lua, but my gut tells me you won't save much space by compacting multiple strings into one. Since a string has to hold each character as a byte, you can't gain space by putting strings together unlike with integers which can hold four bytes in one. (well, you can save the slight overhead of multiple objects, but I can't imagine it is worth the time splitting and joining the strings).
which is exactly it... since colors use integers, so by combining i'm using 1 string instead of 4 integers.

the leak is happening in 2 scripts, NxSocial and NxQuest ... i've got it fixed in NxSocial now by just having a array of the colours unpacked, instead of unpacking them every update... will look into NxQuest next and see if that fix works there too.
 
 

WoWInterface » Featured Projects » Carbonite » Carbonite Archive » Error reported in Carbonite.Quests module & possible memeory leak

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off