[jitsi-dev] ArrayOutOfBoundsException when writing history entry - new entry for msgSubTyp (sms)


#1

Hi,

At the moment when I am receiving messages that then get recorded in the
message history log, I get an error for every message received event.
I traced it back to having something to do with the recent changes in
the property names (struct): msgSubTyp was introduced. I have tried
deleting the '.jitsi' directory, but a new history file gets created and
the same issue re-occurs.

I am not sure how to fix this, so I'm posting it here. I could either
provide an additional value for this 'msgSubTyp', but I'm not sure
which. Or modify addRecord to only go as far as values are available (so
in effect ignoring msgSubTyp).

It would be cooler if it was just miraculously fixed, though :wink:

Kind regards,
Danny

MessageHistoryServiceImpl:

    static String[] STRUCTURE_NAMES
        = new String[] { "dir", "msg_CDATA", "msgTyp", "enc", "uid", "sub",
            "receivedTimestamp", "msgSubTyp" };

Stack trace:

02:03:59.719 INFO: [40]
impl.gui.utils.PluginContainer.addPluginComponent().117 Will add plugin
component:
net.java.sip.communicator.plugin.spellcheck.LanguageMenuBar[Spell
Checker
Toggle,0,0,0x0,invalid,layout=javax.swing.plaf.basic.DefaultMenuLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=16777600,maximumSize=java.awt.Dimension[width=30,height=28],minimumSize=java.awt.Dimension[width=30,height=28],preferredSize=java.awt.Dimension[width=30,height=28],margin=,paintBorder=true]
[ApiDaemon] ERROR com.ircclouds.irc.api.MessageDispatcherImpl -
java.lang.ArrayIndexOutOfBoundsException: 7
    at
net.java.sip.communicator.impl.history.HistoryWriterImpl.addRecord(HistoryWriterImpl.java:179)
    at
net.java.sip.communicator.impl.history.HistoryWriterImpl.addRecord(HistoryWriterImpl.java:79)
    at
net.java.sip.communicator.impl.msghistory.MessageHistoryServiceImpl.writeMessage(MessageHistoryServiceImpl.java:1434)
    at
net.java.sip.communicator.impl.msghistory.MessageHistoryServiceImpl.messageReceived(MessageHistoryServiceImpl.java:1267)
    at
net.java.sip.communicator.impl.protocol.irc.ChatRoomIrcImpl.fireMessageReceivedEvent(ChatRoomIrcImpl.java:899)
    at
net.java.sip.communicator.impl.protocol.irc.IrcStack$ChatRoomListener.onChannelMessage(IrcStack.java:1221)
    at
com.ircclouds.irc.api.MessageDispatcherImpl.dispatchVarious(MessageDispatcherImpl.java:100)
    at
com.ircclouds.irc.api.MessageDispatcherImpl.dispatchTo(MessageDispatcherImpl.java:62)
    at
com.ircclouds.irc.api.MessageDispatcherImpl.dispatch(MessageDispatcherImpl.java:28)
    at
com.ircclouds.irc.api.AbstractApiDaemon.run(AbstractApiDaemon.java:39)
02:03:59.864 SEVERE: [64]
impl.notification.PopupMessageNotificationHandlerImpl.popupMessage().70
Message is null or empty!
[ApiDaemon] ERROR com.ircclouds.irc.api.MessageDispatcherImpl -
java.lang.ArrayIndexOutOfBoundsException: 7
    at
net.java.sip.communicator.impl.history.HistoryWriterImpl.addRecord(HistoryWriterImpl.java:179)
    at
net.java.sip.communicator.impl.history.HistoryWriterImpl.addRecord(HistoryWriterImpl.java:79)
    at
net.java.sip.communicator.impl.msghistory.MessageHistoryServiceImpl.writeMessage(MessageHistoryServiceImpl.java:1434)
    at
net.java.sip.communicator.impl.msghistory.MessageHistoryServiceImpl.messageReceived(MessageHistoryServiceImpl.java:1267)
    at
net.java.sip.communicator.impl.protocol.irc.ChatRoomIrcImpl.fireMessageReceivedEvent(ChatRoomIrcImpl.java:899)
    at
net.java.sip.communicator.impl.protocol.irc.IrcStack$ChatRoomListener.onChannelMessage(IrcStack.java:1221)
    at
com.ircclouds.irc.api.MessageDispatcherImpl.dispatchVarious(MessageDispatcherImpl.java:100)
    at
com.ircclouds.irc.api.MessageDispatcherImpl.dispatchTo(MessageDispatcherImpl.java:62)
    at
com.ircclouds.irc.api.MessageDispatcherImpl.dispatch(MessageDispatcherImpl.java:28)
    at
com.ircclouds.irc.api.AbstractApiDaemon.run(AbstractApiDaemon.java:39)


#2

Hey,

Thanks for the report. It has been fixed and will be available in the
upcoming build which is baking right now.

Regards
damencho

···

On Sun, Mar 16, 2014 at 3:18 AM, Danny van Heumen <danny@dannyvanheumen.nl> wrote:

Hi,

At the moment when I am receiving messages that then get recorded in the
message history log, I get an error for every message received event.
I traced it back to having something to do with the recent changes in
the property names (struct): msgSubTyp was introduced. I have tried
deleting the '.jitsi' directory, but a new history file gets created and
the same issue re-occurs.

I am not sure how to fix this, so I'm posting it here. I could either
provide an additional value for this 'msgSubTyp', but I'm not sure
which. Or modify addRecord to only go as far as values are available (so
in effect ignoring msgSubTyp).

It would be cooler if it was just miraculously fixed, though :wink:

Kind regards,
Danny

MessageHistoryServiceImpl:

    static String[] STRUCTURE_NAMES
        = new String[] { "dir", "msg_CDATA", "msgTyp", "enc", "uid", "sub",
            "receivedTimestamp", "msgSubTyp" };

Stack trace:

02:03:59.719 INFO: [40]
impl.gui.utils.PluginContainer.addPluginComponent().117 Will add plugin
component:
net.java.sip.communicator.plugin.spellcheck.LanguageMenuBar[Spell
Checker
Toggle,0,0,0x0,invalid,layout=javax.swing.plaf.basic.DefaultMenuLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=16777600,maximumSize=java.awt.Dimension[width=30,height=28],minimumSize=java.awt.Dimension[width=30,height=28],preferredSize=java.awt.Dimension[width=30,height=28],margin=,paintBorder=true]
[ApiDaemon] ERROR com.ircclouds.irc.api.MessageDispatcherImpl -
java.lang.ArrayIndexOutOfBoundsException: 7
    at
net.java.sip.communicator.impl.history.HistoryWriterImpl.addRecord(HistoryWriterImpl.java:179)
    at
net.java.sip.communicator.impl.history.HistoryWriterImpl.addRecord(HistoryWriterImpl.java:79)
    at
net.java.sip.communicator.impl.msghistory.MessageHistoryServiceImpl.writeMessage(MessageHistoryServiceImpl.java:1434)
    at
net.java.sip.communicator.impl.msghistory.MessageHistoryServiceImpl.messageReceived(MessageHistoryServiceImpl.java:1267)
    at
net.java.sip.communicator.impl.protocol.irc.ChatRoomIrcImpl.fireMessageReceivedEvent(ChatRoomIrcImpl.java:899)
    at
net.java.sip.communicator.impl.protocol.irc.IrcStack$ChatRoomListener.onChannelMessage(IrcStack.java:1221)
    at
com.ircclouds.irc.api.MessageDispatcherImpl.dispatchVarious(MessageDispatcherImpl.java:100)
    at
com.ircclouds.irc.api.MessageDispatcherImpl.dispatchTo(MessageDispatcherImpl.java:62)
    at
com.ircclouds.irc.api.MessageDispatcherImpl.dispatch(MessageDispatcherImpl.java:28)
    at
com.ircclouds.irc.api.AbstractApiDaemon.run(AbstractApiDaemon.java:39)
02:03:59.864 SEVERE: [64]
impl.notification.PopupMessageNotificationHandlerImpl.popupMessage().70
Message is null or empty!
[ApiDaemon] ERROR com.ircclouds.irc.api.MessageDispatcherImpl -
java.lang.ArrayIndexOutOfBoundsException: 7
    at
net.java.sip.communicator.impl.history.HistoryWriterImpl.addRecord(HistoryWriterImpl.java:179)
    at
net.java.sip.communicator.impl.history.HistoryWriterImpl.addRecord(HistoryWriterImpl.java:79)
    at
net.java.sip.communicator.impl.msghistory.MessageHistoryServiceImpl.writeMessage(MessageHistoryServiceImpl.java:1434)
    at
net.java.sip.communicator.impl.msghistory.MessageHistoryServiceImpl.messageReceived(MessageHistoryServiceImpl.java:1267)
    at
net.java.sip.communicator.impl.protocol.irc.ChatRoomIrcImpl.fireMessageReceivedEvent(ChatRoomIrcImpl.java:899)
    at
net.java.sip.communicator.impl.protocol.irc.IrcStack$ChatRoomListener.onChannelMessage(IrcStack.java:1221)
    at
com.ircclouds.irc.api.MessageDispatcherImpl.dispatchVarious(MessageDispatcherImpl.java:100)
    at
com.ircclouds.irc.api.MessageDispatcherImpl.dispatchTo(MessageDispatcherImpl.java:62)
    at
com.ircclouds.irc.api.MessageDispatcherImpl.dispatch(MessageDispatcherImpl.java:28)
    at
com.ircclouds.irc.api.AbstractApiDaemon.run(AbstractApiDaemon.java:39)

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev