Page 1 of 2

After adding some new global variables ...

Posted: Fri Aug 21, 2020 7:54 pm
by marc_256
Hi,

After adding some GLOBAL Variables in my program with a lot of variables .b / .w / .l / .s / .f (+- 144000 lines)
There was the following error

Image

?? please help ??

Windows 10 / x64 with PB 5.72 LTS x64

thanks,
marc

Re: After adding some new global variabl;es ...

Posted: Fri Aug 21, 2020 11:09 pm
by Josh
I have no idea what the -144000 lines mean. But if you use 144000 variables, you should perhaps consider making your system more useful when programming.

Re: After adding some new global variabl;es ...

Posted: Fri Aug 21, 2020 11:14 pm
by BarryG
I read it as his source having about 144000 lines of code, and after adding some global vars the IDE is mysteriously crashing.

Re: After adding some new global variabl;es ...

Posted: Sat Aug 22, 2020 1:19 am
by marc_256
Hi BarryG,

Yes, you are correct ...

This is extra info, when I disable the debugger, there is no message and the program works OK.
Only when I enable the debugger, I get this message ... ??

Marc

Re: After adding some new global variabl;es ...

Posted: Sat Aug 22, 2020 1:32 am
by Saki
Hi, the bug forum is probably not the right place to start.

Nothing can be done with this error description.

You can usually use buckets full of globals, not nice, but it works.

If your code really has 144,000 lines, that's more than limitless.
You can't work reasonably with that anymore.

If you have enough backups, you have to go back step by step until the bug is gone.

You have to strip the code, undo all the last changes, remove functions one by one until it is gone.

Finally, try to narrow it down to one line.

It won't work otherwise

Best Regards Saki

Re: After adding some new global variabl;es ...

Posted: Sat Aug 22, 2020 1:45 am
by marc_256
Hi Saki,

You are right, that is what i'm doing for the last day ...
Its a lot of work.

thanks,
marc

Re: After adding some new global variabl;es ...

Posted: Sat Aug 22, 2020 1:49 am
by skywalk
Is this the IDE debugger or the external version?

Did you try to compartmentalize your globals within a structure?
Or an array of values with the indices as Enumerations?
Did you compile stable code to dll instead of inline?

My apps have not breached 75k lines.
But I do call isolated apps that would collectively exceed 100k.

Re: After adding some new global variabl;es ...

Posted: Sat Aug 22, 2020 2:39 am
by Mistrel
I've also compiled tens of thousands of lines without problem in the past.

You'll have to try and narrow down your report for us or try duplicating it in a way that can be reproduced and shared.

Re: After adding some new global variables ...

Posted: Sat Aug 22, 2020 11:34 am
by Saki
Hi,
this is something very special, I don't think it's a PB bug.
If the code can be compiled on Linux or Mac for example,
you might get a hint that you don't get under Windows.

Re: After adding some new global variables ...

Posted: Sat Aug 22, 2020 11:45 am
by BarryG
Saki wrote:I don't think it's a PB bug
Image

Re: Nach dem Hinzufügen einiger neuer Variablen globaler ...

Posted: Sat Aug 22, 2020 12:36 pm
by Saki
@BarryG,
Your posting is absolutely worthless and unnecessary, because there are absolutely no hints to solve the problem.
In the bug forum you should at least try to provide help and not fill it with nonsens.

Re: After adding some new global variables ...

Posted: Sat Aug 22, 2020 3:39 pm
by marc_256
First at all, thanks to everyone who is trying to help me ...

My goal:
For my new walking robot (1m50 high) I'm writing a arduino DUE GUI debugger.

OK, last update of the problem :

1) All works as long I don't enable the IDE debugger.
2) PB is compiling all my source (>148000 lines) without any error message (see result below).
3) I do not use a single PB gadget, all is fully written in SCREEN mode, 2D library, using OPENGL.
No use of vector drawing.
4) I now use the "EnableDebugger" syntax in my source code.
5) PC Window 10 / x64 - PB 5.72 LTS x64

Conclusion:
If it was a error in my source code, my compiled .exe program wound work at all.
Is this a correct conclusion ?

thanks,
marc

Image

Re: Nach dem Hinzufügen einiger neuer globaler Variablen ...

Posted: Sat Aug 22, 2020 4:55 pm
by Saki
Hi, that looks very good 8)

Different behaviour with and without debugger is typical for such errors, this is not OK.
Something seems to have been overwritten.

Have you ever thought about turning on the Purifier ?
In your case it will probably not help, but you always have to try it.

When I had something like this it was almost always related to strings passed in procedure parameters.

I have had this problem many times, also on PB 5.7..

Typically, I can cause such an error in a certain code if I pass Val(string$).
Something will be overwritten.
It took me months to locate this error the first time.
Now I know where to look for it and it usually doesn't take long.
But your program is very complex, so I can only tell you where it always happened to me.
99% always strings in procedure parameters.

Best Regards Saki

Re: After adding some new global variables ...

Posted: Sat Aug 22, 2020 5:29 pm
by Mijikai
Do you use 'Enable Explicit' ?

Re: Nach dem Hinzufügen einiger neuer globaler Variablen ...

Posted: Sat Aug 22, 2020 7:08 pm
by marc_256
@Saki
It took me months to locate this error the first time.
Now I know where to look for it and it usually doesn't take long.
WAW, Months to locate the error ... :?
But your program is very complex, so I can only tell you where it always happened to me.
99% always strings in procedure parameters.
Yes, I use a lot of Structures/Procedures for every container I create



@Mijikai,

This is always the first line I type in all my projects.


Thanks,
Marc