Comments (8)
I put the cms_trace.txt file onto pastebucket: http://goo.gl/uGl99o
Edit: Also, I'll try to debug it a bit if that would help, though few tips as to why thread_stack would be empty or nil would help.
from luatrace.
On 14/02/2014, at 4:47 am, Timothy Bogdala [email protected] wrote:
I put the cms_trace.txt file onto pastebucket: http://goo.gl/uGl99o
Have you renamed resume, or are you calling resume from C?
from luatrace.
Nope, I just double checked. Checked all the lua scripts in the game and checked the C code for the wrappers. A grep for resume doesn't have any results.
from luatrace.
Odd. Never mind. Try now. It just uses -1 as a thread ID if you're you've yielded off the top of the thread stack. Hopefully it won't muck the call stack up, but I'm a bit pressed to think about it too hard.
from luatrace.
Did the latest commit work for you? If so, could you close this issue? Thanks.
from luatrace.
Sorry, I haven't tried it yet and will do so this weekend.
from luatrace.
lua: /usr/local/share/lua/5.1/luatrace/profile.lua:168: attempt to index local 'caller' (a nil value)
stack traceback:
/usr/local/share/lua/5.1/luatrace/profile.lua:168: in function 'play_return'
/usr/local/share/lua/5.1/luatrace/profile.lua:243: in function 'record'
/usr/local/share/lua/5.1/luatrace/trace_file.lua:138: in function 'read'
/usr/local/share/lua/5.1/luatrace/profile.lua:466: in function 'go'
(command line):1: in main chunk
[C]: ?
For what it's worth:
- my game is written in C
- the game loads an initial main.lua files that sets callbacks for update/draw/input events
- these callbacks are invoked with lua_pcall()
I uploaded the newest cms_trace.txt file here:
http://animal-machine.com/static/temp/cms_trace.txt
from luatrace.
I did a little debugging with zbstudio and did some investigation when play_return() gets called with a null caller parameter.
Callee looks like:
{current_line = {child_time = 92009.501, file = {filename = "scripts/client_main.lua", functions = {[99] = {{child_time = 0, hits = 1, last_line_defined = 149, line_defined = 99, name = "scripts/client_main.lua:99-149", self_time = 1.515, source_file = nil}}, [153] = {{child_time = 91979.417, hits = 1, last_line_defined = 155, line_defined = 153, name = "scripts/client_main.lua:153-155", self_time = 0.685, source_file = nil}}, [158] = {{child_time = 0, hits = 1, last_line_defined = 168, line_defined = 158, name = "scripts/client_main.lua:158-168", self_time = 4.617, source_file = nil}}}, lines = {[147] = {child_time = 0, file = nil, hits = 1, line_number = 147, self_time = 0.186}, [148] = {child_time = 0.681, file = nil, hits = 1, line_number = 148, self_time = 1.285}, [149] = {child_time = 0, file = nil, hits = 1, line_number = 149, self_time = 0.044}, [153] = {child_time = 0, file = nil, hits = 1, line_number = 153, self_time = 0.108}, [154] = {child_time = 91979.417, file = nil, hits = 1, line_number = 154, self_time = 0.548}, [155] = {child_time = 0, file = nil, hits = 1, line_number = 155, self_time = 0.029}, [158] = {child_time = 0, file = nil, hits = 1, line_number = 158, self_time = 2.104}, [159] = {child_time = 0, file = nil, hits = 1, line_number = 159, self_time = 0.244}, [160] = {child_time = 0, file = nil, hits = 1, line_number = 160, self_time = 0.29}, [163] = {child_time = 0, file = nil, hits = 1, line_number = 163, self_time = 0.196}, [164] = {child_time = 8.395, file = nil, hits = 1, line_number = 164, self_time = 0.847}, [165] = {child_time = 1.607, file = nil, hits = 1, line_number = 165, self_time = 0.582}, [167] = nil}}, hits = 1, line_number = 167, self_time = 0.354}, func = nil, func_child_time_at_start = 0, func_self_time_at_start = 0, func_start_time = 17.406, line_child_time_at_start = 0, line_self_time_at_start = 0.354, line_start_time = 32.025, protected = false} --[[table: 0x7fac737225d0]] --[[incomplete output with shared/self-references skipped]]
If I move up the stack to profile.record, it's in the Yield portion (elseif a=='Y') of the if statement and in the else branch of the thread_stack.top <= 0 check.
Some locals:
i = 1
stack.top = 0
thread[1] =
{current_line = {child_time = 92009.501, file = {filename = "scripts/client_main.lua", functions = {[99] = {{child_time = 0, hits = 1, last_line_defined = 149, line_defined = 99, name = "scripts/client_main.lua:99-149", self_time = 1.515, source_file = nil}}, [153] = {{child_time = 91979.417, hits = 1, last_line_defined = 155, line_defined = 153, name = "scripts/client_main.lua:153-155", self_time = 0.685, source_file = nil}}, [158] = {{child_time = 0, hits = 1, last_line_defined = 168, line_defined = 158, name = "scripts/client_main.lua:158-168", self_time = 4.617, source_file = nil}}}, lines = {[147] = {child_time = 0, file = nil, hits = 1, line_number = 147, self_time = 0.186}, [148] = {child_time = 0.681, file = nil, hits = 1, line_number = 148, self_time = 1.285}, [149] = {child_time = 0, file = nil, hits = 1, line_number = 149, self_time = 0.044}, [153] = {child_time = 0, file = nil, hits = 1, line_number = 153, self_time = 0.108}, [154] = {child_time = 91979.417, file = nil, hits = 1, line_number = 154, self_time = 0.548}, [155] = {child_time = 0, file = nil, hits = 1, line_number = 155, self_time = 0.029}, [158] = {child_time = 0, file = nil, hits = 1, line_number = 158, self_time = 2.104}, [159] = {child_time = 0, file = nil, hits = 1, line_number = 159, self_time = 0.244}, [160] = {child_time = 0, file = nil, hits = 1, line_number = 160, self_time = 0.29}, [163] = {child_time = 0, file = nil, hits = 1, line_number = 163, self_time = 0.196}, [164] = {child_time = 8.395, file = nil, hits = 1, line_number = 164, self_time = 0.847}, [165] = {child_time = 1.607, file = nil, hits = 1, line_number = 165, self_time = 0.582}, [167] = nil}}, hits = 1, line_number = 167, self_time = 0.354}, func = nil, func_child_time_at_start = 0, func_self_time_at_start = 0, func_start_time = 17.406, line_child_time_at_start = 0, line_self_time_at_start = 0.354, line_start_time = 32.025, protected = false} --[[table: 0x7fac737225d0]] --[[incomplete output with shared/self-references skipped]]
Does that help at all?
from luatrace.
Related Issues (11)
- make fails on Ubuntu HOT 10
- What should I do when I got this numbers? HOT 1
- Make fail about dirname and -I mssing path
- luatrace is not compatible with strict because unintended global variable
- Please provide a LuaRocks rock for the tool HOT 8
- build on msvc HOT 1
- Intermittent errors HOT 4
- Error compiling git head (db7fb4ef3ad7a544aeab4b2786a905af47fdd409) HOT 4
- Errors when tracing LuLPeg HOT 5
- How to use for embedded luajit2 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from luatrace.