rejetto forum

beta 146 archivable & browse sub-folders

maverick · 16 · 11115

0 Members and 1 Guest are viewing this topic.

Offline maverick

  • Tireless poster
  • ****
    • Posts: 1052
  • Computer Solutions
    • View Profile
Looks like this was missed from the beta forum:

Quote from: maverick
Something wrong with this build.  I can't say that it actually crashes but on start-up once I start to browse the folders/sub-folders, HFS quits and Exits all of a sudden.  I can reproduce this problem everytime I try to browse a folder/sub-folder.

Quote from: rejetto
it works with subfolders here
find more clues about the problem or pass me your vfs and ini (privately)

Make one or more of the sub-folders archivable.  Then try to browse them.  HFS will quit and Exit.
maverick


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
I created a virtual folder, then inside a real folder, which has been marked as archivable.
I removed archivable from the root.
I accessed them at all level. No problem. Tried to download the archive. No problem.
We need something else to reproduce it.


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
I ran #146, applied your change to the default tpl, then created this vfs (attached), clicked here and there but no problems at all.

Can you tell me more?


Offline maverick

  • Tireless poster
  • ****
    • Posts: 1052
  • Computer Solutions
    • View Profile

My apologies rejetto.  I found the cause to my problem and it was on my end.  A bad cut & paste in my template was causing the problem.  Fixed.
maverick


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
But... if HFS quits with a click by the client, it means it has a bug that must be fixed.
Isn't it so?


Offline maverick

  • Tireless poster
  • ****
    • Posts: 1052
  • Computer Solutions
    • View Profile

Yes, that is what I thought too.  I spent a lot of time tracking down this problem.  This bad cut & paste (partial code that was even remarked) wasn't something that was done recently.  Not sure how that happened and it was in the archive section that I missed before.  I had no errors or anything else running this up to build 145.  But build 146 wouldn't allow it and HFS quit as I explained before.  I removed that entry from the template and now it is working good again.  I'll let you know if something else shows up.
maverick


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
I think i was not clear.
I want to reproduce the problem you had.
I want HFS to not quit, if that is not the wish of the user.
Can you provide me the information to reproduce the problem?


Offline maverick

  • Tireless poster
  • ****
    • Posts: 1052
  • Computer Solutions
    • View Profile
I don't remember exactly what I removed from the template that caused the problem.  However, I added something similar to the default template which reproduces the problem.  See attached.

Let me know if you were able to reproduce it ...
« Last Edit: November 29, 2007, 11:30:05 AM by maverick »
maverick


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
ok, it was quite "easy" :)

it's the %item-archive% inside the [item-archive], that is infinite recursion.
i will try to put a solution to this, but it's not obvious, because a simple check on current symbol and section won't do: the cycle may close at depth N.
e.g.

[a]
%c%

[c]
%d%

[d]
%a%


Offline maverick

  • Tireless poster
  • ****
    • Posts: 1052
  • Computer Solutions
    • View Profile

I'm happy you were able to reproduce the problem and know what causes it.  I hope you are able to find a solution.
maverick


Offline maverick

  • Tireless poster
  • ****
    • Posts: 1052
  • Computer Solutions
    • View Profile

As I mentioned before, this problem started with 2.3 beta 146.  This problem did not existed with earlier betas.

Don't know if you tried it or not, but load beta 145 and the files I attached above and you will see that there is no problem with %item-archive% inside the [item-archive].  The looping problem was introduced in beta 146.
maverick


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
thank you for reporting, but the bug is actually introduced because of a new power of the template engine: being able to recur on symbols at any level with no overhead.
before it was at 2 (or 3?) levels and with big overhead.

consider using {{comment}} for your comments if you don't want them to reach the user.


Offline Unknown8063

  • Occasional poster
  • *
    • Posts: 96
    • View Profile
ok, it was quite "easy" :)

it's the %item-archive% inside the [item-archive], that is infinite recursion.
i will try to put a solution to this, but it's not obvious, because a simple check on current symbol and section won't do: the cycle may close at depth N.
e.g.

[a]
%c%

[c]
%d%

[d]
%a%

I don't know what your capabilities are inside Delphi, but in PHP I'd push each symbol I expand onto a stack and pop it when I'm done.  Then it is simply a matter of scanning the stack to see if you are already inside an expansion of that symbol.


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
i search symbols, and as i find one, i "expand" it and recur on the expanded text

i'm now inserting some tests that will prevent infinite recursion.
it is just to not crash in case of user's error.


Offline Foggy

  • Tireless poster
  • ****
    • Posts: 806
    • View Profile
if an infinite loop is detected I think it would be a good idea to have hfs create a message box to alert the error.


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
at the moment the loop is suddenly stopped and the symbol/macro is not expanded.

since with macros not every infinite loop can be detected, i put a hard limit of 50.