Problem while opening .pb File
Problem while opening .pb File
Hello
Excuse me for my bad english.
I have a little problem with the last beta version. Some Pb file are empty when i open it with IDE !
You can try to download this http://yann.lebrun.club.fr/Aliens.zip
try to open "main.pb" (6ko) with purebasic IDE, The file is empty. but if you open it with notepad you can see the code.
I think it's a bug ! can you comfirm it to me ?
best regards
Thyphoon
Excuse me for my bad english.
I have a little problem with the last beta version. Some Pb file are empty when i open it with IDE !
You can try to download this http://yann.lebrun.club.fr/Aliens.zip
try to open "main.pb" (6ko) with purebasic IDE, The file is empty. but if you open it with notepad you can see the code.
I think it's a bug ! can you comfirm it to me ?
best regards
Thyphoon
- Psychophanta
- Always Here
- Posts: 5153
- Joined: Wed Jun 11, 2003 9:33 pm
- Location: Anare
- Contact:
What are you talking about? The editor should not handle binary files. It doesn't. That is not a bug. The fact that it has handled it in the past doesn't mean it should continue to do it. It just means they now have fixed the bug that did allow binary files.
And a bug as big as a tower? Come on! If the editor started to erase files on your computer, that would be a big bug. This is just a minor glitch.
And a bug as big as a tower? Come on! If the editor started to erase files on your computer, that would be a big bug. This is just a minor glitch.
Last edited by maw on Sat Oct 13, 2007 9:14 pm, edited 1 time in total.
- Psychophanta
- Always Here
- Posts: 5153
- Joined: Wed Jun 11, 2003 9:33 pm
- Location: Anare
- Contact:
Well, if you edit it in notepad then notepad simply removes the $00 character when it saves it. What's that got to do with it?Psychophanta wrote:Please read above the words of Derek:, then do it, and then thinkif you edit it in notepad and make even a slight change (add a space to the end of a line) and save it then it opens ok in the editor.
- Psychophanta
- Always Here
- Posts: 5153
- Joined: Wed Jun 11, 2003 9:33 pm
- Location: Anare
- Contact:
Wrong, because i edited it in hex mode using hex editor, which does not remove the $00 character,maw wrote:Well, if you edit it in notepad then notepad simply removes the $00 character when it saves it. What's that got to do with it?

EDIT: Arrrrrgh! my mystake. My hex editor is a crap which removes the first $00 chars.


You have lost me completly.. You say it's a bug. Then you refer to Dereks post about Notepad. Then you say wrong when I explain why Notepad would correct such a character and say you opened it with a hex editor???Psychophanta wrote:Wrong, because i edited it in hex mode using hex editor, which does not remove the $00 character,maw wrote:Well, if you edit it in notepad then notepad simply removes the $00 character when it saves it. What's that got to do with it?
EDIT: Now we are talking the same language! No bug!
- Psychophanta
- Always Here
- Posts: 5153
- Joined: Wed Jun 11, 2003 9:33 pm
- Location: Anare
- Contact:
HAAAH! you are right, too little time to change affirmations
Well, i opened it with a very wierd hex editor and inserted a space char after the 1st line, but the editor modified the $00 char by a $20 char
I have just now uninstalled that hex editor and will install ultraedit again
OH! my words have now less value than before :roll:


Well, i opened it with a very wierd hex editor and inserted a space char after the 1st line, but the editor modified the $00 char by a $20 char

I have just now uninstalled that hex editor and will install ultraedit again

OH! my words have now less value than before :roll:
- Psychophanta
- Always Here
- Posts: 5153
- Joined: Wed Jun 11, 2003 9:33 pm
- Location: Anare
- Contact:
The IDE originaly displayed any file that contained non-printable characters inside
the internal hex-viewer only. I had to change this after i got tons
of "bugreports" from jaPBe users, because the IDE did not load their sources.
The reason is that jaPBe places a NULL character between the code and the
options it appends to the end of the sourcefile.
(The original PB IDE did that as well in old versions, but we removed this because it is not a good
practise and only leads to trouble with other editors, as we can see here.)
Anyway, i contacted GPI (author if jaPBe) and asked him to change this behavior.
The answer i got was something along the lines of "i know this is a bad practise, but
it works for me, and right now i am too lazy to change this".
So i had the choise: piss off a lot of users because of a problem i did not create
(but get all the blame because my editor is the one that does not load the file),
or relax the binary detection routine a bit to let the files slip through.
Funny enough, Scintilla works on null-terminated strings and therefore cuts this file at the null.
There you have your "bug as big as a tower". Maybe a little less drama would have been better...
the internal hex-viewer only. I had to change this after i got tons
of "bugreports" from jaPBe users, because the IDE did not load their sources.
The reason is that jaPBe places a NULL character between the code and the
options it appends to the end of the sourcefile.
(The original PB IDE did that as well in old versions, but we removed this because it is not a good
practise and only leads to trouble with other editors, as we can see here.)
Anyway, i contacted GPI (author if jaPBe) and asked him to change this behavior.
The answer i got was something along the lines of "i know this is a bad practise, but
it works for me, and right now i am too lazy to change this".
So i had the choise: piss off a lot of users because of a problem i did not create
(but get all the blame because my editor is the one that does not load the file),
or relax the binary detection routine a bit to let the files slip through.
Funny enough, Scintilla works on null-terminated strings and therefore cuts this file at the null.
There you have your "bug as big as a tower". Maybe a little less drama would have been better...
quidquid Latine dictum sit altum videtur