• Welcome to DictionaryForMids Forum.
 

Compiling

Started by TopDict, 27. September 2020, 22:56:11

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Gert

Strange! From the logging output everything seems to be normal. Until that memory error occurs.

Did you try to install any other dictionary on your device? Just any simple, small dictionary, to test if that has the same problem?

Besides, can you test your dictionary with the PC versoin (http://dictionarymid.sourceforge.net/pc.html)?

Best regards,
Gert

TopDict

#16
1. I tried loading from a memory card small dictionary DictionaryForMIDs_3.5.7_Elements. Indeed, it works without errors. See screenshots.
2. Then I created two small dictionaries containing Russian characters (English-Russian and Russian-Russian). Here they are:
actinium   актиний
americium   америций
arsenic   мышьяк
hafnium   гафний
helium   гелий
sodium   натрий
titanium   титан

#DictionaryForMIDs property file
#Sun Oct 25 08:05:19 MSK 2020
indexFileMaxSize=150
infoText=Test
language1IndexNumberOfSourceEntries=7
indexCharEncoding=UTF-8
dictionaryFileSeparationCharacter='\t'
dictionaryGenerationSeparatorCharacter='\t'
language1FilePostfix=ENG
dictionaryCharEncoding=UTF-8
dictionaryGenerationOmitParFromIndex=false
numberOfAvailableLanguages=2
language1IsSearchable=true
language2GenerateIndex=false
dictionaryFileMaxSize=654
language2FilePostfix=RUS
dictionaryAbbreviation=ENG
searchListFileMaxSize=31
language2IsSearchable=false
language1HasSeparateDictionaryFile=false
searchListCharEncoding=UTF-8
searchListFileSeparationCharacter='\t'
language1DisplayText=ENG
indexFileSeparationCharacter='\t'
language2HasSeparateDictionaryFile=false
dictionaryGenerationInputCharEncoding=UTF-8
language2DisplayText=RUS
language1GenerateIndex=true

актиний   Радиоактивный элемент группы актинидов, представляющий собой продукт разложения урана.
америций   Радиоактивный металл из группы трансурановых актиноидов.
мышьяк   Ядовитый металл группы металлоидов.
гафний   Тяжёлый тугоплавкий серебристо-белый ковкий металл.
гелий   Инертный газ.
натрий   Легкоплавкий щелочной металл.
титан   Твердый, ковкий металл.

And again there was an error. See screenshots.
3. In Emulator on PC all dictionaries (both large and small) work without errors.

Gert

Thats excellent information in order to try to narrow down the problem!!

I just read the source code again. Do you know some Java?

The last successful log message is from CsvFileCache.java:
Util.getUtil().logTime("position file", startTime);


In DefaultFileStorageReader.java the following line is not reached:
Util.getUtil().logTime("read/parse file-line", startTime);


In between there is some simple code that reads character per character from the InputStream that belongs to directory1.csv.

Very strange!

Can you post the file directory1.csv? The English-Russian from your step 2.

Best regards,
Gert

TopDict

I am not a programmer  :'(.

Gert

Thanks!

I checked that file with a hex editor and it is perfectly ok!

Hmmmm, I don`t know what exactly is going wrong there with your device. The error occurs when the translation for "helium" is read from directory1.csv.

Probably asking Samsung for a bug fix on the E740 will not be successful  :-\

Does any of these dictionaries work on your device? Or do these also show OutOfMemoryError?
http://dictionarymid.sourceforge.net/dictionaries/dictsOtherBilinguals.html#Russian

With best regards,
Gert

TopDict

 I tried the Muller English-Russian dictionary. Unfortunately, the OutOfMemoryError also appears.

Gert

Well, you provided excellent information!

From all that information I'd guess that there is a bug in the Java runtime implementation of your Samsung E740.

I really like those old JavaME devices! But ... maybe you have a chance to change to another model?

With best regards,
Gert


TopDict

Thank you for your responsiveness and time spent!
Tomorrow I'll go outside and throw my device in the trash!
I wonder why my phone doesn't want to read the dictionary folder directly (file:///tflash/dictionary), but only through the jar archive.
When I choose a path file:///tflash/DfM_Test_EngRus_3.5.9/DfM_Test_EngRus_3.5.9.jar it works great (see screenshots).
I have one last question, if you'll excuse me:
in the file de.kugihan.dictionaryformids.hmi_java_me.lcdui_extension.stringcolouritem.java there are the following lines:
int keySelectForward = 51; //3 key- move selection back
int keySelectBack = 49; // 1 key - move selection forward
These keys do not work in the emulator.
Did I understand correctly that this function is not fully implemented?

Gert

QuoteWhen I choose a path file:///tflash/DfM_Test_EngRus_3.5.9/DfM_Test_EngRus_3.5.9.jar it works great (see screenshots).

So it does work on your cell phone??

QuoteI wonder why my phone doesn't want to read the dictionary folder directly (file:///tflash/dictionary), but only through the jar archive.

Does file:///tflash work (omit dictionary)?


Quotein the file de.kugihan.dictionaryformids.hmi_java_me.lcdui_extension.stringcolouritem.java there are the following lines:
int keySelectForward = 51; //3 key- move selection back
int keySelectBack = 49; // 1 key - move selection forward
These keys do not work in the emulator.
Did I understand correctly that this function is not fully implemented?

The implementation of class StringColourItem has always been a 'challenge'. See also https://dictionarymid.stefan1200.de/forum/index.php?topic=421.0

What emulator are you using?

Best regards,
Gert