• Bug related to Bullseye bulletin board?

    From Digital Man@VERT to Karloch on Fri Oct 31 12:18:50 2008
    Re: Bug related to Bullseye bulletin board?ã By: Karloch to All on Sun Oct 26 2008 12:20 pmãã > I'm not sure if this is the right place to post about it, as I think thatã > Javascript code is correct, maybe it is a bug in the Javascriptã > interpreter.ã >ã > The problem is that since upgraded to lastest build Synchronet (3.15 Iã > think). Bullseye doesn't seem to be working rightly. Whatevet I select aã > bulletin to display it says "Invalid bulletin number". I switched theã > Bullseye program from the Baja one to the Javascript version, as Iã > understand js better and could take a look to the code (the problem wasã > still there, no matter the switch).ã >ã > It looks like the problem is related to the File.position property, atã > lines 41 and 42:ã >ã > mode=file.readln();ã > filepos=file.position;ã >ã > The former reads the first line of bullseye.cfg correctly, retrieving theã > number stored there, but them for some strange reason, the latter lineã > stores in filepos the number -4. Being file.position the offset in bytes ofã > the file and as the first line is just a character (4 bytes), it doesn'tã > make much sense to be "-4", it should be "4". From that point the programã > won't work correctly as it will never enter in the loop:ã >ã > file.position=filepos; // file.position=-4ã > i=0;ã > while((str=file.readln())!=null) {ã >ã > If I change the first line with this one:ã >ã > file.position=4;ã >ã > The Bullseye starts working again as it should. So I think that it could beã > something wrong in the file seeking functions.ã >ã > I don't know if this is a bug, but it's actually so weird.ããIt sounds like a bug, but I haven't been able to reproduce it here. What areãthe contents of your bullseye.cfg file?ããIf the first line is a single digit (e.g. 0), that should normally be 3ãcharacters (3<CR><LF>), not 4. Maybe you could e-mail me your bullseye.cfg fileãas an attachment and I'll see if I can reproduce it here.ãã digital man (xbox-live: digitlman)ããSnapple "Real Fact" #146:ãThe smallest county in America is New York County, better known as Manhattan. ãNorco, CA WX: 70.3øF, 62% humidity, 0 mph E wind, 0.00 inches rain/24hrsã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
  • From Digital Man@VERT to Karloch on Sun Nov 2 21:48:16 2008
    Re: Bug related to Bullseye bulletin board?ã By: Karloch to Digital Man on Sat Nov 01 2008 07:35 pmãã > Re: Bug related to Bullseye bulletin board?ã > By: Digital Man to Karloch on Fri Oct 31 2008 12:18:50ã >ã > > It sounds like a bug, but I haven't been able to reproduce it here. Whatã > > are the contents of your bullseye.cfg file?ã >ã > I emailed you my bullseye.cfg file. It's not different from the standardã > one.ããHm... What's the length of the file (in bytes)? I didn't receive the e-mail.ãã > > If the first line is a single digit (e.g. 0), that should normally be 3ã > > characters (3<CR><LF>), not 4. Maybe you could e-mail me yourã > > bullseye.cfg file as an attachment and I'll see if I can reproduce itã > > here.ã >ã > You're right, so the file.filepos should be 12 (3 characters * 4 bytes =ã > +12 bytes offset). Even so, it does not make any sense to be -4.ãã4 bytes per character? No, it's ASCII - one byte per character, so afterãreading 3<CR><LF>, the file position should be 3. Unless you converted it toãUTF-32?ãã digital man (xbox-live: digitlman)ããSnapple "Real Fact" #12:ãEmus and Kangaroos cannot walk backwards.ãNorco, CA WX: 59.3øF, 76% humidity, 0 mph ESE wind, 0.00 inches rain/24hrsã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
  • From Digital Man@VERT to Karloch on Tue Nov 4 15:07:25 2008
    Re: Bug related to Bullseye bulletin board?ã By: Karloch to Digital Man on Tue Nov 04 2008 12:12 amãã > Re: Bug related to Bullseye bulletin board?ã > By: Digital Man to Karloch on Sun Nov 02 2008 21:48:16ã >ã > > Hm... What's the length of the file (in bytes)? I didn't receive theã > > e-mail.ã >ã > I tried to email the file to you, but your mail server keeps rejecting myã > messaage (I was using your address at www.synchro.net).ã >ã > Anyway, I solved the mistery. It turned out to not be a bug, I'llã > explain...ã >ã > > 4 bytes per character? No, it's ASCII - one byte per character, so afterã > > reading 3<CR><LF>, the file position should be 3. Unless you convertedã > > it to UTF-32?ã >ã > You're absolutely right: it's 1 byte/char. I was afraid my text editorã > switched the format from ANSI to UTF-8, but that was not the case. Theã > <CR><LF> you put turned on my alarms.ã >ã > Last summer I migrated my BBS from Synchronet/Linux to Synchronet/Win32.ã > The process was smooth, but some things remain in Unix format. Theã > bullseye.cfg was ANSI Unix, using just <LF> as endline char, not theã > <CR><LF> from DOS. This was the thing confusing the program. As soon as Iã > converted the file to DOS format the bulletin started working again.ããAh, that makes sense. It was probably reading the entire file in that firstãfile.readln() call then.ãã > A question about Unix->Win32 migration, is it necessary to switch the pathã > backslash from "/" to "\" in every path specified at the SCFG utility? Whatã > about configuration files?ããNo, forward slash works fine on Win32.ãã digital man (xbox-live: digitlman)ããSnapple "Real Fact" #14:ãCamel's milk does not curdle.ãNorco, CA WX: 63.6øF, 65% humidity, 0 mph ENE wind, 0.00 inches rain/24hrsã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã