[SOLVED] Using Smart Pointers instead of Raw Pointers Topic is solved

Problems building or running the engine, queries about how to use features etc.
Post Reply
macskay
Gnoblar
Posts: 4
Joined: Mon Jan 14, 2019 12:08 pm

[SOLVED] Using Smart Pointers instead of Raw Pointers

Post by macskay »

Ogre Version: 1.11.5
Operating System: Windows 10
Render System: D3D11

I'm trying replace my Raw pointers with Smart Pointers to be more C++11/14/17, so I tried the following:

Code: Select all

void Game::setup()
{
	OgreBites::ApplicationContext::setup();

	addInputListener(this);

	Ogre::SharedPtr<Ogre::Root> root(getRoot());
}
instead of the usual

Code: Select all

Ogre::Root* root = getRoot();
However this causes the program to crash with a 'read access violation'. I've been trying SharedPtr as well as UniquePtr. I also tried using the std:: version with the same issues occuring. Can someone tell me what is happening here? I'm following the OgreBites::ApplicationContext tutorial and
got it working with raw pointers.

Code: Select all

'OgreGame.exe' (Win32): Loaded 'C:\Users\Max\source\repos\OgreGame\Build\Debug\OgreGame.exe'. Symbols loaded.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\kernel32.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Users\Max\source\repos\OgreGame\Build\Debug\OgreBites_d.dll'. Symbols loaded.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\vcruntime140d.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\msvcp140d.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Users\Max\source\repos\OgreGame\Build\Debug\OgreMain_d.dll'. Symbols loaded.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbased.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbased.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Unloaded 'C:\Windows\System32\ucrtbased.dll'
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\shell32.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\user32.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\msvcrt.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\win32u.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Users\Max\source\repos\OgreGame\Build\Debug\zlib.dll'. Symbols loaded.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\cfgmgr32.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\gdi32.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Users\Max\source\repos\OgreGame\Build\Debug\OgreOverlay_d.dll'. Symbols loaded.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbase.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\gdi32full.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbase.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Unloaded 'C:\Windows\System32\ucrtbase.dll'
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\SHCore.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\msvcp_win.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Users\Max\source\repos\OgreGame\Build\Debug\OgreRTShaderSystem_d.dll'. Symbols loaded.
'OgreGame.exe' (Win32): Loaded 'C:\Users\Max\source\repos\OgreGame\Build\Debug\SDL2.dll'. Symbols loaded.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\rpcrt4.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\combase.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\imm32.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\bcryptprimitives.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\vcruntime140.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\ole32.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\windows.storage.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\sechost.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\advapi32.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\oleaut32.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\shlwapi.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\winmm.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\kernel.appcore.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\profapi.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\powrprof.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\version.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\winmmbase.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\winmmbase.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Unloaded 'C:\Windows\System32\winmmbase.dll'
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\fltLib.dll'. Cannot find or open the PDB file.
Ogre: Creating resource group General
Ogre: Creating resource group OgreInternal
Ogre: Creating resource group OgreAutodetect
Ogre: SceneManagerFactory for type 'DefaultSceneManager' registered.
Ogre: Registering ResourceManager for type Material
Ogre: Registering ResourceManager for type Mesh
Ogre: Registering ResourceManager for type Skeleton
Ogre: MovableObjectFactory for type 'ParticleSystem' registered.
Ogre: ArchiveFactory for archive type FileSystem registered.
Ogre: ArchiveFactory for archive type Zip registered.
Ogre: ArchiveFactory for archive type EmbeddedZip registered.
Ogre: DDS codec registering
Ogre: ETC codec registering
Ogre: Registering ResourceManager for type HighLevelGpuProgram
Ogre: Registering ResourceManager for type Compositor
Ogre: MovableObjectFactory for type 'Entity' registered.
Ogre: MovableObjectFactory for type 'Light' registered.
Ogre: MovableObjectFactory for type 'BillboardSet' registered.
Ogre: MovableObjectFactory for type 'ManualObject' registered.
Ogre: MovableObjectFactory for type 'BillboardChain' registered.
Ogre: MovableObjectFactory for type 'RibbonTrail' registered.
Ogre: Loading library C:/OgreSDK/sdk/bin/.\RenderSystem_Direct3D11_d
Ogre: 'OgreGame.exe' (Win32): Loaded 'C:\OgreSDK\sdk\bin\RenderSystem_Direct3D11_d.dll'. Symbols loaded.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\dxgi.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\D3DCompiler_47.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\d3d11.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\cryptsp.dll'. Cannot find or open the PDB file.
Installing plugin: D3D11 RenderSystem
Ogre: D3D11: Direct3D11 Rendering Subsystem created.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\ResourcePolicyClient.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Unloaded 'C:\Windows\System32\ResourcePolicyClient.dll'
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\DriverStore\FileRepository\c0336524.inf_amd64_f291d855f998dc3e\B336522\aticfx64.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\dwmapi.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\DriverStore\FileRepository\c0336524.inf_amd64_f291d855f998dc3e\B336522\atiuxp64.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Unloaded 'C:\Windows\System32\DriverStore\FileRepository\c0336524.inf_amd64_f291d855f998dc3e\B336522\atiuxp64.dll'
'OgreGame.exe' (Win32): Unloaded 'C:\Windows\System32\dwmapi.dll'
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\DriverStore\FileRepository\c0336524.inf_amd64_f291d855f998dc3e\B336522\atiuxp64.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\DriverStore\FileRepository\c0336524.inf_amd64_f291d855f998dc3e\B336522\atidxx64.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\setupapi.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\amdihk64.dll'. Module was built without symbols.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\D3DSCache.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\userenv.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\twinapi.appcore.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\rmclient.dll'. Cannot find or open the PDB file.
Ogre: D3D11: Driver Detection Starts
Ogre: D3D11: "AMD Radeon R9 200 Series"
Ogre: D3D11: "Microsoft Basic Render Driver (software)"
Ogre: D3D11: Driver Detection Ends
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\dwmapi.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Unloaded 'C:\Windows\System32\dwmapi.dll'
The thread 0x1a60 has exited with code 0 (0x0).
The thread 0x3990 has exited with code 0 (0x0).
Ogre: Plugin successfully installed
Ogre: Loading library C:/OgreSDK/sdk/bin/.\RenderSystem_GL_d
'OgreGame.exe' (Win32): Loaded 'C:\OgreSDK\sdk\bin\RenderSystem_GL_d.dll'. Symbols loaded.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\opengl32.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\glu32.dll'. Cannot find or open the PDB file.
Ogre: Installing plugin: GL RenderSystem
Ogre: OpenGL Rendering Subsystem created.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\uxtheme.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\msctf.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\DriverStore\FileRepository\c0336524.inf_amd64_f291d855f998dc3e\B336522\atig6pxx.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\DriverStore\FileRepository\c0336524.inf_amd64_f291d855f998dc3e\B336522\atio6axx.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\dxva2.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\dwmapi.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\DriverStore\FileRepository\c0336524.inf_amd64_f291d855f998dc3e\B336522\atig6txx.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\atiadlxx.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\psapi.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\propsys.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\devobj.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\wintrust.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\msasn1.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\crypt32.dll'. Cannot find or open the PDB file.
Ogre: Plugin successfully installed
Ogre: Loading library C:/OgreSDK/sdk/bin/.\RenderSystem_GL3Plus_d
'OgreGame.exe' (Win32): Loaded 'C:\OgreSDK\sdk\bin\RenderSystem_GL3Plus_d.dll'. Symbols loaded.
Ogre: Installing plugin: GL 3+ RenderSystem
Ogre: OpenGL 3+ Rendering Subsystem created.
Ogre: Plugin successfully installed
Ogre: Loading library C:/OgreSDK/sdk/bin/.\Plugin_ParticleFX_d
'OgreGame.exe' (Win32): Loaded 'C:\OgreSDK\sdk\bin\Plugin_ParticleFX_d.dll'. Symbols loaded.
Ogre: Installing plugin: ParticleFX
Ogre: Particle Emitter Type 'Point' registered
Ogre: Particle Emitter Type 'Box' registered
Ogre: Particle Emitter Type 'Ellipsoid' registered
Ogre: Particle Emitter Type 'Cylinder' registered
Ogre: Particle Emitter Type 'Ring' registered
Ogre: Particle Emitter Type 'HollowEllipsoid' registered
Ogre: Particle Affector Type 'LinearForce' registered
Ogre: Particle Affector Type 'ColourFader' registered
Ogre: Particle Affector Type 'ColourFader2' registered
Ogre: Particle Affector Type 'ColourImage' registered
Ogre: Particle Affector Type 'ColourInterpolator' registered
Ogre: Particle Affector Type 'Scaler' registered
Ogre: Particle Affector Type 'Rotator' registered
Ogre: Particle Affector Type 'DirectionRandomiser' registered
Ogre: Particle Affector Type 'DeflectorPlane' registered
Ogre: Plugin successfully installed
Ogre: Loading library C:/OgreSDK/sdk/bin/.\Plugin_BSPSceneManager_d
'OgreGame.exe' (Win32): Loaded 'C:\OgreSDK\sdk\bin\Plugin_BSPSceneManager_d.dll'. Symbols loaded.
Ogre: Installing plugin: BSP Scene Manager
Ogre: Plugin successfully installed
Ogre: Loading library C:/OgreSDK/sdk/bin/.\Codec_STBI_d
'OgreGame.exe' (Win32): Loaded 'C:\OgreSDK\sdk\bin\Codec_STBI_d.dll'. Symbols loaded.
Ogre: stb_image - v2.19 - public domain JPEG/PNG reader
Ogre: Supported formats: jpeg,jpg,png,bmp,psd,tga,gif,pic,ppm,pgm,hdr
Ogre: Loading library C:/OgreSDK/sdk/bin/.\Plugin_PCZSceneManager_d
'OgreGame.exe' (Win32): Loaded 'C:\OgreSDK\sdk\bin\Plugin_PCZSceneManager_d.dll'. Symbols loaded.
Ogre: Installing plugin: Portal Connected Zone Scene Manager
Ogre: PCZone Factory Type 'ZoneType_Default' registered
Ogre: Plugin successfully installed
Ogre: Loading library C:/OgreSDK/sdk/bin/.\Plugin_OctreeZone_d
'OgreGame.exe' (Win32): Loaded 'C:\OgreSDK\sdk\bin\Plugin_OctreeZone_d.dll'. Symbols loaded.
Ogre: Installing plugin: Octree Zone Factory
Ogre: Plugin successfully installed
Ogre: Loading library C:/OgreSDK/sdk/bin/.\Plugin_OctreeSceneManager_d
'OgreGame.exe' (Win32): Loaded 'C:\OgreSDK\sdk\bin\Plugin_OctreeSceneManager_d.dll'. Symbols loaded.
Ogre: Installing plugin: Octree Scene Manager
Ogre: Plugin successfully installed
Ogre: *-*-* OGRE Initialising
Ogre: *-*-* Version 1.11.5 (Rhagorthua)
Ogre: OverlayElementFactory for type Panel registered.
Ogre: OverlayElementFactory for type BorderPanel registered.
Ogre: OverlayElementFactory for type TextArea registered.
Ogre: Registering ResourceManager for type Font
Ogre: D3D11: RenderSystem Option: Allow NVPerfHUD = No
Ogre: D3D11: RenderSystem Option: Backbuffer Count = Auto
Ogre: D3D11: RenderSystem Option: Driver type = Hardware
Ogre: D3D11: RenderSystem Option: FSAA = 1
Ogre: D3D11: RenderSystem Option: Floating-point mode = Fastest
Ogre: D3D11: RenderSystem Option: Full Screen = No
Ogre: D3D11: RenderSystem Option: Information Queue Exceptions Bottom Level = Info (exception on any message)
Ogre: D3D11: RenderSystem Option: Max Requested Feature Levels = 11.0
Ogre: D3D11: RenderSystem Option: Min Requested Feature Levels = 9.1
Ogre: D3D11: RenderSystem Option: Rendering Device = (default)
The thread 0x34dc has exited with code 0 (0x0).
The thread 0x18f0 has exited with code 0 (0x0).
Ogre: D3D11: RenderSystem Option: VSync = Yes
Ogre: D3D11: RenderSystem Option: VSync Interval = 1
Ogre: D3D11: RenderSystem Option: Video Mode = 1280 x 800 @ 32-bit colour
The thread 0x296c has exited with code 0 (0x0).
The thread 0x2534 has exited with code 0 (0x0).
Ogre: D3D11: RenderSystem Option: sRGB Gamma Conversion = No
Ogre: CPU Identifier & Features
Ogre: -------------------------
Ogre:  *   CPU ID: GenuineIntel: Intel(R) Xeon(R) CPU E3-1231 v3 @ 3.40GHz
Ogre:  *          SSE: yes
Ogre:  *         SSE2: yes
Ogre:  *         SSE3: yes
Ogre:  *        SSE41: yes
Ogre:  *        SSE42: yes
Ogre:  *          MMX: yes
Ogre:  *       MMXEXT: yes
Ogre:  *        3DNOW: no
Ogre:  *     3DNOWEXT: no
Ogre:  *         CMOV: yes
Ogre:  *          TSC: yes
Ogre:  *INVARIANT TSC: yes
Ogre:  *          FPU: yes
Ogre:  *          PRO: yes
Ogre:  *           HT: no
Ogre: -------------------------
Ogre: D3D11: Subsystem Initialising
The thread 0x1b48 has exited with code 0 (0x0).
The thread 0x1ae4 has exited with code 0 (0x0).
'OgreGame.exe' (Win32): Unloaded 'C:\Windows\System32\amdihk64.dll'
'OgreGame.exe' (Win32): Unloaded 'C:\Windows\System32\DriverStore\FileRepository\c0336524.inf_amd64_f291d855f998dc3e\B336522\atidxx64.dll'
'OgreGame.exe' (Win32): Unloaded 'C:\Windows\System32\DriverStore\FileRepository\c0336524.inf_amd64_f291d855f998dc3e\B336522\atiuxp64.dll'
'OgreGame.exe' (Win32): Unloaded 'C:\Windows\System32\DriverStore\FileRepository\c0336524.inf_amd64_f291d855f998dc3e\B336522\aticfx64.dll'
Ogre: D3D11: Driver Detection Starts
Ogre: D3D11: "AMD Radeon R9 200 Series"
Ogre: D3D11: "Microsoft Basic Render Driver (software)"
Ogre: D3D11: Driver Detection Ends
Ogre: D3D11: Requested "(default)", selected "AMD Radeon R9 200 Series"
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\DXGIDebug.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\DriverStore\FileRepository\c0336524.inf_amd64_f291d855f998dc3e\B336522\aticfx64.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\DriverStore\FileRepository\c0336524.inf_amd64_f291d855f998dc3e\B336522\atiuxp64.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Unloaded 'C:\Windows\System32\DriverStore\FileRepository\c0336524.inf_amd64_f291d855f998dc3e\B336522\atiuxp64.dll'
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\DriverStore\FileRepository\c0336524.inf_amd64_f291d855f998dc3e\B336522\atiuxp64.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\DriverStore\FileRepository\c0336524.inf_amd64_f291d855f998dc3e\B336522\atidxx64.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\amdihk64.dll'. Module was built without symbols.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\d3d11_3SDKLayers.dll'. Cannot find or open the PDB file.
Ogre: ***************************************
Ogre: *** D3D11: Subsystem Initialized OK ***
Ogre: ***************************************
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\clbcatq.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\TextInputFramework.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\CoreMessaging.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\CoreUIComponents.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\ntmarta.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\WinTypes.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Loaded 'C:\Windows\System32\WinTypes.dll'. Cannot find or open the PDB file.
'OgreGame.exe' (Win32): Unloaded 'C:\Windows\System32\WinTypes.dll'
Ogre: D3D11RenderSystem::_createRenderWindow "OgreTutorialApp", 1280x800 windowed  miscParams: FSAA=1 externalWindowHandle=1902246 gamma=No vsync=Yes 
Ogre: D3D11: Created D3D11 Rendering Window 'OgreTutorialApp' : 1280x800, 32bpp
Ogre: Registering ResourceManager for type Texture
Ogre: Registering ResourceManager for type GpuProgram
Ogre: RenderSystem capabilities
Ogre: -------------------------
Ogre: RenderSystem Name: Direct3D11 Rendering Subsystem
Ogre: GPU Vendor: amd
Ogre: Device Name: AMD Radeon R9 200 Series
Ogre: Driver Version: 25.20.14011.10001
Ogre:  * Fixed function pipeline: no
Ogre:  * Anisotropic texture filtering: yes
Ogre:  * Cube mapping: yes
Ogre:  * Hardware stencil buffer: yes
Ogre:    - Stencil depth: 8
Ogre:    - Two sided stencil support: yes
Ogre:    - Wrap stencil values: yes
Ogre:  * 32-bit index buffers: yes
Ogre:  * Vertex programs: yes
Ogre:  * Number of floating-point constants for vertex programs: 512
Ogre:  * Number of integer constants for vertex programs: 16
Ogre:  * Number of boolean constants for vertex programs: 16
Ogre:  * Fragment programs: yes
Ogre:  * Number of floating-point constants for fragment programs: 512
Ogre:  * Number of integer constants for fragment programs: 16
Ogre:  * Number of boolean constants for fragment programs: 16
Ogre:  * Geometry programs: yes
Ogre:  * Number of floating-point constants for geometry programs: 512
Ogre:  * Number of integer constants for geometry programs: 16
Ogre:  * Number of boolean constants for geometry programs: 16
Ogre:  * Tessellation Hull programs: yes
Ogre:  * Number of floating-point constants for tessellation hull programs: 512
Ogre:  * Number of integer constants for tessellation hull programs: 16
Ogre:  * Number of boolean constants for tessellation hull programs: 16
Ogre:  * Tessellation Domain programs: yes
Ogre:  * Number of floating-point constants for tessellation domain programs: 512
Ogre:  * Number of integer constants for tessellation domain programs: 16
Ogre:  * Number of boolean constants for tessellation domain programs: 16
Ogre:  * Compute programs: yes
Ogre:  * Number of floating-point constants for compute programs: 512
Ogre:  * Number of integer constants for compute programs: 16
Ogre:  * Number of boolean constants for compute programs: 16
Ogre:  * Supported Shader Profiles: cs_4_0 cs_4_1 cs_5_0 ds_5_0 gs_4_0 gs_4_1 gs_5_0 hlsl hs_5_0 ps_2_0 ps_2_a ps_2_b ps_2_x ps_3_0 ps_3_x ps_4_0 ps_4_0_level_9_1 ps_4_0_level_9_3 ps_4_1 ps_5_0 vs_2_0 vs_2_a vs_2_x vs_3_0 vs_4_0 vs_4_0_level_9_1 vs_4_0_level_9_3 vs_4_1 vs_5_0
Ogre:  * Texture Compression: yes
Ogre:    - DXT: yes
Ogre:    - VTC: no
Ogre:    - PVRTC: no
Ogre:    - ATC: no
Ogre:    - ETC1: no
Ogre:    - ETC2: no
Ogre:    - BC4/BC5: no
Ogre:    - BC6H/BC7: yes
Ogre:    - ASTC: no
Ogre:    - Mipmaps for compressed formats: no
Ogre:  * Hardware Occlusion Query: yes
Ogre:  * User clip planes: yes
Ogre:  * VET_UBYTE4 vertex element type: yes
Ogre:  * Infinite far plane projection: yes
Ogre:  * Hardware render-to-texture: yes
Ogre:  * Floating point textures: yes
Ogre:  * Non-power-of-two textures: yes
Ogre:  * 1d textures: yes
Ogre:  * Volume textures: yes
Ogre:  * Multiple Render Targets: 8
Ogre:    - With different bit depths: yes
Ogre:  * Point Sprites: yes
Ogre:  * Wide Lines: no
Ogre:  * Hardware Gamma: no
Ogre:  * Extended point parameters: yes
Ogre:  * Max Point Size: 256
Ogre:  * Vertex texture fetch: yes
Ogre:  * Number of texture units: 16
Ogre:  * Number of vertex attributes: 32
Ogre:  * Stencil buffer depth: 8
Ogre:  * Number of vertex blend matrices: 0
Ogre:    - Max vertex textures: 4
Ogre:    - Vertex textures shared: yes
Ogre:  * Render to Vertex Buffer : yes
Ogre:  * Hardware Atomic Counters: no
Ogre: DefaultWorkQueue('Root') initialising on thread 5928.
Ogre: DefaultWorkQueue('Root')::WorkerFunc - thread 13892 starting.
Ogre: DefaultWorkQueue('Root')::WorkerFunc - thread 5812 starting.
Ogre: DefaultWorkQueue('Root')::WorkerFunc - thread 2688 starting.
Ogre: DefaultWorkQueue('Root')::WorkerFunc - thread 6800 starting.
Ogre: DefaultWorkQueue('Root')::WorkerFunc - thread 13044 starting.
Ogre: DefaultWorkQueue('Root')::WorkerFunc - thread 16096 starting.
Ogre: DefaultWorkQueue('Root')::WorkerFunc - thread 13164 starting.
Ogre: DefaultWorkQueue('Root')::WorkerFunc - thread 5320 starting.
Ogre: Particle Renderer Type 'billboard' registered
Ogre: SceneManagerFactory for type 'BspSceneManager' registered.
Ogre: Registering SceneLoader Q3BSP
Ogre: SceneManagerFactory for type 'PCZSceneManager' registered.
Ogre: MovableObjectFactory for type 'PCZLight' registered.
Ogre: MovableObjectFactory for type 'Portal' registered.
Ogre: MovableObjectFactory for type 'AntiPortal' registered.
Ogre: PCZone Factory Type 'ZoneType_Octree' registered
Ogre: SceneManagerFactory for type 'OctreeSceneManager' registered.
Ogre: Added resource location 'C:/OgreSDK/sdk/Media' of type 'FileSystem' to resource group 'General'
Ogre: Added resource location 'C:/OgreSDK/sdk/Media/materials/programs/HLSL' of type 'FileSystem' to resource group 'General'
Ogre: Added resource location 'C:/OgreSDK/sdk/Media/materials/programs/HLSL_Cg' of type 'FileSystem' to resource group 'General'
Ogre: Added resource location 'C:/OgreSDK/sdk/Media/RTShaderLib/materials' of type 'FileSystem' to resource group 'General'
Ogre: Added resource location 'C:/OgreSDK/sdk/Media/RTShaderLib/HLSL' of type 'FileSystem' to resource group 'General'
Ogre: Added resource location 'C:/OgreSDK/sdk/Media/RTShaderLib/HLSL_Cg' of type 'FileSystem' to resource group 'General'
Ogre: Parsing scripts for resource group General
Ogre: Parsing script DualQuaternionSkinning_Shadow.material
Exception thrown at 0x00007FF8440AA388 in OgreGame.exe: Microsoft C++ exception: Ogre::FileNotFoundException at memory location 0x0000003C374FDC20.
Ogre: High-level program 'Ogre/RTShader/shadow_caster_dq_ps_hlsl' is not supported: Cannot locate resource DualQuaternionSkinning_Shadow.hlsl in resource group General.
Exception thrown at 0x00007FF8440AA388 in OgreGame.exe: Microsoft C++ exception: Ogre::FileNotFoundException at memory location 0x0000003C374FDC20.
Ogre: High-level program 'Ogre/RTShader/shadow_caster_dq_skinning_2weight_twophase_vs_hlsl' is not supported: Cannot locate resource DualQuaternionSkinning_Shadow.hlsl in resource group General.
Exception thrown at 0x00007FF8440AA388 in OgreGame.exe: Microsoft C++ exception: Ogre::InvalidParametersException at memory location 0x0000003C374FCDB0.
Ogre: Error: ScriptCompiler - invalid parameters in DualQuaternionSkinning_Shadow.material(262): setting of constant failed
Exception thrown at 0x00007FF8440AA388 in OgreGame.exe: Microsoft C++ exception: Ogre::InvalidParametersException at memory location 0x0000003C374FCDB0.
Ogre: Error: ScriptCompiler - invalid parameters in DualQuaternionSkinning_Shadow.material(263): setting of constant failed
Exception thrown at 0x00007FF8440AA388 in OgreGame.exe: Microsoft C++ exception: Ogre::InvalidParametersException at memory location 0x0000003C374FCDB0.
Ogre: Error: ScriptCompiler - invalid parameters in DualQuaternionSkinning_Shadow.material(264): setting of constant failed
Exception thrown at 0x00007FF8440AA388 in OgreGame.exe: Microsoft C++ exception: Ogre::InvalidParametersException at memory location 0x0000003C374FCDB0.
Ogre: Error: ScriptCompiler - invalid parameters in DualQuaternionSkinning_Shadow.material(265): setting of constant failed
Ogre: Parsing script HardwareSkinningShadow.material
Exception thrown at 0x00007FF8440AA388 in OgreGame.exe: Microsoft C++ exception: Ogre::FileNotFoundException at memory location 0x0000003C374FDC20.
Ogre: High-level program 'Ogre/RTShader/shadow_caster_ps_hlsl' is not supported: Cannot locate resource HardwareSkinningShadow.hlsl in resource group General.
Exception thrown at 0x00007FF8440AA388 in OgreGame.exe: Microsoft C++ exception: Ogre::FileNotFoundException at memory location 0x0000003C374FDC20.
Ogre: High-level program 'Ogre/RTShader/shadow_caster_skinning_2weight_vs_hlsl' is not supported: Cannot locate resource HardwareSkinningShadow.hlsl in resource group General.
Exception thrown at 0x00007FF8440AA388 in OgreGame.exe: Microsoft C++ exception: Ogre::InvalidParametersException at memory location 0x0000003C374FCDB0.
Ogre: Error: ScriptCompiler - invalid parameters in HardwareSkinningShadow.material(106): setting of constant failed
Exception thrown at 0x00007FF8440AA388 in OgreGame.exe: Microsoft C++ exception: Ogre::InvalidParametersException at memory location 0x0000003C374FCDB0.
Ogre: Error: ScriptCompiler - invalid parameters in HardwareSkinningShadow.material(107): setting of constant failed
Ogre: Parsing script RTShaderSystem.material
Ogre: Parsing script TriplanarTexturing.material
Ogre: Finished parsing scripts for resource group General
Ogre: Creating resources for group General
Ogre: All done
Ogre: Parsing scripts for resource group OgreAutodetect
Ogre: Finished parsing scripts for resource group OgreAutodetect
Ogre: Creating resources for group OgreAutodetect
Ogre: All done
Ogre: Parsing scripts for resource group OgreInternal
Ogre: Finished parsing scripts for resource group OgreInternal
Ogre: Creating resources for group OgreInternal
Ogre: All done
Ogre: DefaultWorkQueue('Root') shutting down on thread 5928.
Ogre: Ogre: Ogre: Ogre: DefaultWorkQueue('Root')::WorkerFunc - thread 16096 stopped.DefaultWorkQueue('Root')::WorkerFunc - thread 5320 stopped.DefaultWorkQueue('Root')::WorkerFunc - thread 13044 stopped.DefaultWorkQueue('Root')::WorkerFunc - thread 13164 stopped.


Ogre: DefaultWorkQueue('Root')::WorkerFunc - thread 6800 stopped.

Ogre: DefaultWorkQueue('Root')::WorkerFunc - thread 5812 stopped.
Ogre: DefaultWorkQueue('Root')::WorkerFunc - thread 2688 stopped.
Ogre: DefaultWorkQueue('Root')::WorkerFunc - thread 13892 stopped.
The thread 0x3644 has exited with code 0 (0x0).
The thread 0x16b4 has exited with code 0 (0x0).
The thread 0x32f4 has exited with code 0 (0x0).
The thread 0x336c has exited with code 0 (0x0).
The thread 0x1a90 has exited with code 0 (0x0).
The thread 0xa80 has exited with code 0 (0x0).
The thread 0x3ee0 has exited with code 0 (0x0).
The thread 0x14c8 has exited with code 0 (0x0).
Ogre: PCZone Factory Type 'ZoneType_Octree' unregistered
Ogre: *-*-* OGRE Shutdown
Ogre: Unregistering ResourceManager for type Compositor
Ogre: Uninstalling plugin: Octree Scene Manager
Ogre: Plugin successfully uninstalled
Ogre: Unloading library C:/OgreSDK/sdk/bin/.\Plugin_OctreeSceneManager_d
'OgreGame.exe' (Win32): Unloaded 'C:\OgreSDK\sdk\bin\Plugin_OctreeSceneManager_d.dll'
Ogre: Uninstalling plugin: Octree Zone Factory
Ogre: Plugin successfully uninstalled
Ogre: Unloading library C:/OgreSDK/sdk/bin/.\Plugin_OctreeZone_d
'OgreGame.exe' (Win32): Unloaded 'C:\OgreSDK\sdk\bin\Plugin_OctreeZone_d.dll'
Ogre: Uninstalling plugin: Portal Connected Zone Scene Manager
Ogre: Plugin successfully uninstalled
Ogre: Unloading library C:/OgreSDK/sdk/bin/.\Plugin_PCZSceneManager_d
'OgreGame.exe' (Win32): Unloaded 'C:\OgreSDK\sdk\bin\Plugin_PCZSceneManager_d.dll'
Ogre: Unloading library C:/OgreSDK/sdk/bin/.\Codec_STBI_d
'OgreGame.exe' (Win32): Unloaded 'C:\OgreSDK\sdk\bin\Codec_STBI_d.dll'
Ogre: Uninstalling plugin: BSP Scene Manager
Ogre: Plugin successfully uninstalled
Ogre: Unloading library C:/OgreSDK/sdk/bin/.\Plugin_BSPSceneManager_d
'OgreGame.exe' (Win32): Unloaded 'C:\OgreSDK\sdk\bin\Plugin_BSPSceneManager_d.dll'
Ogre: Uninstalling plugin: ParticleFX
Ogre: Plugin successfully uninstalled
Ogre: Unloading library C:/OgreSDK/sdk/bin/.\Plugin_ParticleFX_d
'OgreGame.exe' (Win32): Unloaded 'C:\OgreSDK\sdk\bin\Plugin_ParticleFX_d.dll'
Ogre: Uninstalling plugin: GL 3+ RenderSystem
Ogre: *** Stopping Win32GL Subsystem ***
Ogre: Plugin successfully uninstalled
Ogre: Unloading library C:/OgreSDK/sdk/bin/.\RenderSystem_GL3Plus_d
'OgreGame.exe' (Win32): Unloaded 'C:\OgreSDK\sdk\bin\RenderSystem_GL3Plus_d.dll'
Ogre: Uninstalling plugin: GL RenderSystem
Ogre: *** Stopping Win32GL Subsystem ***
Ogre: Plugin successfully uninstalled
Ogre: Unloading library C:/OgreSDK/sdk/bin/.\RenderSystem_GL_d
'OgreGame.exe' (Win32): Unloaded 'C:\OgreSDK\sdk\bin\RenderSystem_GL_d.dll'
Ogre: Uninstalling plugin: D3D11 RenderSystem
The thread 0x1640 has exited with code 0 (0x0).
The thread 0x207c has exited with code 0 (0x0).
'OgreGame.exe' (Win32): Unloaded 'C:\Windows\System32\amdihk64.dll'
'OgreGame.exe' (Win32): Unloaded 'C:\Windows\System32\DriverStore\FileRepository\c0336524.inf_amd64_f291d855f998dc3e\B336522\atidxx64.dll'
'OgreGame.exe' (Win32): Unloaded 'C:\Windows\System32\DriverStore\FileRepository\c0336524.inf_amd64_f291d855f998dc3e\B336522\atiuxp64.dll'
'OgreGame.exe' (Win32): Unloaded 'C:\Windows\System32\DriverStore\FileRepository\c0336524.inf_amd64_f291d855f998dc3e\B336522\aticfx64.dll'
Ogre: D3D11: Shutting down cleanly.
Ogre: Unregistering ResourceManager for type Texture
Ogre: Unregistering ResourceManager for type GpuProgram
Ogre: D3D11: Direct3D11 Rendering Subsystem destroyed.
Ogre: Plugin successfully uninstalled
Ogre: Unloading library C:/OgreSDK/sdk/bin/.\RenderSystem_Direct3D11_d
'OgreGame.exe' (Win32): Unloaded 'C:\Windows\System32\cryptsp.dll'
'OgreGame.exe' (Win32): Unloaded 'C:\Windows\System32\D3DCompiler_47.dll'
'OgreGame.exe' (Win32): Unloaded 'C:\OgreSDK\sdk\bin\RenderSystem_Direct3D11_d.dll'
Ogre: Unregistering ResourceManager for type Skeleton
Ogre: Unregistering ResourceManager for type Mesh
Ogre: Unregistering ResourceManager for type HighLevelGpuProgram
Ogre: Unregistering ResourceManager for type Material
Exception thrown: read access violation.
**this** was 0xFFFFFFFFFFFFFFF7.
Last edited by macskay on Sat Jan 19, 2019 4:02 pm, edited 1 time in total.
mrmclovin
Gnome
Posts: 324
Joined: Sun May 11, 2008 9:27 pm
x 20

Re: Using Smart Pointers instead of Raw Pointers

Post by mrmclovin »

Can someone tell me what is happening here?
The pointer returned from getRoot() is not a pointer that you own, i.e. you should not be responsible to delete it. This is however exactly what you do when you put it inside a SharedPtr:

Code: Select all

Ogre::SharedPtr<Ogre::Root> root(getRoot());
Because SharedPtr will delete the root pointer when the call to setup() finishes.

In this case, you should not apply any smart pointer, and just let OgreBites::ApplicationContext handle it for you.
macskay
Gnoblar
Posts: 4
Joined: Mon Jan 14, 2019 12:08 pm

Re: Using Smart Pointers instead of Raw Pointers

Post by macskay »

Thanks that helped me out!
Post Reply