Page 1 of 1

[DANGER!] PB WIN IDE 4.10 BETA 3 crushes code

Posted: Thu Sep 13, 2007 7:16 pm
by AND51
Hello! :twisted:

Obviously, there is a heavy error still remaining from the 3.94 version:
I already reported it here, but this error was not fixed although there was time enough (several month!). I am VERY angry with this bug!

I already posted it here 1 ½ years ago:
http://www.purebasic.fr/german/viewtopi ... +bug#87108

I had 2 codes opened, switched from one to another during a compilation.
This fucking editor crushed my source code and saved this shit!

Have a look here:
Image

Nice: All that code after line 964 is untouched. Anyhow, my code is something für'n Arsch now and I can alles von neuem schreiben!!!

Posted: Thu Sep 13, 2007 7:39 pm
by milan1612
>Anyhow, my code is something für'n Arsch now and I can alles von neuem schreiben!!!
:shock: :lol:

Posted: Thu Sep 13, 2007 7:48 pm
by AND51
This is not very funny and your post is absolutely NOT helpful.

Posted: Thu Sep 13, 2007 9:01 pm
by freak
While your situation is unfortunate, there is nothing i can do until i have a way to reproduce the problem.
I cannot fix problems that cannot be reproduced.

For one thing, i wonder how you were able to switch sources while compiling, because
since 4.10, the IDE locks the main window while the compiling is in progress.

Posted: Thu Sep 13, 2007 9:35 pm
by AND51
Now I remember (I hope):

I had Main Module.pb and Enumeration.pbi opened. In the compileroptions of Enumeration I activated the feature "Main Code". So Enumeration is related to Main Module, since it is its include file.
OK?

I had Enumeration activated and clicked Compile. But in Main Module, there was a syntaxerror (cant remember that error exactly). The IDE is so configured that it jumps to that code in which the error occures.

Immediately before clicking Compile I saved the source code Enumeration manually. So maybe the IDE was saving code+compiling at once=error?

Order:
Enumeration activated -> Clicked SAVE -> Clicked Compile -> Error in other code

If I remember right, Main Module was modified (indicated by a *star* in the panel). After the compilation was ended (and the compilated program ran) I planned to save the Main Module, but when the IDE switched to that code, it was already crumbled/crushed/fragged.


Sorry, for being too angry, but at first, thought the IDE destroyed my whole code (rename IDE to Switch&Destroy? :lol: )
But when creating a "Schadensbericht", I recognized, that the code after line 964 was untouched; the beginning of the code, too.
Only ~300 lines code were damaged + 1 other line (line 1395).

This bug makes me angry, because I cannot trust the IDE anymore. AutoSave is not recommendable, because if you edit big parts of your code, want to test it by compiling, and if you then see that your edit was wrong, you have a big problem, because your old code is not recoverable. So I save it manually everytime, I need.

Posted: Fri Sep 14, 2007 12:16 am
by blueznl
May I politely suggest to choose your words carefully? Okay, now that's out of the way :-) there's no easy help here. I've never run into a situation as you describe, and I've been messing around a lot with PureBasic. (In fact, it's the very first time I think I ever heard of this.)

If it happens again have a look in the compilers folder and check a file called 'pbeditoroutput' or something similar, and see if that one is corrupted as well. If it is, then it happens on the moment the editor saves the code. The PB team will need the file causing the corruption (ie. the moment just before it got corrupted) and need to be able to reproduce it.

If you can reproduce it, but you can't exactly predict when it happens, you may consider creating multiple numbered saves, just before compiling. If that seems a bit too much like work ;-) you might abuse my poor CodeCaddy tool and set the backup option to create a backup on each compile/ run. That way you should be able to produce such a troublesome code sample so the problem could be fixed.

Again, I haven't seen such a problem, but that doesn't mean it is not there. Nor does it mean I'd get loud on the subject. (I prefer the nagging approach :-))

Posted: Fri Sep 14, 2007 11:26 am
by AND51
> May I politely suggest to choose your words carefully?
I already apologized. But I think that understand me, because I was very shocked in the first moment. There is a german term: I could drive out my skin (stupid 1:1 translation :) ).

> check a file called 'pbeditoroutput'
Yes, its name is "PB_EditorOutput.pb". Believe me, this was the FIRST thing I did, because I wanted to rescue my code!
But this file does NOT exist since 4.02... I looked up every folder of PB: nothing.

> The PB team ... need to be able to reproduce it.
When I look at the german post (link above), I assume that the problem is somehow caused by the folding feature, but I'm not sure.
I'm glad to see that freak really improved the IDE, you can almost "feel" his improvements. All in all I would say that aotu-complete and folding are working better than in 3.94.

> If you can reproduce it
In the older 3.94 version I can reprocduce the problem, in the link above, I described how you can cause a crash. In this version, I couldn't reproduce this problem yet.

> you might abuse my poor CodeCaddy tool and set the backup option to create a backup on each compile/run
I already had a look on your cool tool, but I though that it would be enough, if I save the code manually from time to time (with Ctrl+S).
This method has saved my code in several situations, luckyly. But I didn't know that the damaged code will overwrite my file :shock:
I will keep your CodaCaddy in mind!


By the way, I think the problem is definetely somewhere in the IDE, because I have no 3rd party userlibs installed (I only "installed" WIN32.hlp). As I already said, I see the problem in the folding function, but I'm not sure and I don't have any proofs.


Again sorry for my angry-words. Let's show our good manners again and discuss this problem objectively.

Posted: Fri Sep 14, 2007 12:37 pm
by gnozal
AND51 wrote:Yes, its name is "PB_EditorOutput.pb". Believe me, this was the FIRST thing I did, because I wanted to rescue my code!
But this file does NOT exist since 4.02... I looked up every folder of PB: nothing.
PB_EditorOutput.pb does still exist in PB4.10, but all the temporary files are now in windows %TEMP% directory (and not in \Compilers anymore) because of Vista.

Posted: Fri Sep 14, 2007 1:46 pm
by AND51
gnozal wrote:
AND51 wrote:Yes, its name is "PB_EditorOutput.pb". Believe me, this was the FIRST thing I did, because I wanted to rescue my code!
But this file does NOT exist since 4.02... I looked up every folder of PB: nothing.
PB_EditorOutput.pb does still exist in PB4.10, but all the temporary files are now in windows %TEMP% directory (and not in \Compilers anymore) because of Vista.
AAAAAAAAAARGH! So the probably old code was still on my HDD? OMG! Didn't know that... :(

Posted: Sun Sep 16, 2007 6:51 pm
by DoubleDutch
I've had the editor corrupt files before now, it's not happened in a while - but just to make sure I backup each day to a different hdd. It's still a great code editor. :)

Posted: Sun Sep 16, 2007 7:27 pm
by nco2k
i still hope for a auto backup option anytime soon. would be great. :)

c ya,
nco2k

Posted: Fri Sep 28, 2007 12:47 am
by Flaming Amoeba
This is not very funny and your post is absolutely NOT helpful.
Don't use syntax highlighting or folding.

Despite opinions to the contrary and despite its wide use, Scintilla is not the most stable beast out there and still has all kinds of weird and often hard to replicate quirks in it.

Generally, I don't have any problems, but if I did, I would first disable folding and if that didn't fix it, then I would try disabling syntax highlighting.

Not always, but this will often cure quirks with Scintilla based IDEs.