Section One BBS

Welcome, Guest.


Subject: Posting a message with messagebase open Date: Wed Jul 15 2015 03:16 pm
From: Psi-Jack To: Nightfox

  Re: Posting a message with messagebase open
  By: Nightfox to Digital Man on Wed Jul 15 2015 07:29 am

 DM>> The message base allocation method shouldn't make any difference
 DM>> with the problem you're describing.

 DM>> Since no one else is reporting the problem you're seeing, I suggest
 DM>> trying to "undo" some of your mods. Or just as a test, don't use of
 DM>> the 3rd party mods (e.g. message reader) you might be using.

 Ni> I've actually seen what I think he is describing. It seems to happen when
 Ni> I reply to a message using my reader. It happens rarely and randomly, so
 Ni> it's difficult to reproduce. I've noticed it in Windows (I think Psi-Jack
 Ni> is running Synchronet in Linux?).

 Ni> The other day I made a small JavaScript script that opens a sub-board with
 Ni> a MessageBase object, lets a user post a message while that MessageBase
 Ni> object is open, then closes the MessageBase object. I was trying to
 Ni> reproduce the issue in Linux where if a JS script has a MessageBase open
 Ni> and lets the user post a message in that sub-board, the MessageBase wasn't
 Ni> getting updated as far as the number of messages. I ran that small script
 Ni> on my Linux test setup, and while that script didn't reproduce that issue,
 Ni> I did see it crash Synchronet multiple times after I had saved my message.
 Ni> I tried it in my Windows Synchronet setup, and I didn't see it causing a
 Ni> crash there. This is the code (substitute the value of the subCode
 Ni> variable with a valid sub-board code on your BBS): 

 Ni> load("sbbsdefs.js");

 Ni> subCode = "loc_general";
 Ni> var msgbase = new MsgBase(subCode);
 Ni> if (msgbase.open())
 Ni> {
 Ni> console.print("\1n\r\n# of messages (before posting): " +
 Ni> msgbase.total_msgs 
 Ni> + "\r\n\1p");
 Ni> var msgHdr = msgbase.get_msg_header(true, msgbase.total_msgs-1, true);
 Ni> if (msgHdr != null)
 Ni> {
 Ni> bbs.post_msg(subCode, WM_NONE, msgHdr);
 Ni> console.print("\1n\r\n# of messages (after posting): " +
 Ni> msgbase.total_msgs 
 Ni> + "\r\n\1p");
 Ni> }
 Ni> msgbase.close();
 Ni> }

nice! I will take this code and test to see if I can get it to re-produce it at
a faster rate, like setting it up in a loop. :D

I can just create a local test board only I have access to and see what the
results end up being. 

)))[Psi-Jack -//- Decker]

---
 ■ Synchronet ■ Decker's Heaven -//- bbs.deckersheaven.com

Previous Message       Next Message