• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item3573: Fatal Error Creating Wiki Group (Windows 2003)

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine   Urgent Closed   patch 4.1.2

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

Fix: Apply this patch:

--- twiki/branches/Patch04x01/lib/TWiki/Store/RcsFile.pm   2007-02-13 11:42:36 UTC (rev 12854)
+++ twiki/branches/Patch04x01/lib/TWiki/Store/RcsFile.pm   2007-02-13 11:43:06 UTC (rev 12855)
@@ -358,7 +358,7 @@
             TOKEN => $searchString,
             FILES => \@set);
         foreach my $match ( split( /\r?\n/, $matches )) {
-            if( $match =~ m/([^\/]*)\.txt(:(.*))?$/ ) {
+            if( $match =~ m/([^\/\\]*)\.txt(:(.*))?$/ ) {
                 push( @{$seen->{$1}}, $3 );
             }
         }

See TWiki:Codev.HowToApplyPatch


I tried to create a wiki group and got this:

| 05 Feb 2007 - 15:13 | Can't use an undefined value as an ARRAY reference at c:/twiki/lib/TWiki.pm line 3616.
 at c:/twiki/lib/TWiki.pm line 3616
   TWiki::_GROUPS('TWiki=HASH(0x216d18)', 'TWiki::Attrs=HASH(0x2263b7c)', 'TWikiGroups', 'Main') called at c:/twiki/lib/TWiki.pm line 2395
   TWiki::_expandTagOnTopicRendering('TWiki=HASH(0x216d18)', 'GROUPS', 'undef', 'TWikiGroups', 'Main') called at c:/twiki/lib/TWiki.pm line 2314
   TWiki::_processTags('TWiki=HASH(0x216d18)', '---+ TWiki Groups\x{a}\x{a}These groups can be used to define fine gr...', 'CODE(0x1dbdc50)', 16, 'TWikiGroups', 'Main') called at c:/twiki/lib/TWiki.pm line 2240
   TWiki::_expandAllTags('TWiki=HASH(0x216d18)', 'SCALAR(0x21a2a28)', 'TWikiGroups', 'Main') called at c:/twiki/lib/TWiki.pm line 2589
   TWiki::handleCommonTags('TWiki=HASH(0x216d18)', '---+ TWiki Groups\x{a}\x{a}These groups can be used to define fine gr...', 'Main', 'TWikiGroups') called at c:/twiki/lib/TWiki/UI/View.pm line 375
   TWiki::UI::View::_prepare('---+ TWiki Groups\x{a}\x{a}These groups can be used to define fine gr...', 'TWiki=HASH(0x216d18)', 'Main', 'TWikiGroups', 'TWiki::Meta=HASH(0x215c620)', 0) called at c:/twiki/lib/TWiki/UI/View.pm line 359
   TWiki::UI::View::view('TWiki=HASH(0x216d18)') called at c:/twiki/lib/TWiki/UI.pm line 157
   TWiki::UI::__ANON__() called at c:/twiki/lib/CPAN/lib//Error.pm line 379
   eval {...} called at c:/twiki/lib/CPAN/lib//Error.pm line 371
   Error::subs::try('CODE(0x215fc8)', 'HASH(0x21865fc)') called at c:/twiki/lib/TWiki/UI.pm line 197
   TWiki::UI::run('CODE(0x1542b7c)', 'view', 1) called

The original history of the problem is stated at TWiki:Support/FatalErrorCreatingWikiGroup

-- TWiki:Main/MarcioMarchini - 06 Feb 2007

I do not get this error in my Linux boxes.

-- TWiki:Main.KennethLavrsen - 06 Feb 2007

What auth method are you using? Standard TWiki auth? Do you have an alternate user mapping module installed? If not, are there any topics named '*Group' (e.g. TWikiAdminGroup) in the Main web?

CC

I am using the Apache authentication method.

$TWiki::cfg{LoginManager} = 'TWiki::Client::ApacheLogin';
$TWiki::cfg{Htpasswd}{Encoding} = 'sha1';
$TWiki::cfg{PasswordManager} = 'TWiki::Users::HtPasswdUser';

No alternate user mapping module AFAIK. When I registered users, they got put into .htpasswd in C:\twiki\data

Files with "Group":

 Directory of C:\twiki\data\Main

05/02/2007  01:18 AM               483 NobodyGroup.txt
05/02/2007  01:18 AM             1,853 NobodyGroup.txt,v
05/02/2007  05:06 PM             1,573 TWikiAdminGroup.txt
05/02/2007  05:06 PM             6,785 TWikiAdminGroup.txt,v
05/02/2007  01:18 AM             1,583 TWikiGroups.txt
05/02/2007  01:18 AM             7,174 TWikiGroups.txt,v
05/02/2007  01:18 AM               427 TWikiGroupTemplate.txt
05/02/2007  01:18 AM             1,719 TWikiGroupTemplate.txt,v

-- TWiki:Main.MarcioMarchini - 06 Feb 2007

Do you still get the problem if you change the encoding method to crypt?

I'm afraid I don't have 4.1.1 installed on Windows, so this could do with some analysis from a developer who does.

-- TWiki:Main.CrawfordCurrie - 08 Feb 2007

sha1 is the one to use on Windows. See the configure script and it will say:

crypt is the default, and should be used on Linux/Unix. sha1 is recommended for use on Windows.

I don't think it is an authentication issue, as the login etc is all working fine. I can see and edit other pages fine.

-- TWiki:Main.MarcioMarchini - 08 Feb 2007

I am experiencing same problem. Specifically, when trying to use the

%GROUPS%
variable, either in my own pages or on "system" pages such as TWikiGroups. I've posted details at TWiki:Support.ErrorWhenLoadingGROUPSVariable. -- TWiki:Main.BillLay - 11 Feb 2007

-- TWiki:Main.BillLay - 12 Feb 2007

Don't Twiki builds have automated tests for the different platforms? This bug would have been caught automatically by such a test. There are different tools for this - Selenium, HttpUnit etc. Hopefully when a bug is fixed a regression test is added? I hope to see this one nailed soon. Thanks.

-- TWiki:Main.MarcioMarchini - 12 Feb 2007

Indeed they do. However the release team doesn't have the manpower, or access to the platforms, to run all regressions. And not all developers add regressions when they fix a problem, unfortunately. And in the case of this problem, it appears that no developer has access to a platform where they can reproduce the problem, unfortunately (I have been unable to reproduce it myself)

-- TWiki:Main.CrawfordCurrie - 12 Feb 2007

One of the reporters: Please post the Apache error log.

-- TWiki:Main.PeterThoeny - 12 Feb 2007

tail of C:\Program Files\Apache Group\Apache2\logs\error.log:

[Mon Feb 12 18:05:21 2007] [error] [client 127.0.0.1] Can't use an undefined value as an ARRAY reference at c:/twiki/lib/TWiki.pm line 3616., referer: http://localhost/twiki/bin/view.pl/Main/TWikiGroupTemplate
[Mon Feb 12 18:05:21 2007] [error] [client 127.0.0.1]  at c:/twiki/lib/TWiki.pm line 3616, referer: http://localhost/twiki/bin/view.pl/Main/TWikiGroupTemplate
[Mon Feb 12 18:05:21 2007] [error] [client 127.0.0.1] \tTWiki::_GROUPS('TWiki=HASH(0x216dd8)', 'TWiki::Attrs=HASH(0x226235c)', 'TWikiGroups', 'Main') called at c:/twiki/lib/TWiki.pm line 2395, referer: http://localhost/twiki/bin/view.pl/Main/TWikiGroupTemplate
[Mon Feb 12 18:05:21 2007] [error] [client 127.0.0.1] \tTWiki::_expandTagOnTopicRendering('TWiki=HASH(0x216dd8)', 'GROUPS', 'undef', 'TWikiGroups', 'Main') called at c:/twiki/lib/TWiki.pm line 2314, referer: http://localhost/twiki/bin/view.pl/Main/TWikiGroupTemplate
[Mon Feb 12 18:05:21 2007] [error] [client 127.0.0.1] \tTWiki::_processTags('TWiki=HASH(0x216dd8)', '---+ TWiki Groups\\x{a}\\x{a}These groups can be used to define fine gr...', 'CODE(0x1dbdc50)', 16, 'TWikiGroups', 'Main') called at c:/twiki/lib/TWiki.pm line 2240, referer: http://localhost/twiki/bin/view.pl/Main/TWikiGroupTemplate
[Mon Feb 12 18:05:21 2007] [error] [client 127.0.0.1] \tTWiki::_expandAllTags('TWiki=HASH(0x216dd8)', 'SCALAR(0x21b3140)', 'TWikiGroups', 'Main') called at c:/twiki/lib/TWiki.pm line 2589, referer: http://localhost/twiki/bin/view.pl/Main/TWikiGroupTemplate
[Mon Feb 12 18:05:21 2007] [error] [client 127.0.0.1] \tTWiki::handleCommonTags('TWiki=HASH(0x216dd8)', '---+ TWiki Groups\\x{a}\\x{a}These groups can be used to define fine gr...', 'Main', 'TWikiGroups') called at c:/twiki/lib/TWiki/UI/View.pm line 375, referer: http://localhost/twiki/bin/view.pl/Main/TWikiGroupTemplate
[Mon Feb 12 18:05:21 2007] [error] [client 127.0.0.1] \tTWiki::UI::View::_prepare('---+ TWiki Groups\\x{a}\\x{a}These groups can be used to define fine gr...', 'TWiki=HASH(0x216dd8)', 'Main', 'TWikiGroups', 'TWiki::Meta=HASH(0x2172954)', 0) called at c:/twiki/lib/TWiki/UI/View.pm line 359, referer: http://localhost/twiki/bin/view.pl/Main/TWikiGroupTemplate
[Mon Feb 12 18:05:21 2007] [error] [client 127.0.0.1] \tTWiki::UI::View::view('TWiki=HASH(0x216dd8)') called at c:/twiki/lib/TWiki/UI.pm line 157, referer: http://localhost/twiki/bin/view.pl/Main/TWikiGroupTemplate
[Mon Feb 12 18:05:21 2007] [error] [client 127.0.0.1] \tTWiki::UI::__ANON__() called at c:/twiki/lib/CPAN/lib//Error.pm line 379, referer: http://localhost/twiki/bin/view.pl/Main/TWikiGroupTemplate
[Mon Feb 12 18:05:21 2007] [error] [client 127.0.0.1] \teval {...} called at c:/twiki/lib/CPAN/lib//Error.pm line 371, referer: http://localhost/twiki/bin/view.pl/Main/TWikiGroupTemplate
[Mon Feb 12 18:05:21 2007] [error] [client 127.0.0.1] \tError::subs::try('CODE(0x216088)', 'HASH(0x219f560)') called at c:/twiki/lib/TWiki/UI.pm line 197, referer: http://localhost/twiki/bin/view.pl/Main/TWikiGroupTemplate
[Mon Feb 12 18:05:22 2007] [error] [client 127.0.0.1] \tTWiki::UI::run('CODE(0x1542cd4)', 'view', 1) called, referer: http://localhost/twiki/bin/view.pl/Main/TWikiGroupTemplate

-- TWiki:Main.MarcioMarchini - 12 Feb 2007

Sorry that you are having such a problem finding anyone to support you with this problem; it appears that I am the only developer with a Windows platform who is prepared to help you frown

FYI I have at last been able to reproduce the problem on my Windows box. I can assure you that the issue is resolved in the code currently in the subversion repository, but I don't think the release manager wants to use that code in the next patch (it is part of a much larger suite of changes).

CC

So is there a small safe fix for 4.1.2?

-- TWiki:Main.KennethLavrsen - 13 Feb 2007

Dunno yet

-- TWiki:Main.CrawfordCurrie - 13 Feb 2007

Turns out it is due to a broken search. I didn't see the problem because I was using mod_perl and had grep-based search turned off on Windows.

On line 361 of lib/TWiki/Store/RcsFile.pm, you will find the following statement:

            if( $match =~ m/([^\/]*)\.txt(:(.*))?$/ ) {
change it to
            if( $match =~ m/([^\/\\]*)\.txt(:(.*))?$/ ) {
Thanks to everyone who helped in nailing this down, it was truly obscure.

Note that this same fix should also cure other reported bugs where search is returning windows pathnames Item3622.

CC

This fix works for both bugs I experienced. Thank you Crawford for the very prompt response!!

-- TWiki:Main.BillLay - 13 Feb 2007

Thanks for fixing this quickly, Crawford. Out of curiosity, how could this bug slip into 4.1? Any suggestions how to improve code refactor work to reduce the chance of introducing new bugs?

-- TWiki:Main.PeterThoeny - 13 Feb 2007

The bug was in 4.0.0. But it only manifests itself when TWiki is used with a grep that returns backslashes in pathnames. Cygwin grep doesn't. I guess nobody noticed, or they simply didn't bother reporting it.

As for protecting refactoring; the only sensible approach is to use unit testcases that are run on all target platforms, and that requires access to the platforms, and a tinderbox strategy, or a release team that is able and willing to run the tests. Note that the existing testcases detect this error if they are run on Windows with GnuWin32 grep.

-- TWiki:Main.CrawfordCurrie - 13 Feb 2007

The one-line patch worked for me too. Thanks.

-- TWiki:Main.MarcioMarchini - 14 Feb 2007

Closed with release of 4.1.2

KJL

TWiki:Support/ErrorWhenLoadingGROUPSVariable suggests a different cause: Changing {SuperAdminGroup} apparently causes this issue.

-- TWiki:Main.PeterThoeny - 15 Apr 2007

ItemTemplate
Summary Fatal Error Creating Wiki Group (Windows 2003)
ReportedBy TWiki:Main.MarcioMarchini
Codebase 4.1.1
SVN Range TWiki-4.1.1, Sun, 04 Feb 2007, build 12769
AppliesTo Engine
Component

Priority Urgent
CurrentState Closed
WaitingFor

Checkins 12854 12855
TargetRelease patch
ReleasedIn 4.1.2
Edit | Attach | Watch | Print version | History: r26 < r25 < r24 < r23 < r22 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r26 - 2007-04-15 - PeterThoeny
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback