[Bug][E~P] Huge, HUGE bugs on the editor

All discussions regarding the AAOv6 Beta, be it bug reports or suggestions, should be posted in this section.

Moderator: EN - Forum Moderators

User avatar
E.D.Revolution
Posts: 5743
Joined: Mon Jul 26, 2010 9:00 pm
Gender: Male
Spoken languages: English and decent Spanish
Location: Across dimensions, transcending universes

[Bug][E~P] Huge, HUGE bugs on the editor

Post by E.D.Revolution »

Okay, so I'm trying to test out the Editor to test out features and do some experiments. I've saved and there are FIVE major errors. I hope it's just on my end.

Editor Bugs
  • I have two investigation locations next to eachother. I cannot add a frame right after the locations.
  • Psyche Lock seems to, well, lock itself. I have a saved conversation, but when I save and reload, the psyche lock convo is not there for some reason. FYI, the psyche lock is in the 1st location.
  • Deleting a location seems to delete the frames following it. It is NOT saved for this reason.
Editor Bugs reflected on the Player (or at least playtest)
  • Psyche locks go immediately to the 2nd location, for no reason.
  • Psyche locks seems to be buggy because the sequence that is shown on the Player is NOT what I have there.
This is not an issue of the browser, because I can see this bug on both FX and chrome.

v6 Editor
Image
User avatar
Unas
Admin / Site programmer
Posts: 8850
Joined: Tue Jul 10, 2007 4:43 pm
Gender: Male
Spoken languages: Français, English, Español
Contact:

Re: [Bug][E~P] Huge, HUGE bugs on the editor

Post by Unas »

Ouch. That's the kind of bugs I thought were dealt with for a year or so. I wouldn't have launched V6 if I knew there were still some... ><
That's critical stuff : it means the investigation scenes data was corrupted by something while you edited. Thankfully here it's just a test trial, but I hope nobody stumbles on the same bug while doing a real case, this would be a mess to fix...

Anyway, I'll investigate right away. But if you can give me any lead about what you did on this test trial and in what order it'd be cool !
ImageImageImage
If knowledge can create problems, it is not through ignorance that we can solve them.
Si le savoir peut créer des problèmes, ce n'est pas l'ignorance qui les résoudra. ( Isaac Asimov )
User avatar
Unas
Admin / Site programmer
Posts: 8850
Joined: Tue Jul 10, 2007 4:43 pm
Gender: Male
Spoken languages: Français, English, Español
Contact:

Re: [Bug][E~P] Huge, HUGE bugs on the editor

Post by Unas »

So, for some reason, all the frames at the end of your scene 1 have been deleted, which messes up the structure entirely.
The move frame, the psyche locks end frame, and the scene end frame are all gone. So the editor no longer knows where the place ends, hence why it deletes everything.

Now I have to understand why it happened... and I can't reproduce that on another trial yet, though I've tried a bunch of stuff. It's a good thing because it means it's probably not a very frequent case; it's a bad thing because I can't find the real root cause of the problem...

Again, if you have any pointer as to what you did in this trial that could have led to that, it'd be great.
First, I see that your auto backup from 13/04/2014 - 02:53 (UTC) did not have any problem, but the following version does. This means the modifications you did at that time broke the trial data.
Do you remember what you did ? More specifically, what did you delete in there ? Talk conversations ? psyche lock conversations ? A full scene or CE ? Or just regular frames ?
Such a bug is likely related to a bad computation of the range of frames to delete in some case, so it'd be very helpful if you help me find which specific case is concerned ;-)

I guess I should also work on some basic sanity checks preventing saving when such errors are present...
ImageImageImage
If knowledge can create problems, it is not through ignorance that we can solve them.
Si le savoir peut créer des problèmes, ce n'est pas l'ignorance qui les résoudra. ( Isaac Asimov )
User avatar
E.D.Revolution
Posts: 5743
Joined: Mon Jul 26, 2010 9:00 pm
Gender: Male
Spoken languages: English and decent Spanish
Location: Across dimensions, transcending universes

Re: [Bug][E~P] Huge, HUGE bugs on the editor

Post by E.D.Revolution »

All I did was delete some frames. What I did notice was there was some "odd actions" listed on some frames. Probably those actions are supposed to be hidden from player view such as "end_CE" or something like that. There was one such odd action at the end of psyche locks when I was trying to add more stuff to the frames before.
Image
User avatar
Unas
Admin / Site programmer
Posts: 8850
Joined: Tue Jul 10, 2007 4:43 pm
Gender: Male
Spoken languages: Français, English, Español
Contact:

Re: [Bug][E~P] Huge, HUGE bugs on the editor

Post by Unas »

These odd actions appeared after the bug happened, yes. That's because the block information had become inconsistent with the actual rows.


Actually, I think I've found the faulty move by trying around from your backup before corruption : it's deleting a CE statement which has a pressing conversation set up. It's strange that I didn't catch that earlier...
I'll check that.
ImageImageImage
If knowledge can create problems, it is not through ignorance that we can solve them.
Si le savoir peut créer des problèmes, ce n'est pas l'ignorance qui les résoudra. ( Isaac Asimov )
User avatar
Unas
Admin / Site programmer
Posts: 8850
Joined: Tue Jul 10, 2007 4:43 pm
Gender: Male
Spoken languages: Français, English, Español
Contact:

Re: [Bug][E~P] Huge, HUGE bugs on the editor

Post by Unas »

The bug which caused the corruption, which happened when deleting a CE statement, should be fixed now.
I'm still suprised that such a critical bug could still be present (even more after having seen the code that caused it - I must have been really tired when writing that, because it didn't make much sense).

Anyway, next time you want to edit your test trial, you should start from the backup before corruption ( http://aceattorney.sparklin.org/V6_Test ... 1397350400 ), and hopefully all should be fine.


... Just to be sure, you did delete a statement before seeing the bug, right ? Because if you didn't, it means I have another issue to look for ><
ImageImageImage
If knowledge can create problems, it is not through ignorance that we can solve them.
Si le savoir peut créer des problèmes, ce n'est pas l'ignorance qui les résoudra. ( Isaac Asimov )
User avatar
E.D.Revolution
Posts: 5743
Joined: Mon Jul 26, 2010 9:00 pm
Gender: Male
Spoken languages: English and decent Spanish
Location: Across dimensions, transcending universes

Re: [Bug][E~P] Huge, HUGE bugs on the editor

Post by E.D.Revolution »

Nope.
Image
User avatar
Unas
Admin / Site programmer
Posts: 8850
Joined: Tue Jul 10, 2007 4:43 pm
Gender: Male
Spoken languages: Français, English, Español
Contact:

Re: [Bug][E~P] Huge, HUGE bugs on the editor

Post by Unas »

Nope as in ?
You never deleted a CE statement in that trial ?

If so, then I'd love some details as to what you actually did. More specifically, you said you just deleted frames : if you remember in which blocks they were (CE ? scene 1 talk topic ? ) it'll help restrict the search a little. :-)
Because I've been trying quite a lot of stuff starting from your backup, and I haven't noticed any other case of corruption than the one I just fixed :-/
ImageImageImage
If knowledge can create problems, it is not through ignorance that we can solve them.
Si le savoir peut créer des problèmes, ce n'est pas l'ignorance qui les résoudra. ( Isaac Asimov )
User avatar
E.D.Revolution
Posts: 5743
Joined: Mon Jul 26, 2010 9:00 pm
Gender: Male
Spoken languages: English and decent Spanish
Location: Across dimensions, transcending universes

Re: [Bug][E~P] Huge, HUGE bugs on the editor

Post by E.D.Revolution »

All I did was delete some frames between the CE and the 1st location. I've also deleted some frames in the Psyche locks.

I never deleted a CE statement at all. In fact, I haven't touched the CE on my latest tests.
Image
User avatar
Unas
Admin / Site programmer
Posts: 8850
Joined: Tue Jul 10, 2007 4:43 pm
Gender: Male
Spoken languages: Français, English, Español
Contact:

Re: [Bug][E~P] Huge, HUGE bugs on the editor

Post by Unas »

Okay, thanks for the info. I'll try to reproduce that then :-)
ImageImageImage
If knowledge can create problems, it is not through ignorance that we can solve them.
Si le savoir peut créer des problèmes, ce n'est pas l'ignorance qui les résoudra. ( Isaac Asimov )
User avatar
Unas
Admin / Site programmer
Posts: 8850
Joined: Tue Jul 10, 2007 4:43 pm
Gender: Male
Spoken languages: Français, English, Español
Contact:

Re: [Bug][E~P] Huge, HUGE bugs on the editor

Post by Unas »

Okay, I think I have it this time.
It's not a big hole in the logic like the previous case; it's more probably a general thread synchronisation issue.

To improve performance on multi-core machines I offloaded part of the calculations in the editor to a separate thread. But if for some reason you act faster than the thread runs (if either you click very fast frenetically, or if for some reason this thread starts running slow) you can reach this kind of issues...

It's pretty troublesome, to say the least. I'll have to check how to properly lock the synchronisation - or perhaps drop this multi-thread stuff altogether; since I did it, browser performance probably has improved enough for it not to be that useful anymore...
ImageImageImage
If knowledge can create problems, it is not through ignorance that we can solve them.
Si le savoir peut créer des problèmes, ce n'est pas l'ignorance qui les résoudra. ( Isaac Asimov )
User avatar
kwando1313
Posts: 7684
Joined: Tue Jul 22, 2008 6:33 pm
Gender: Male
Spoken languages: English, Français (un peu), Ancient Belkan
Location: Uminari City

Re: [Bug][E~P] Huge, HUGE bugs on the editor

Post by kwando1313 »

Oh hey, multithreading. And concurrency. Learning about that was... Interesting. xP (Though, you didn't lock your threads? I thought that locking threads was really important especially to prevent this kind of stuff from happening?)

But still... You can do multithreading in JavaScript?
Avatar made by Rimuu~

Image

"The Knight of the Iron Hammer, Vita, and the Steel Count, Graf Eisen. There's nothing in this world we can't destroy."
User avatar
Ferdielance
Posts: 778
Joined: Sun Mar 09, 2008 12:46 am
Gender: Male
Spoken languages: English

Re: [Bug][E~P] Huge, HUGE bugs on the editor

Post by Ferdielance »

Does the player use multithreading as well? Because if so, the fantastic speed has proven very useful for engines.
"A slow sort of country!" said the Queen. "Now, here, you see, it takes all the running you can do, to keep in the same place. If you want to get somewhere else, you must run at least twice as fast as that!"
User avatar
Unas
Admin / Site programmer
Posts: 8850
Joined: Tue Jul 10, 2007 4:43 pm
Gender: Male
Spoken languages: Français, English, Español
Contact:

Re: [Bug][E~P] Huge, HUGE bugs on the editor

Post by Unas »

Nope, the player uses only one thread, like regular JS.

The editor uses a Worker, which is the JS interface to create a new thread.
Workers are completely isolated, they do not share memory (the current "dedicated workers" at least. There are standards being established for "shared workers" but it's much more complex and just starting to be implemented in browsers), so there is no need for "locking" in the usual sense.

Here it's merely a synchronisation issue on my end : if you delete two frames at once, the main thread will send two messages to the worker without waiting for the worker's response to the first; so the main thread may receive the output from the worker for the first message, while it expects the output for the second message. And get mixed up.
ImageImageImage
If knowledge can create problems, it is not through ignorance that we can solve them.
Si le savoir peut créer des problèmes, ce n'est pas l'ignorance qui les résoudra. ( Isaac Asimov )
User avatar
E.D.Revolution
Posts: 5743
Joined: Mon Jul 26, 2010 9:00 pm
Gender: Male
Spoken languages: English and decent Spanish
Location: Across dimensions, transcending universes

Re: [Bug][E~P] Huge, HUGE bugs on the editor

Post by E.D.Revolution »

It is possible that I can act faster than the thread can run. In fact, at times, the threads are really slow. I click for a set of frames and it the whole thing pauses for about a couple seconds or so, leaving me unable to do anything, as if everything went kaput. Of course, nothing went kaput but it does hang.
Image
Post Reply