查看: 1658|回复: 4

新手求助:用vs2008debug《三维渲染引擎编程指南》书中的第一个例子

[复制链接]

该用户从未签到

发表于 2012-1-10 23:06:56 | 显示全部楼层 |阅读模式
编译成功了,debug时弹出
Unhandled exception at 0x7c812afb in OSG.exe: Microsoft C++ exception: std::bad_alloc at memory location 0x0012f4d8..

下面是debug时的输出信息:

'OSG.exe': Loaded 'D:\My Documents\Visual Studio 2008\Projects\OSG\Debug\OSG.exe', Symbols loaded.
'OSG.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll'
'OSG.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll'
'OSG.exe': Loaded 'E:\OSG-3.0-VC9\bin\osg80-osg.dll', Binary was not built with debug information.
'OSG.exe': Loaded 'E:\OSG-3.0-VC9\bin\ot12-OpenThreads.dll', Binary was not built with debug information.
'OSG.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.30729.4148_x-ww_d495ac4e\msvcr90.dll'
'OSG.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.30729.4148_x-ww_d495ac4e\msvcp90.dll'
'OSG.exe': Loaded 'C:\WINDOWS\system32\opengl32.dll'
'OSG.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll'
'OSG.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll'
'OSG.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll'
'OSG.exe': Loaded 'C:\WINDOWS\system32\secur32.dll'
'OSG.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll'
'OSG.exe': Loaded 'C:\WINDOWS\system32\user32.dll'
'OSG.exe': Loaded 'C:\WINDOWS\system32\glu32.dll'
'OSG.exe': Loaded 'C:\WINDOWS\system32\ddraw.dll'
'OSG.exe': Loaded 'C:\WINDOWS\system32\dciman32.dll'
'OSG.exe': Loaded 'E:\OSG-3.0-VC9\bin\osg80-osgDB.dll', Binary was not built with debug information.
'OSG.exe': Loaded 'E:\OSG-3.0-VC9\bin\osg80-osgUtil.dll', Binary was not built with debug information.
'OSG.exe': Loaded 'E:\OSG-3.0-VC9\bin\zlib1.dll', Binary was not built with debug information.
'OSG.exe': Loaded 'E:\OSG-3.0-VC9\bin\osg80-osgViewer.dll', Binary was not built with debug information.
'OSG.exe': Loaded 'E:\OSG-3.0-VC9\bin\osg80-osgGA.dll', Binary was not built with debug information.
'OSG.exe': Loaded 'E:\OSG-3.0-VC9\bin\osg80-osgText.dll', Binary was not built with debug information.
'OSG.exe': Loaded 'C:\WINDOWS\system32\imm32.dll'
'OSG.exe': Loaded 'C:\WINDOWS\system32\lpk.dll'
'OSG.exe': Loaded 'C:\WINDOWS\system32\usp10.dll'
HEAP[OSG.exe]: Invalid allocation size - CCCCCCD0 (exceeded 7ffdefff)
First-chance exception at 0x7c812afb in OSG.exe: Microsoft C++ exception: std::bad_alloc at memory location 0x0012fb38..
HEAP[OSG.exe]: Invalid allocation size - CCCCCCCD (exceeded 7ffdefff)
First-chance exception at 0x7c812afb in OSG.exe: Microsoft C++ exception: std::bad_alloc at memory location 0x0012f4d8..
First-chance exception at 0x7c812afb in OSG.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000..
Unhandled exception at 0x7c812afb in OSG.exe: Microsoft C++ exception: std::bad_alloc at memory location 0x0012f4d8..


貌似是什么内存分配的问题,我是新手啊,求助。

该用户从未签到

 楼主| 发表于 2012-1-10 23:16:28 | 显示全部楼层
找到原因了,是因为使用debug时使用的lib和release时不一样的,我用release就好了,不过release时的库和debug时的库有什么不同啊?

该用户从未签到

发表于 2012-1-11 07:38:50 | 显示全部楼层

该用户从未签到

 楼主| 发表于 2012-1-11 10:43:41 | 显示全部楼层
FlySky 发表于 2012-1-11 07:38
http://www.newsmth.net/pc/pccon.php?id=1264&nid=125087

ok,非常感谢FlySky。

该用户从未签到

 楼主| 发表于 2012-1-11 10:54:14 | 显示全部楼层
还有一个问题,调试版本的核心库也是用相同的源码,只是在debug下编译出来的吗?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

OSG中国官方论坛-有您OSG在中国才更好

网站简介:osgChina是国内首个三维相关技术开源社区,旨在为国内更多的技术开发人员提供最前沿的技术资讯,为更多的三维从业者提供一个学习、交流的技术平台。

联系我们

  • 工作时间:09:00--18:00
  • 反馈邮箱:1315785073@qq.com
快速回复 返回顶部 返回列表