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

Working on new editor enhancements?
AND51
Addict
Addict
Posts: 1040
Joined: Sun Oct 15, 2006 8:56 pm
Location: Germany
Contact:

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

Post 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!!!
PB 4.30

Code: Select all

onErrorGoto(?Fred)
milan1612
Addict
Addict
Posts: 894
Joined: Thu Apr 05, 2007 12:15 am
Location: Nuremberg, Germany
Contact:

Post by milan1612 »

>Anyhow, my code is something für'n Arsch now and I can alles von neuem schreiben!!!
:shock: :lol:
Windows 7 & PureBasic 4.4
AND51
Addict
Addict
Posts: 1040
Joined: Sun Oct 15, 2006 8:56 pm
Location: Germany
Contact:

Post by AND51 »

This is not very funny and your post is absolutely NOT helpful.
PB 4.30

Code: Select all

onErrorGoto(?Fred)
freak
PureBasic Team
PureBasic Team
Posts: 5941
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post 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.
quidquid Latine dictum sit altum videtur
AND51
Addict
Addict
Posts: 1040
Joined: Sun Oct 15, 2006 8:56 pm
Location: Germany
Contact:

Post 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.
PB 4.30

Code: Select all

onErrorGoto(?Fred)
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Post 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 :-))
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
AND51
Addict
Addict
Posts: 1040
Joined: Sun Oct 15, 2006 8:56 pm
Location: Germany
Contact:

Post 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.
PB 4.30

Code: Select all

onErrorGoto(?Fred)
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post 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.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
AND51
Addict
Addict
Posts: 1040
Joined: Sun Oct 15, 2006 8:56 pm
Location: Germany
Contact:

Post 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... :(
PB 4.30

Code: Select all

onErrorGoto(?Fred)
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post 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. :)
User avatar
nco2k
Addict
Addict
Posts: 1344
Joined: Mon Sep 15, 2003 5:55 am

Post by nco2k »

i still hope for a auto backup option anytime soon. would be great. :)

c ya,
nco2k
If OSVersion() = #PB_OS_Windows_ME : End : EndIf
Flaming Amoeba

Post 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.
Post Reply