My latest very large project, problems and good
My latest very large project, problems and good
The latest more years i coded my project quick-aes-256
I do not think that I could create it with a different programming language at all and debug
Mostly i use to time PB542 Win x64
A problem i have from time to time is string mismatch.
Strings are cutted, permuted and then possible also pointer and variables damaged.
Mostly, i restart PB and the "ghost" are gone.
A sample :
; ----This is OK--------
This is your key :
Autokey : 138E30D679F6E7DF4986CAEDF97593FBDC2DD5DA76F961B88E819DC6F2B4D6AA
; -----This i can become-------
This is your key :
Autokey : 138E30
;----------------
Firstly, i think, i have self maked this mismatch and search the issue,
but mostly all looking clean for my eyes.
A other problem, i self have with forward declared Procedure.s
I become then often string parameter mismatch, same i write above.
But, i use this feature only for temporary testings.
With snippets i can not make samples from this problems
In the large code it is very difficult to localize what make the problems or localize a code line
A other problem i self have with PB, are unfixed old bugs
I self can not understand the ugly PNG bug is not fixed to time in the latest versions
But, PB is not my software ...
I do not think that I could create it with a different programming language at all and debug
Mostly i use to time PB542 Win x64
A problem i have from time to time is string mismatch.
Strings are cutted, permuted and then possible also pointer and variables damaged.
Mostly, i restart PB and the "ghost" are gone.
A sample :
; ----This is OK--------
This is your key :
Autokey : 138E30D679F6E7DF4986CAEDF97593FBDC2DD5DA76F961B88E819DC6F2B4D6AA
; -----This i can become-------
This is your key :
Autokey : 138E30
;----------------
Firstly, i think, i have self maked this mismatch and search the issue,
but mostly all looking clean for my eyes.
A other problem, i self have with forward declared Procedure.s
I become then often string parameter mismatch, same i write above.
But, i use this feature only for temporary testings.
With snippets i can not make samples from this problems
In the large code it is very difficult to localize what make the problems or localize a code line
A other problem i self have with PB, are unfixed old bugs
I self can not understand the ugly PNG bug is not fixed to time in the latest versions
But, PB is not my software ...
Last edited by walbus on Tue Aug 16, 2016 12:40 pm, edited 1 time in total.
Re: My latest very large project, problems and good
Which means your coding is the problem, not PureBasic (sorry to say).walbus wrote:With snippets i can not make samples from this problems
Re: My latest very large project, problems and good
The mentioned issue with strings is also documented in following topic:
==> http://www.purebasic.fr/english/viewtopic.php?t=66102
==> http://www.purebasic.fr/english/viewtopic.php?t=66102
Windows 10 / Windows 7
PB Last Final / Last Beta Testing
PB Last Final / Last Beta Testing
Re: My latest very large project, problems and good
Many thanks helpy, yep, this is it.
A other, similar problem are within damaged pointers or handles.
It looks for my also strings make this
As sample, you have a loop and increment a variable.
The variable should, as sample a result from 1000,
but it are available more bytes are overwritten
So you can become strange results, also negative results
With pointers (handles) it can crash brutale
The further issue looking about so :
a$="wow"
b$="hello world"
Declare.s test(a, b, a$, b$)
Debug test(1, 2, a$, b$)
Procedure.s test(a, b, a$, b$)
ProcedureReturn "LOL"
EndProcedure
; Here it is available you become back not "LOL", you become back "wowhello world"
Is a$ now a decrypted password or a other secret thing, it is not ever drolly
A other, similar problem are within damaged pointers or handles.
It looks for my also strings make this
As sample, you have a loop and increment a variable.
The variable should, as sample a result from 1000,
but it are available more bytes are overwritten
So you can become strange results, also negative results
With pointers (handles) it can crash brutale
The further issue looking about so :
a$="wow"
b$="hello world"
Declare.s test(a, b, a$, b$)
Debug test(1, 2, a$, b$)
Procedure.s test(a, b, a$, b$)
ProcedureReturn "LOL"
EndProcedure
; Here it is available you become back not "LOL", you become back "wowhello world"
Is a$ now a decrypted password or a other secret thing, it is not ever drolly
Re: My latest very large project, problems and good
I can not reproduce this!walbus wrote:The further issue looking about so :Is a$ now a decrypted password or a other secret thing, it is not ever drollyCode: Select all
a$="wow" b$="hello world" Declare.s test(a, b, a$, b$) Debug test(1, 2, a$, b$) Procedure.s test(a, b, a$, b$) ProcedureReturn "LOL" EndProcedure ; Here it is available you become back not "LOL", you become back "wowhello world"
Tested on Windows 10 Pro 64 bit (Version 1607) with:
- PB 5.42 32 Bit
- PB 5.42 64 Bit
- PB 5.43 b1 32 Bit
- PB 5.43 b1 64 Bit
- PB 5.50 32 Bit
- PB 5.50 64 Bit
Windows 10 / Windows 7
PB Last Final / Last Beta Testing
PB Last Final / Last Beta Testing
Re: My latest very large project, problems and good
Yep, this is the problem, i can not reproduce this with a snippet
In my large code i become this often when i try for testing new procedures forward declaring
I can absolutely not say what is the reason
New arrangement the procedures and removing declare and all is KO
Some other
Swap a(1), a(2) or some constructs have overwritten strings and variables in my large App
Here also with a snippet all works fine
I have used months for found what make sporadic crashes, it was this Swap in my main crypter procedure
In my large code i become this often when i try for testing new procedures forward declaring
I can absolutely not say what is the reason
New arrangement the procedures and removing declare and all is KO
Some other
Swap a(1), a(2) or some constructs have overwritten strings and variables in my large App
Here also with a snippet all works fine
I have used months for found what make sporadic crashes, it was this Swap in my main crypter procedure
Last edited by walbus on Tue Aug 16, 2016 6:15 pm, edited 1 time in total.
Re: My latest very large project, problems and good
@Dude, no, my code is clean and rock stable
I write this here only, i want hear what other coders means.
You think, my code ist the problem, this is always ok.
But, you can test my large tool, with about 20 000 code lines.
You want found only one bug in all my tools, you must long search, i think
I write this here only, i want hear what other coders means.
You think, my code ist the problem, this is always ok.
But, you can test my large tool, with about 20 000 code lines.
You want found only one bug in all my tools, you must long search, i think
Last edited by walbus on Tue Aug 16, 2016 12:57 pm, edited 1 time in total.
Re: My latest very large project, problems and good
I might have misunderstood you. What I mean is, if you can't reproduce a problem with a snippet, then it's 99% of the time a problem with your code.walbus wrote:@Dude, no, my code is clean and rock stable
Re: My latest very large project, problems and good
Yep, but this is the 1%, i think....
But truly, it is absolutely not a problem for my and nobody is perfect
For my it is simple ever helpfull to hear what other coders mean
But truly, it is absolutely not a problem for my and nobody is perfect
For my it is simple ever helpfull to hear what other coders mean
Re: My latest very large project, problems and good
I actually find it a really interesting question that seems to affect all programming, any language - what do you do when you get a bug that happens out of the blue, a bug that doesn't make sense, a bug where all your code looks fine, and a bug that's embedded somewhere in thousands of lines of code? I'd love to know myself!
my brutish approach is [edit](after trying everything with the excellent Purifier first but still having no luck)![/edit] ... make a copy of the code... and butcher it!! lol. Reduce unnecessary code, save, run... reduce, save, run... revert if the bug disappears, run... reduce, save, run... get rid of all code until nothing is left but a dozen or whatever lines demonstrating the now isolated bug. Tedius, not fun, but what else can ya do!? and if you can't isolate it maybe that proves the bug is a complexity/conflicting code from more than one source issue (ie your fault), rather than your typical single isolateable bug?
my brutish approach is [edit](after trying everything with the excellent Purifier first but still having no luck)![/edit] ... make a copy of the code... and butcher it!! lol. Reduce unnecessary code, save, run... reduce, save, run... revert if the bug disappears, run... reduce, save, run... get rid of all code until nothing is left but a dozen or whatever lines demonstrating the now isolated bug. Tedius, not fun, but what else can ya do!? and if you can't isolate it maybe that proves the bug is a complexity/conflicting code from more than one source issue (ie your fault), rather than your typical single isolateable bug?
Last edited by Keya on Tue Aug 16, 2016 1:37 pm, edited 2 times in total.
Re: My latest very large project, problems and good
walbus, have you already tried to activate the Purifier (Compiler > Compiler Options... > Tab Compile/Run > Enable Purifier) ?
Re: My latest very large project, problems and good
Yep, Purifier and debugger is ever on
Primary i code with Win64 / Unicode
As a secound stepp i test and adapt all for Linux, gtk2 and gtk3 compatible, x86 and x64
All my code is also ever 100% Ascii compatible and tested
I use many strings, string manipulations and hashes and so it is more
as helpfull all testing also with a Ascii compilation
Self made problems with strings you can often found with this little trick
Primary i code with Win64 / Unicode
As a secound stepp i test and adapt all for Linux, gtk2 and gtk3 compatible, x86 and x64
All my code is also ever 100% Ascii compatible and tested
I use many strings, string manipulations and hashes and so it is more
as helpfull all testing also with a Ascii compilation
Self made problems with strings you can often found with this little trick
Re: My latest very large project, problems and good
@Keya
Yep, i have a history from all other codes.
But, the problem with a very large and complex code is, you can not simple reduce the code.
One thing needs the other, many dependances
It is very difficult to reduce a complicated large code
Further, you see not ever simple the line how make the problem
You have e damaged pointer, search now the issue !
And a other thing, you test excessive your code, more hours.
All works fine.
After two days you use the tool, you become a crash, only one !
Then you beginn searching what this was, all works fine again, hours and hours
This are diabolic
Yep, i have a history from all other codes.
But, the problem with a very large and complex code is, you can not simple reduce the code.
One thing needs the other, many dependances
It is very difficult to reduce a complicated large code
Further, you see not ever simple the line how make the problem
You have e damaged pointer, search now the issue !
And a other thing, you test excessive your code, more hours.
All works fine.
After two days you use the tool, you become a crash, only one !
Then you beginn searching what this was, all works fine again, hours and hours
This are diabolic
Re: My latest very large project, problems and good
If the problem is mainly about that floating compiler bug with strings, then it should be resolving by restarting whole IDE for now (as you mentioned already).
Also for such a large code I think it is justified to split it into several projects and compile each of them to stand-alone .dll (as PB won't allow to compile static libs). It is better to have several stable and relatively small libraries, than to rely on only single large resulting binary, which is much hard to maintain and debug.
And of course it can have sense to write set of automated tests in this case, to check results of every routine separately.
I didn't come yet to 20k+ lines of code, my largest project is several times smaller still, for now I don't have much difficults with it. But even without those damn "PB interesting bugs" dealing with any large project sometimes becomes hard regardless of the language, nothing to do.
Also for such a large code I think it is justified to split it into several projects and compile each of them to stand-alone .dll (as PB won't allow to compile static libs). It is better to have several stable and relatively small libraries, than to rely on only single large resulting binary, which is much hard to maintain and debug.
And of course it can have sense to write set of automated tests in this case, to check results of every routine separately.
I didn't come yet to 20k+ lines of code, my largest project is several times smaller still, for now I don't have much difficults with it. But even without those damn "PB interesting bugs" dealing with any large project sometimes becomes hard regardless of the language, nothing to do.
"W̷i̷s̷h̷i̷n̷g o̷n a s̷t̷a̷r"
Re: My latest very large project, problems and good
@Lunasole
Yep, i would not make this thing so large.
But it is come more and more.
I can split all functions in separate DLL/SO, but i like to have everything together for fast debugging and enhancements
On each start from my codes with debugger run ever a internal complete self test from all functions
This is more as helpfull for automatic detecting many problems cnd checking new PB Versions
PB443 and PB550 bugs i have so at a word detected
Unfortunatele i have the betas not tested, old bug was not fixed and i want the new functions not
So i could not make bug reports for the new Procedure.s bug before the finals are come out
Yep, i would not make this thing so large.
But it is come more and more.
I can split all functions in separate DLL/SO, but i like to have everything together for fast debugging and enhancements
On each start from my codes with debugger run ever a internal complete self test from all functions
This is more as helpfull for automatic detecting many problems cnd checking new PB Versions
PB443 and PB550 bugs i have so at a word detected
Unfortunatele i have the betas not tested, old bug was not fixed and i want the new functions not
So i could not make bug reports for the new Procedure.s bug before the finals are come out

