- Code: Select all
class c
{
public:
void v (const Awesomium::JSArguments& args)
{
string s = args[0].toString();
}
};
c cI;
Navi* n = createNavi(name, NaviPosition(posX, posY), sizeX, sizeY);
n->loadFile(fileName);
n->setCallback("call", NaviDelegate(&cI, &c::v));
And the page that I'm loading into the Navi contains a simple square:
- Code: Select all
<div id="area" style="width: 50px; height: 50px; background-color: #6600ff;" onMouseOver="Client.call('that's what she said');"></div>
This simpliest example still sometimes crashes, that is, depending on the string that the callback is passing. For example, that's what she said in the example crashes the application. These are strings that crash the application:
- Code: Select all
and then he said
and then he said:
and then he said:_
and then he said: 'hi there'
that's what she said
that's what she said_
that's what she said:
that's what she said:_
onMouseDown(1,2,3,4)
(An underscore being a space.)
What actually happens is that the callback gets called, the string is read just fine:
- Code: Select all
string s = args[0].toString();
...then whatever would follow is still run and then, when leaving the callback method, the application throws a debug validation error:
- Code: Select all
HEAP[Spider.exe]: Invalid Address specified to RtlValidateHeap( 02C00000, 1A578628 )
Can this be a bug somewhere in the JSValue? Could someone at least duplicate this, or prove me wrong? Because this really seems weird

