zward / Amua

An open source modeling framework
GNU General Public License v3.0
33 stars 11 forks source link

Some amua projects are not opening #39

Closed tuliosarmento closed 4 years ago

tuliosarmento commented 5 years ago

Some of the amua projects are not opening, especially those with a great amount of nodes. The console says "Error: null". The error log describes it:

Wed Aug 28 11:54:56 BRT 2019 javax.xml.bind.UnmarshalException

The simple ones open without problems.

zward commented 5 years ago

This looks like it's probably a UTF encoding issue. Are there special characters saved as part of the model? If you send me an example file I can test it (zward@hsph.harvard.edu)

tuliosarmento commented 5 years ago

Hi Zward. I've made some tests, the error was caused by special characters. I wonder if it's not possible the Amua give a warning when saving a document with special characters, just like when saving a project without the probabilities on a decision tree.

Thanks!

zward commented 5 years ago

Yes, that could be a possibility. Could you let me know which special characters specifically were causing problems? It would be good to document them at least in case others run into similar issues. Thanks

tuliosarmento commented 5 years ago

I guess it was: á, é, í, ó, ú; ã, õ; ç;

Those characters are very common in portuguese and other latin languages, so I guess this error may be common among the users.

EDIT: Probably those ones too: â, ê, î, ô, û; à è ì ò ù

glaubermm commented 5 years ago

Boa hein Tulio. Daqui a pouco vc vai ser chamado pra compor o time de suporte do Amua hehehe... Att. Glauber Maciel

On Wed, 4 Sep 2019 at 10:31, tuliosarmento notifications@github.com wrote:

I guess it was: á, é, í, ó, ú; ã, õ; ç;

Those characters are very common in portuguese and other latin languages, so I guess this error may be common among the users.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/zward/Amua/issues/39?email_source=notifications&email_token=AMCMEV237VUD6P7FCNSNLSLQH62B7A5CNFSM4IRL4COKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD53SI5I#issuecomment-527901813, or mute the thread https://github.com/notifications/unsubscribe-auth/AMCMEVYSR662UFKDQFBTEZDQH62B7ANCNFSM4IRL4COA .

zward commented 5 years ago

I've tested these characters and I don't have a problem saving and re-opening a simple model on my computer:

image

Can you give me some more information about the issue you were having? If you could send 1) the bottom of the error log (System properties) and 2) a copy of the file that won't open, those would help me test more. Thanks

tuliosarmento commented 5 years ago

Boa hein Tulio. Daqui a pouco vc vai ser chamado pra compor o time de suporte do Amua hehehe... Att. Glauber Maciel On Wed, 4 Sep 2019 at 10:31, tuliosarmento @.***> wrote: I guess it was: á, é, í, ó, ú; ã, õ; ç; Those characters are very common in portuguese and other latin languages, so I guess this error may be common among the users. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#39?email_source=notifications&email_token=AMCMEV237VUD6P7FCNSNLSLQH62B7A5CNFSM4IRL4COKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD53SI5I#issuecomment-527901813>, or mute the thread https://github.com/notifications/unsubscribe-auth/AMCMEVYSR662UFKDQFBTEZDQH62B7ANCNFSM4IRL4COA .

Estamos aqui na farmacovigilancia do amua hehe.

Abraços.

tuliosarmento commented 5 years ago

I've tested these characters and I don't have a problem saving and re-opening a simple model on my computer:

image

Can you give me some more information about the issue you were having? If you could send 1) the bottom of the error log (System properties) and 2) a copy of the file that won't open, those would help me test more. Thanks

System properties Java Runtime Environment version: 1.8.0_112 Java Runtime Environment vendor: Oracle Corporation Java vendor URL: http://java.oracle.com/ Java installation directory: C:\Program Files\Java\jre1.8.0_112 Java Virtual Machine specification version: 1.8 Java Virtual Machine specification vendor: Oracle Corporation Java Virtual Machine specification name: Java Virtual Machine Specification Java Virtual Machine implementation version: 25.112-b15 Java Virtual Machine implementation vendor: Oracle Corporation Java Virtual Machine implementation name: Java HotSpot(TM) 64-Bit Server VM Java Runtime Environment specification version: 1.8 Java Runtime Environment specification vendor: Oracle Corporation Java Runtime Environment specification name: Java Platform API Specification Java class format version number: 52.0 Java class path: C:\Users\Tulio\Desktop\Referencias\Amua_0.2.2.jar Default temp file path: C:\Users\Tulio\AppData\Local\Temp\ Name of JIT compiler to use: null Operating system name: Windows 8 Operating system architecture: amd64 Operating system version: 6.2 Heap - Used Memory: 6 MB Heap - Total Memory: 61 MB Heap - Max Memory: 887 MB Available Processors: 4

This file is an example of Amua projects that are not opening.

zward commented 5 years ago

Yes, it seems that the encoding of the file was changed to ANSI somehow. Was it edited in a text editor?

I think the easiest solution is to convert it back to UTF.

Let me know if you can open the file in Amua then. Then try saving and re-opening it in Amua to make sure that it is being encoded correctly. Thanks

tuliosarmento commented 5 years ago

It wasn't edited in any text editor. I've just saved the model and tried to open it on Amua.

Now I've converted the file to UTF-8 and it works.

This 'automatic' conversion to ANSI is awkward, once it happened to other people in other PCs ( e.g. @glaubermm).

Anyway, thanks for the support. Best wishes.

zward commented 5 years ago

Ok, glad that it works now.
I will see if I can add a check when opening files to automatically convert from ANSI to UTF-8 if necessary.

tuliosarmento commented 5 years ago

That would be great.

Thanks, Zach