View Full Version : Studio will not model code

Ian Smith
11-May-2022, 05:40 AM
Please see images
1 is the code that will not model - I have tracked it down to the highlighted line.
2 is the Studio version
3 is the line of code in an external editor - UltraEdit
4 is the line of code displayed as Hex in UltraEdit
5 is the message displayed when the view is opened in UltraEdit
6 is the view displayed as Hex in UltraEdit to show the BOM

Hope that is enough info. (I have also uploaded the view.)


Stephen W. Meeley
11-May-2022, 06:18 AM

Notepad++ shows a NUL character at the end of that line. Once removed, the Studio models the view without error.

Do you know how or why the NUL was created? I see references to Notepad++ showing nulls "after a crash", but all the information seemed to be focused on how to replace / remove them, not how they got there in the first place.

Ian Smith
11-May-2022, 07:51 AM
Hi Stephen

No idea - sorry. I can confirm that the code had only be edited in the Studio.

What confused me was that the Studio could not model the code even when I had commented out all of the code in the object.

Possible improvements

Get the editor to check for valid UFT8 data when switching to model mode and show a relevant error message. Obviously, the normal "check the structure of your code" message did not apply in this case.
Get the editor to show place holders for non valid characters in the code

I appreciate this may be not be a simple fix in the Unicode world but UltraEdit was able to recognise that the UTF8 data was invalid.

Regards to all

11-May-2022, 09:52 AM
I had this a few times and was pretty sure in was not edited outside of the Studio. And we are talking here pre 20.0

Also had a few time when I copy and paste weird character in the paste. Never been able to sort out why. Restart and it work work even with the same paste which was still in the clipboard.


Ian Smith
12-May-2022, 04:51 AM
Move info

Image 1 before edit
Image 2 after edit

Deleted text after // (left the 2 forward slashes)
Use Alt + cursor keys to highlight all the 7s
Pressed 8 to change the 7s to 8
Changed my mind and used Ctrl+Z to reverse the changes. The comment text was put back as shown in image 2

Also, when I closed the view the Studio thought that the view had not been changed (no * after name on file tab) and did not prompt to save.)

Reloaded the view in the Studio and the extra characters are not there.


Stephen W. Meeley
12-May-2022, 05:36 AM

I tried to reproduce this and could not. I used the same test view you attached earlier and typed in the enum list as you show it and saved the test view. I then opened and followed your instructions. In step 4, only the column of 8s reverted to 7s - I had to press Ctrl+Z a second time to make the commend come back (as expected) and it came back just as it was (no funky characters).

Ian Smith
12-May-2022, 06:26 AM
I agree, I can't replicate it any more - Oh.....

There is definitely a problem, I'll keep reporting as they arise. Hopefully we will get one that is reproduce-able.

12-May-2022, 10:47 AM
Changed my mind and used Ctrl+Z to reverse the changes. The comment text was put back as shown in image 2

I have seen this more often then once.


Stephen W. Meeley
12-May-2022, 11:06 AM

Recently? Any way to reproduce?

17-May-2022, 08:19 PM
hmmmm a few weeks ago.

Nope never have been able to reproduce after restart of the studio.

Happens once every 3 months. And it is always copy and paste stuff.


Ian Smith
18-May-2022, 03:17 AM
This suggests that the Editor is not handling the clipboard and / or, in my case, the end of the undo buffer correctly. Obviously, restarting the Studio resets everything so replicating the problem is extremely difficult.

Never had this problem pre Unicode where character 0 would signify end of data, which is not the case in the Unicode world. Again this suggests that offset / data length metadata is incorrect and, in my case, I am see buffer overrun.

18-May-2022, 08:07 AM
You are right copy past and undo gives the problem. In what ever combination or order. Just not able to find it.


18-May-2022, 08:19 AM
Have you cut 'n' pasted something else in the meantime from a n other application that might explain the rarity

18-May-2022, 06:08 PM
Nope just pretty sure within the studio only.