Hello,
I get the scene from the project, which I get from the engine. We have a few xpfs and the one with the issue isn't the first, however, it is the first that tries to access a text object during our initialization process.
_engine = new xpEngine();
for (int n = 0; n < _engine.ProjectCount; n++)
{
_engine.GetProject(n, out xp);
xp.GetScene(m, out _scene, false);
I get this error with 10.5 as you expected. I will see if I can isolate the issue or get it to happen in another xpf.
thanks for your help
dave
------------------------------
David Ball
------------------------------
Original Message:
Sent: 12-13-2022 15:18
From: David Ball
Subject: Error trying to access text in xpTextObject
Hello,
I never uninstalled Xpression. I have only ever had the developer version on my desktop. I did try to re-install (10.55 I was using 9) and had the same result. I cleared the script engine cache.
I do find that if I do the following
_scene.GetObjectByName("xOffsetVal", out temp);
_temp = (xpTextObject)temp;
_temp.Text = "a";
string offset = _temp.Text;
it doesn't crash but if I look in the debugger it shows the value of offset as null. Also, it shows the value of _temp.Text as null. The value in the text object in the xpf is 70. The value never gets updated to "a"
thanks
dave
------------------------------
David Ball
Original Message:
Sent: 12-13-2022 10:30
From: Garner Millward
Subject: Error trying to access text in xpTextObject
Did you uninstall any XPression software from you PC at any point?
For example, did you install Designer and Studio and then uninstall Studio?
I would try re-installing XPression (whatever edition you have). You could also try deleting the script cache folder (close XPression before deleting):
XPression > Edit > Preferences> On Disk Cache > Script Engine > Path
Original Message:
Sent: 12-07-2022 16:43
From: David Ball
Subject: Error trying to access text in xpTextObject
I just updated from Xpression 9 to 10.55 I get the error when I run the following code:
_scene.GetObjectByName("xOffsetVal", out temp);
_temp = (xpTextObject)temp;
string offset = _temp.Text;
System.AccessViolationException
HResult=0x80004003
Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
It happens on the last line of code. Is there a new setting for text objects to allow this to work?
------------------------------
David Ball
------------------------------