![]() |
| PHPEd 4.5 (build 4520) - Debugger hangs with long strings |
|
Site Admin
|
thanks for the report. I'll take a look.
|
||||||||||||
|
|
|||||||||||||
|
Site Admin
|
I was unable to find any significant slowdown in debugger 4.5 over 3.3. I played with 2M file read in a variable and when Locals are disabled, it did not slow down at all. With Locals enabled, I had to uncheck "View strings in PHP format" to let it run fast enough. Code sample I tried with is below:
|
||||||||||||||
|
|
|||||||||||||||
|
Hmmm... i can reproduce the "hang" with PhpEd 3.3.3 and locals visible or PhpEd 4.5 all the time.
It "freezes" as soon as a line is passed, where 2MB or more of data get read into a string variable using fread(). But i will give it another try with file_get_contents(). |
||||||||||||
|
|
|||||||||||||
|
Where is this checkbox "View strings in PHP format"?
|
||||||||||||
|
|
|||||||||||||
|
Ok - found it. Now a different error occurs, about 2 or 3 seconds after the line with the 2MB file read is passed:
"Unrecoverable Error: Out of system resources. IDE will close" |
||||||||||||
|
|
|||||||||||||
|
... this happens, when you move the mouse anywhere over the string variable - either in the code or within the locals debug window. It seems, PHPEd tries to display a tool tip for the variable and crashes.
|
||||||||||||
|
|
|||||||||||||
|
Site Admin
|
I'm not quite sure I understand you.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Hmmm, you said the 3.3.3 works fine:
Please clarify if 3.3.3 works really fine or hangs.
Did you try my sample with disabled locals? To me it works fine in 4.5 as well as in 3.3.3
It is in the Local's popup menu.
Yep. A 2MB string with no line ends means ~ 16'000'000 by 14 pixels window to show it. Probably you computer has no requested memory. Looks like it would be a good approach if we trim such long lines by say 64k length. What do you think? |
||||||||||||||||||||||
|
|
|||||||||||||||||||||||
|
To clarify the things a bit:
1. PhpEd 3.3.3 hangs, if the "locals" debug window is just visible. It doesn't matter, if it is disabled or not. 2. PhpEd 4.5 hangs all the time, if "View strings in PHP format" is active. It doesn't matter, if the locals windows is visible or not or if it is disabled or not. 3. PhpEd 4.5 hangs, if "View strings in PHP format" is disabled AND if the locals window is visible OR if you move the mouse above a variable OR if the variable is in the "watch" window as well
Yes - definitely. It seems, that PhpEd tries to parse and/or display the whole variable. |
||||||||||||||
|
|
|||||||||||||||
|
Site Admin
|
What makes me wonder is that 4.5 does not hang for me. Yes it takes long while debugger transmitts those 2MB over the poor network, but definitely it does not HANG forever. Everything depends on the network bandwidth. When I tried on over 30kb/s network (the poorest I could find there) it took approx 60sec for each step and this time corresponds well to the data amount transmitted. In case of local network, it worked without any freezing at all. Each steps took ~ 1second or so. Certainly I kept Locals DISABLED and VISIBLE.
Regarding mouse over the variable, yes it's known problem and I see no other solutions for this than I mentioned before. If your machine has no memory for allocating 16000000x14 bitmaps 32bpp, you can't see it on the screen. |
||||||||||||
|
|
|||||||||||||
|
Well allocating 1.6Mx14x32bpp this would result in more than 800 MB(!). The machine, on which i had this error has "only" 512 MB of RAM. I think, limiting the maximum length, which is displayed, would really make sense. Concerning the "hang": The network transmission is not the problem - this is done very fast. It is defenitely the local parsing of the string. |
||||||||||||||
|
|
|||||||||||||||
|
Site Admin
|
Well, it's clear with Mouse-Moving-Over-Huge-Var issue.
Now let's get back our attention to the "freezing" issue. If network is not the problem, I do not understand why it works in my case and does not in yours. I just noticed that in your code, you don't really use "local" variable but a global one. In this case you'd need to disable both Globals and Locals. Isn't it? Just give a try to my code and let know |
||||||||||||
|
|
|||||||||||||
| PHPEd 4.5 (build 4520) - Debugger hangs with long strings |
|
||
|
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by


RSS2 Feed