Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

save & close doesn't work after add...

2010-03-11
2013-02-12
  • When I add new movies (recent examples: Up and New Moon), after I get the IMDB info, the save & close button in the add new movies dialog doesn't do anything any more. My workaround: open new movie dialog, just enter the movie title, then save & close. After that, open the edit movie dialog, get IMDB and file info, then save & close again. This is really strange behaviour…

    Btw: thanks for fixing the latest IMDB problems, it works fine again :-)

    Torsten

     
  • Bro
    Bro
    2010-03-11

    Hi

    I can't reproduce thit issue. Has it always been like this for you?
    The button isn't greyed out, but looks normal, but nothing simply happens?

    Are you using the default Look & Feel, or have you changed to another?

    What Operating System are you running? Which Java version do you have?
    You'll find OS and Java info in about tab.

    Can you take a look at the log file and paste the content here?

    Bro

     
  • I'm running Linux 64bit (OpenSuse 11.2, kernel 2.6.31), Movie Manager 2.9.1.2, Sun Java 6 Update 18.
    The save & close button is not greyed out, but when I click on it, nothing happens, the dialog does not close and save.
    Here is an excerpt from my log.txt (the whole file is 230 KB):

    java.sql.SQLException: Incorrect string value: '\xD0\x9E\xD0\xB1\xD0\xBB…' for column 'Aka' at row 1
            at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1072)
            at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3563)
            at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3495)
            at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959)
            at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2113)
            at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2693)
            at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2102)
            at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2395)
            at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2313)
            at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2298)
            at net.sf.xmm.moviemanager.database.DatabaseMySQL.addGeneralInfo(Unknown Source)
            at net.sf.xmm.moviemanager.models.ModelMovieInfo.saveToDatabase(Unknown Source)
            at net.sf.xmm.moviemanager.models.ModelMovieInfo.saveToDatabase(Unknown Source)
            at net.sf.xmm.moviemanager.gui.DialogMovieInfo.executeCommandSave(Unknown Source)
            at net.sf.xmm.moviemanager.gui.DialogMovieInfo.executeCommandSave(Unknown Source)
            at net.sf.xmm.moviemanager.gui.DialogMovieInfo$9.actionPerformed(Unknown Source)
            at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
            at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
            at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
            at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
            at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
            at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
            at java.awt.Component.processMouseEvent(Component.java:6263)
            at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
            at java.awt.Component.processEvent(Component.java:6028)
            at java.awt.Container.processEvent(Container.java:2041)
            at java.awt.Component.dispatchEventImpl(Component.java:4630)
            at java.awt.Container.dispatchEventImpl(Container.java:2099)
            at java.awt.Component.dispatchEvent(Component.java:4460)
            at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
            at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
            at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
            at java.awt.Container.dispatchEventImpl(Container.java:2085)
            at java.awt.Window.dispatchEventImpl(Window.java:2478)
            at java.awt.Component.dispatchEvent(Component.java:4460)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:178)
            at java.awt.Dialog$1.run(Dialog.java:1046)
            at java.awt.Dialog$3.run(Dialog.java:1098)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.awt.Dialog.show(Dialog.java:1096)
            at java.awt.Component.show(Component.java:1563)
            at java.awt.Component.setVisible(Component.java:1515)
            at java.awt.Window.setVisible(Window.java:842)
            at java.awt.Dialog.setVisible(Dialog.java:986)
            at net.sf.xmm.moviemanager.util.GUIUtil$1.run(Unknown Source)
            at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    DEBUG actionPerformed: MovieInfo - Save and Close
    ERROR net.sf.xmm.moviemanager.database.DatabaseMySQL.addGeneralInfo(Unknown Source)

    Thanks for the quick answer,

    Torsten

     
  • One thing I forgot: This issue first occurred with version 2.9 of the movie manager.
    If necessary, I can send the complete log files by email.

    Torsten

     
  • Bro
    Bro
    2010-03-11

    Hi

    Apparently the error occurs in the MySQL database. MySQL might actually behave differently depending on the host OS, but I'm not sure. I just tested by adding "Up" and "New Moon", on MySQL server on both Windows XP and Ubuntu host, and it worked without any errors.

    There have been no changes to the database lately, so I guess it would have to be the input string in the aka field that sometimes causes trouble for the database. What happens if you retrieve IMDb info, and clear the aka (Also known As) field before saving. Will there still be an error?

    Bro

     
  • When I either manually clear the AKA field or disable the "store all available aka titles" option in the preferences menu, the save & close button works fine again. As the aka titles are not absolutely crucial for me, this workaround is perfectly good enough for now. Thanks very much for your help,

    Torsten

     
  • Bro
    Bro
    2010-03-11

    The problem is that for some reason the MySQL database doesn't handle special characters, probably the russian Aka title. I'm not sure why your installations doesn't but mine does though…

    Bro

     
  • I just tried to selectively delete all the aka titles of "Up" (which really has a lot of translated titles…) one by one. The Russian aka title really seems to be the core of the problem. Once it is deleted, everything is back to normal. There are no problems with French accented characters or German umlaut (äöü) characters.
    It's funny though that it works fine in the "edit movie" dialog (even with the Russian aka included), but not in the "add new movie" dialog… ah well, I guess there are more important problems… :-)

    Thanks again,

    Torsten

     
  • felix.koehler
    felix.koehler
    2010-09-22

    Hi,

    This problem only can be reproduced with old MySQL MovieManager databases that use latin1 encoding (I had 9 instances in my database). What happens is, that Russian characters can't be encoded in latin1, which throws an error which stops the save and close action. Newer versions of MovieManager/MySQL? encode everything in utf8 (at least on my machine), so everything 'just works' out of the box.

    Here's a recipe for us legacy users ;-) to "transcode" an old MovieManager database from latin1 to utf8:

    mysqldump old_database > old_database.sql
    cp old_database.sql old_database.utf8.sql
    sed -i 's/CHARSET=latin1/CHARSET=utf8/g' old_database.utf8.sql
    mysql -p
    mysql> drop database old_database.utf8.sql;
    mysql> create database old_database.utf8.sql;
    mysql> use old_database.utf8.sql
    mysql> source old_database.utf8.sql;
    mysql> exit
    

    Hope this helps,
    have fun, Felix

     
  • felix.koehler
    felix.koehler
    2010-09-22

    sorry, copy paste errors, correction:

    mysqldump old_database > old_database.sql
    cp old_database.sql old_database.utf8.sql
    sed -i 's/CHARSET=latin1/CHARSET=utf8/g' old_database.utf8.sql
    mysql -p
    mysql> drop database old_database;
    mysql> create database old_database;
    mysql> use old_database
    mysql> source old_database;
    mysql> exit