
Originally Posted by
awsdert
Remembered the thought, it was about how I was leaking memory when clearing the data in a dump_t object, unfortunately attempting to resolve that problem lead to gasp crashing before it even reported anything via the 'REPORT' macros, however I'm tired now so I plan to continue trying 2mw, also my internet connection is on the fritz so I'll probably just go to sleep in a little bit.
It seem my fixes were unrelated to the crash, apparently I got lucky for a while where this crash should've occurred, I forced it to appear in every place it should do so by adding a concatenation before the call that should crash on nil (lua this time), however now I am getting a crash in a bizzare spot after fixing all the ones that came went unnoticed before now, the bizzare spot is here:
Code:
local function range2str(from,upto,desc)
return ((string.format( "%X - %X %s", from, upto, desc ))
or "(nil)")
end
...
list = {
txt = {},
raw = {
from = 0, upto = gasp.ptrlimit(), desc = "Default"
}
}
if GUI.cheat and GUI.cheat.app then
tmp = GUI.cheat.app.regions or {}
for i = 1,#tmp,1 do
v = tmp[i]
list.raw[i+1] = v
end
end
tmp = list.raw
for i = 1,#tmp,1 do
v = tmp[i]
list.txt[i] = range2str( v.from, v.upto, v.desc )
end
if not scan.region or scan.region < 1 then
scan.region = 1
end
tmp = list.txt
v = tmp[1]
scan.region = nk.combo(
ctx, tmp, scan.region,
pad_height( font, v ),
{
pad_width( font, v ) * 2,
pad_height( font, v ) * 2
}
)
Any ideas what might be causing it?
The tree:
GitHub - awsdert/gasp at e1e361af79385e495d7a9ac10f6926d5ca8c6826
The file the above code is in:
gasp/scan.lua at e1e361af79385e495d7a9ac10f6926d5ca8c6826 * awsdert/gasp * GitHub
Edit: The traceback from lua is:
Code:
lua/gui_mode.lua:108: in function 'pad_height'
lua/scan.lua:69: in field 'func'
At the first pad_height call which for reference is defined as such:
Code:
function pad_width(font,text)
if font == nil or text == nil then
print(debug.traceback())
end
text = "" .. text
return math.ceil((font:width(font:height(),text)) * 1.2)
end
function pad_height(font,text)
if font == nil or text == nil then
print(debug.traceback())
end
text = "" .. text
return math.ceil((font:height(text)) * 1.2)
end