Comments (6)
请帮助排查原因, 你这个信息不足.
这个错误通常是因为 C 层有空指针访问.
将 lib/ejoy2dgame.c 138 行的 lua_pcall 改成 lua_call 调用, 可以用 gdb 取到 C 调用栈.
from ejoy2d.
我改成了
//int err = lua_pcall(L, n, r, TRACEBACK_FUNCTION);
int err = LUA_OK;
lua_call(L, n, r);
gdb bt:
Program received signal SIGSEGV, Segmentation fault.
0x1015965d in ?? () from C:\Windows\SysWOW64\ig4icd32.dll
(gdb) c
Continuing.
Breakpoint 3, call (L=0x502fe8, n=0, r=0) at lib/ejoy2dgame.c:140
140 lua_call(L, n, r);
(gdb) bt
#0 call (L=0x502fe8, n=0, r=0) at lib/ejoy2dgame.c:140
#1 0x00402cb3 in ejoy2d_game_drawframe (G=0x5017f0) at lib/ejoy2dgame.c:187
#2 0x0040cfdf in ejoy2d_win_frame () at mingw/winfw.c:90
#3 0x0040c8e4 in update_frame (hDC=0xc6012da9) at mingw/window.c:61
#4 0x0040c9df in WndProc@16 (hWnd=0x6a0896, message=15, wParam=0, lParam=0)
at mingw/window.c:83
#5 0x767962fa in USER32!OffsetRect () from C:\Windows\syswow64\user32.dll
#6 0x006a0896 in ?? ()
#7 0x0000000f in ?? ()
#8 0x00000000 in ?? ()
(gdb) c
Continuing.
Program received signal SIGSEGV, Segmentation fault.
0x1015965d in ?? () from C:\Windows\SysWOW64\ig4icd32.dll
(gdb) c
Continuing.
Breakpoint 3, call (L=0x502fe8, n=0, r=0) at lib/ejoy2dgame.c:140
140 lua_call(L, n, r);
(gdb) bt
#0 call (L=0x502fe8, n=0, r=0) at lib/ejoy2dgame.c:140
#1 0x00402cb3 in ejoy2d_game_drawframe (G=0x5017f0) at lib/ejoy2dgame.c:187
#2 0x0040cfdf in ejoy2d_win_frame () at mingw/winfw.c:90
#3 0x0040c8e4 in update_frame (hDC=0x2c012104) at mingw/window.c:61
#4 0x0040c9df in WndProc@16 (hWnd=0x6a0896, message=15, wParam=0, lParam=0)
at mingw/window.c:83
#5 0x767962fa in USER32!OffsetRect () from C:\Windows\syswow64\user32.dll
#6 0x006a0896 in ?? ()
#7 0x0000000f in ?? ()
#8 0x00000000 in ?? ()
(gdb) c
Continuing.
attempt to call a nil valueInferior 1 (process 7128) exited with code 01
from ejoy2d.
改成 lua_call 就是为了看 call 的函数在 c 里哪里出错。不是为了看哪里调用到那里的。
发自我的 iPhone
在 2013年12月29日,下午4:52,marsing [email protected] 写道:
我改成了
//int err = lua_pcall(L, n, r, TRACEBACK_FUNCTION);
int err = LUA_OK;
lua_call(L, n, r);gdb bt:
(gdb) b 140
Breakpoint 2 at 0x402aa7: file lib/ejoy2dgame.c, line 140.
(gdb) c
Continuing.Breakpoint 2, call (L=0x692fe8, n=0, r=0) at lib/ejoy2dgame.c:140
140 lua_call(L, n, r);
(gdb) bt
#0 call (L=0x692fe8, n=0, r=0) at lib/ejoy2dgame.c:140
#1 0x00402cb3 in ejoy2d_game_drawframe (G=0x6917f0) at lib/ejoy2dgame.c:187
#2 0x0040cfdf in ejoy2d_win_frame () at mingw/winfw.c:90
#3 0x0040c8e4 in update_frame (hDC=0xd8012d7c) at mingw/window.c:61
#4 0x0040c9df in WndProc@16 (hWnd=0x1030792, message=15, wParam=0, lParam=0)
at mingw/window.c:83
#5 0x767962fa in USER32!OffsetRect () from C:\Windows\syswow64\user32.dll
#6 0x01030792 in ?? ()
#7 0x0000000f in ?? ()
#8 0x00000000 in ?? ()
(gdb)—
Reply to this email directly or view it on GitHub.
from ejoy2d.
in ejoy2d_game_drawframe (G=0x5017f0) at lib/ejoy2dgame.c 这个不是么?
from ejoy2d.
:( 出错的是 lua_call 的函数中做的事情, 你后面提供的栈信息是没有意义的.
lua_pcall 在 windows 上会将 SEH 捕获, 所以会误输出 error in error handling , 改成 lua_call 后, 应该能看到具体 C 调用出错的位置.
从前一条看,
0x1015965d in ?? () from C:\Windows\SysWOW64\ig4icd32.dll
这个是 Intel 的显卡驱动.
请确认你的驱动支持 OpenGL ES 2.0 以上.
并检查一下是哪条 opengl 调用出错.
from ejoy2d.
出问题的电脑是笔记本 显卡是nVIDIA GeForce GT 540M ,更新到最新驱动,测试还是不行。
今天用公司的电脑台式,显卡GT 610,就OK了。
可能是我笔记本的故障,但还没查到问题在哪里。
云风老大 费心了,谢谢, 这个可以关了。
from ejoy2d.
Related Issues (20)
- mac osx glwf3 error HOT 1
- doc is not rendered properly
- PVS-Studio: CWE-476 NULL Pointer Dereference HOT 1
- Need support VS2017 platform
- 这个工程还会继续维护吗。 HOT 2
- the source still use the system Lua lib header files HOT 1
- sprite的rot=450时,画不出来
- ejoy2d在mac os x 使用xcode编译问题。 HOT 1
- ejoy2d中如何实现树状结构? HOT 1
- windows下编译一些问题 HOT 2
- Compile error in my ubuntu 14 enviroment.
- 能否为geometry绘制添加srt参数 HOT 3
- lnewlabel函数参数混乱 HOT 1
- macosx编译有warning HOT 1
- Ubuntu 14.04编译异常 HOT 6
- 关于sprite.ldraw中srt参数 HOT 2
- 求一个Android.mk文件 HOT 5
- 请问ejoy2d是否打算支持mesh HOT 8
- Mac Xcode 链接出错 HOT 3
- 绘制poly错误 HOT 4
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 ejoy2d.