2013/2/26 Jacob Nordfalk <[email protected]>: > > > 2013/2/26 Mikel Artetxe <[email protected]> >> >> On Mon, Feb 25, 2013 at 8:45 PM, Ilnar Salimzyan >> <[email protected]> wrote: >>> >>> >>> rm -rf ~/.java/.userPrefs/apertium* didn't solve all the problems. It >>> allowed me to start the Apertium-viewer, >> >> >> Perhaps we should make apertium-viewer remove the user preferences (or at >> least the relevant part of it) when it crashes? > > > The right thing would be to solve the crashing issues :-) > For this the developers (mikel and I) needs to be able to reproduce the > crashes, which we probably can do now. > We might also need a copy of what is ~/.java/.userPrefs/apertium* so we can > find the offending parts.
Attached you can find the /.userPrefs folder after completing the steps to reproduce the crash described in my previous mail. Maybe it crashes only because some error/feature in the mode file? I attached it too. > > >> >>> >>> Lttoolbox-java refused to work with Kazakh and crashed just after I >>> typed the first character. Steps to re-produce: >>> >>> * rm -rf ~/.java/.userPrefs/apertium* >>> * java -jar apertium-viewer.jar >>> * apertium-viewer starts with a "It seems this is first time you run >>> this program" window >>> * "No language pairs could be loaded" window (I don't have any pairs >>> installed) >>> * clear the text box (remove "Sample text") >>> * select kaz-tat.mode via File>Load mode >>> * type in e.g. this sentence: "Қайда бара жатырсың?" > > > The problem here would be that lttoolbox-java originally was designed as a > standalone application, which would, in case of illegal parameters or input, > would invoke System.exit(-1) to halt the program. > > This is obviously not a good idea to do this in a library, as illegal input > will crash the application using the library :-) > So, the right thing to do here is to evict all possibilites that > System.exit(-1) is invoked when lttoolbox-java is used as a library. > > A quick and dirty solution would be to set a global flags saying 'pls dont > crash, throw an exception instead'. A proper solution would be that ONLY > main() methods invokes System.exit(), and that the main() methods are NEVER > invoked when used as a library. > >>> >>> The only way I could crash it :) was typing in the "/" or "\" signs. >>> It crashes and gives the following output: >>> >>> java.lang.RuntimeException: Error: Illegal input stream char: / >>> at >>> org.apertium.lttoolbox.process.FSTProcessor.streamError(FSTProcessor.java:225) >>> at >>> org.apertium.lttoolbox.process.FSTProcessor.readAnalysis(FSTProcessor.java:298) >>> at >>> org.apertium.lttoolbox.process.FSTProcessor.analysis(FSTProcessor.java:886) >>> at org.apertium.lttoolbox.LTProc.doMain(LTProc.java:284) >>> at org.apertium.pipeline.Dispatcher.doLTProc(Dispatcher.java:297) >>> at org.apertium.pipeline.Dispatcher.dispatch(Dispatcher.java:381) >>> at apertiumview.Pipeline$PipelineTask.run(Pipeline.java:123) >>> at apertiumview.Pipeline$1.run(Pipeline.java:41) >> >> >> IIRC, apertium-viewer doesn't do the deformatting and reformatting steps >> (don't ask me why, but AFAIK it never did) > > > thats true. apertium-viewer is skipping these steps as the purpose is to be > a language developer tool, showing input and output of each if the internal > stage. It's not an end-user application like Apertium-caffeine. > > > -- > Jacob Nordfalk > javabog.dk > Androidudvikler og -underviser på DTU og Lund&Bendsen > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_feb > _______________________________________________ > Apertium-stuff mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/apertium-stuff >
.userPrefs.tar.bz2
Description: BZip2 compressed data
kaz-tat.mode
Description: Binary data
------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________ Apertium-stuff mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/apertium-stuff
