Crash at the scheme loading

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Crash at the scheme loading

Postby CrazyEddie » Fri Mar 04, 2005 13:39

walaber wrote:
I think it must be an issue with one of the pre-compiled .dll dependency files (DevIL, ILU, ILUT) between the ones that come with Ogre 1.0 and CEGUI.

Hmmm. I might check these, though in CEGUI they're only used with the OpenGL renderer :?

walaber wrote:
p.s. other than this slight issue, my project with CEGUI is going great! :D

Cool 8)

User avatar
iloseall
Just popping in
Just popping in
Posts: 3
Joined: Wed Jan 12, 2005 12:06
Location: Beijing China
Contact:

Re: Crash at the scheme loading

Postby iloseall » Mon Mar 07, 2005 14:01

about RawDataContainer::~RawDataContainer()
{
...
delete [] m_data //<--------crash.
...
}

I use xerces-c_2_6 , I get a rash on load scheme .

but I get nothing problem when I use xerces-c_2_5 with in Ogre 1.0.

I think : ther xerces MemBufInputSource has release the buffer.

Now, temp, I change the code to :

RawDataContainer rawXMLData;
System::getSingleton().getResourceProvider()->loadRawDataContainer(xmlFilename, rawXMLData, resourceGroup);
MemBufInputSource fileData(
rawXMLData.getDataPtr(),
static_cast<const unsigned int>(rawXMLData.getSize()),
xmlFilename.c_str(),
false);

// perform parse


////TODO iloseall
rawXMLData.setData(0); //<<<<

:(

Now It is ok on xerces-c_2_6

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Crash at the scheme loading

Postby CrazyEddie » Mon Mar 07, 2005 18:55

Okay, I'll have to compile xerces-c 2.6 and see if I get the same issue.

I believe it's actually caused by allocating and releasing memory across dll boundaries; can you double-check that your xerces 2.6 dll is dynamically liked to the Multi-threaded dll runtime (to work around this Win32 issue, all component modules need to be dynamically linked to the same runtime dll, so that all memory alloc/free operations are performed on the same heap).

Thanks,

CE.

User avatar
iloseall
Just popping in
Just popping in
Posts: 3
Joined: Wed Jan 12, 2005 12:06
Location: Beijing China
Contact:

Re: Crash at the scheme loading

Postby iloseall » Tue Mar 08, 2005 12:09

I has checked my xerces 2_6 dll.
It depends MSVCRT.dll

And my cegui dll depends MSVCRT71.dll

I got the xerces lib/dll from web download without source code.

and , I got the cegui source code from cvs HEAD , I compile with vc7.1.

The RawDataContainer's memory is alloc in OgreCEGUIResourceProvider and free in "CEGUIBase.dll"
in my sample.

Can we provider a release method in OgreCEGUIResourceProvider ?

:shock:

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Crash at the scheme loading

Postby CrazyEddie » Tue Mar 08, 2005 13:27

iloseall wrote:
I has checked my xerces 2_6 dll.
It depends MSVCRT.dll

And my cegui dll depends MSVCRT71.dll

Sounds like that copy of xerces is statically linked.

Unless you actually need 2.6 for some feature / bug fix, I'd recommend using the pre-compiled version of 2.5 from this site.

iloseall wrote:
Can we provider a release method in OgreCEGUIResourceProvider ?

I think I considered this while fixing another, related, issue. I decided that this was not really what I wanted (there was a reason for this, but I didn't make a note of what it was, and I forget now; but it must have seemed logical/important at the time).

The solution is, as already stated, to ensure all components are linked to the same runtime. This will remain my "official" stance at least for a while yet.

Another option is for me to drop Win32 support entirely :lol: (j/k).

CE.

User avatar
iloseall
Just popping in
Just popping in
Posts: 3
Joined: Wed Jan 12, 2005 12:06
Location: Beijing China
Contact:

Re: Crash at the scheme loading

Postby iloseall » Sun Mar 13, 2005 10:25

Another option is for me to drop Win32 support entirely :lol: (j/k).
CE.


:( I am work in windows.

Shall I find/make another UI System? :(

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Crash at the scheme loading

Postby CrazyEddie » Sun Mar 13, 2005 10:49

iloseall wrote:
Shall I find/make another UI System? :(

Well, I wouldn't suggest anything quite so drastic. My comment about dropping Win32 support was just a joke, I have no real intention of doing this at any point.

With regards to the actual issue, the system basically requires that things get linked dynamically to the same runtime dll. If you are unable to use the precompiled xerces versions from this site, you should be able to compile your own - it's as simple as loading the solution and hitting the compile button (I did this just yesterday with Xerces 2.6, when linked correctly there are no issues).

CE.


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 5 guests