I've finally gotten the ball rolling and getting some code down, but I'm getting this exception:
Unhandled exception at 0x7c81eb33 in Testing Ground.exe: Microsoft C++ exception: CEGUI::InvalidRequestException @ 0x0012e89c.
At this line:
CEGUI::SchemeManager::getSingleton().loadScheme("datafiles/schemes/TaharezLook.scheme");
Is it unable to load the scheme file? I have the datafiles folder with the schemes folder inside, and inside that, the TaharazLook.scheme file; All in my working directory, so what could be the problem?
Getting run-time exception
Moderators: CEGUI MVP, CEGUI Team
Re: Getting run-time exception
I changed the line to:
CEGUI::SchemeManager::getSingleton().loadScheme("datafiles\\schemes\\TaharezLook.scheme");
but still no luck. The exception occurs more specifically in the fstream.cpp file in this function:
_Myt *open(const char *_Filename,
ios_base::openmode _Mode,
int _Prot = (int)ios_base::_Openprot)
{ // open a C stream with specified mode
_Filet *_File;
if (_Myfile != 0 || (_File = _Fiopen(_Filename, _Mode, _Prot)) == 0)
return (0); // open failed
In the line with the if statement. Why isn't it opening the file correctly?
CEGUI::SchemeManager::getSingleton().loadScheme("datafiles\\schemes\\TaharezLook.scheme");
but still no luck. The exception occurs more specifically in the fstream.cpp file in this function:
_Myt *open(const char *_Filename,
ios_base::openmode _Mode,
int _Prot = (int)ios_base::_Openprot)
{ // open a C stream with specified mode
_Filet *_File;
if (_Myfile != 0 || (_File = _Fiopen(_Filename, _Mode, _Prot)) == 0)
return (0); // open failed
In the line with the if statement. Why isn't it opening the file correctly?
- jacmoe
- Just can't stay away
- Posts: 136
- Joined: Sun Apr 03, 2005 14:18
- Location: Holbaek, Denmark
- Contact:
Re: Getting run-time exception
Try to debug your program - it will probably tell you what's wrong.
Re: Getting run-time exception
Well, there's nothing to really debug :/
Here's all of the relevant code, and it's straight from the tutorials:
myRenderer = new CEGUI::DirectX9Renderer(device,0);
new CEGUI::System(myRenderer);
CEGUI::SchemeManager::getSingleton().loadScheme("datafiles\\schemes\\TaharezLook.scheme");
CEGUI::FontManager::getSingleton().createFont("datafiles\\fonts\\Commonwealth-10.font");
Here's all of the relevant code, and it's straight from the tutorials:
myRenderer = new CEGUI::DirectX9Renderer(device,0);
new CEGUI::System(myRenderer);
CEGUI::SchemeManager::getSingleton().loadScheme("datafiles\\schemes\\TaharezLook.scheme");
CEGUI::FontManager::getSingleton().createFont("datafiles\\fonts\\Commonwealth-10.font");
- jacmoe
- Just can't stay away
- Posts: 136
- Joined: Sun Apr 03, 2005 14:18
- Location: Holbaek, Denmark
- Contact:
Re: Getting run-time exception
You should have a 'datafiles' directory in your current directory, with the correct stuff in it.
You are not trying to run your app from your IDE, are you?
A debug session will tell you if your app cannot find TaharezLook.scheme - or if there are other problems.
If you haven't looked, CEGUI.log might have some clues as to what's wrong.
You are not trying to run your app from your IDE, are you?
A debug session will tell you if your app cannot find TaharezLook.scheme - or if there are other problems.
If you haven't looked, CEGUI.log might have some clues as to what's wrong.
Re: Getting run-time exception
Here's what the logger says:
03/07/2005 02:22:06 (Error) Exception: DefaultResourceProvider::load - GUIScheme.xsd does not exist
03/07/2005 02:22:06 (Error) Exception: DefaultResourceProvider::load - GUIScheme.xsd does not exist
Re: Getting run-time exception
Make sure your "Debug Working Directory" is set to where your Binary is located. Also, ensure that the "datafiles\" directory is in the same directory as your exe.
Another thing you can try is to build your project then run the EXE that it created directly. (Not through the development IDE)
What compiler are you using?
Another thing you can try is to build your project then run the EXE that it created directly. (Not through the development IDE)
What compiler are you using?
[font=Verdana][size=xx-small]"It's not hard to stand out when the general level of competence is so low" -EMH[/size][/font]
namik@flashmail.com
namik@flashmail.com
Re: Getting run-time exception
VC++.NET 2003. The working directory is set to where the datafiles folder is. GUIScheme.xsd is in the same folder along with TaharezLook.scheme.
I already tried running the .exe the build created, and that didn't work either, same problem.
I already tried running the .exe the build created, and that didn't work either, same problem.
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: Getting run-time exception
What version of the code is this with? Unless it's 0.3.0 then the .xsd schema files really need to be in the directory where the .exe is.
If you're just building things using the provided directory layout, then 'bin' and 'datafiles' should be side by side and you need ../ at the begining of those paths you posted. If you have changed the directory layout in any way you will need to go through all of the xml files and fix up the paths contained therein.
CE
If you're just building things using the provided directory layout, then 'bin' and 'datafiles' should be side by side and you need ../ at the begining of those paths you posted. If you have changed the directory layout in any way you will need to go through all of the xml files and fix up the paths contained therein.
CE
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Re: Getting run-time exception
How do I properly set up my project to work with CEGUI? I just kept copy/pasting in .dll files when it said this .dll was needed and that .dll was needed. Do I just need to copy in the bin folder and data files folder or what? Any special project settings? And why the "...\\" at the start of the file path?
I'm using 2.0 by the way.
I'm using 2.0 by the way.
- jacmoe
- Just can't stay away
- Posts: 136
- Joined: Sun Apr 03, 2005 14:18
- Location: Holbaek, Denmark
- Contact:
Re: Getting run-time exception
0.3.0 is much easier to work with.
The \ is an escape character in C++ - when you want to use the \ (not the escape character), you need to "escape" it with \ - and it becomes "\\".
Not the best of explanations, but you have Google to provide a better one.
You can get rid of that by using "/" instead.
"\" is Windows path separators, and "/" is Unix path separators, btw.
".." means the parent directory.
If you want to know what project settings to use, just take a look at the settings for the provided sample projects
The \ is an escape character in C++ - when you want to use the \ (not the escape character), you need to "escape" it with \ - and it becomes "\\".
Not the best of explanations, but you have Google to provide a better one.
You can get rid of that by using "/" instead.
"\" is Windows path separators, and "/" is Unix path separators, btw.
".." means the parent directory.
If you want to know what project settings to use, just take a look at the settings for the provided sample projects
Re: Getting run-time exception
Alright, I made the switch to 0.3.0. It says I'm missing .dll files when I run. How do I set the compiler (VC++.NET 2003) to use the .dll files in the bin folder? Or do I just have to copy/paste all the .dll files into the working directory?
- jacmoe
- Just can't stay away
- Posts: 136
- Joined: Sun Apr 03, 2005 14:18
- Location: Holbaek, Denmark
- Contact:
Re: Getting run-time exception
You shouldn't be running it from the IDE, except when debugging.
If you are, you need to go into your project settings and set Command and Working Directory under Debugging.
(Command is Working Directory + the_name_of_your_exe)
If you are, you need to go into your project settings and set Command and Working Directory under Debugging.
(Command is Working Directory + the_name_of_your_exe)
Return to “Modifications / Integrations / Customisations”
Who is online
Users browsing this forum: No registered users and 14 guests