DaleFarnsworth / codeplug

Obsolete. Code for reading, modifying, and writing codeplug files for the MD-380 DMR radio - Obsolete. Further development will be tracked in github.com/DaleFarnsworth-DMR
https://www.farnsworth.org/dale/codeplug
49 stars 10 forks source link

Crash on json import #1

Closed aknrdureegaesr closed 6 years ago

aknrdureegaesr commented 6 years ago

I'm running editcp version 0.10.7

I have a codeplug json export. It is working, that is, I can import it into editcp.

I changed the "Model": "MD380" to "Model": "MD390" (as that is the rig I own).

Expectation: I can still import it into editcp. Or else, if more changes are needed, I get a decent error message telling me about any problems the code plug might have.

Actually seen: The edited codeplug breaks editcp, it crashes on the attempt to read it:

$ editcp

(editcp:27462): Gtk-WARNING **: Invalid input string

(editcp:27462): Gtk-WARNING **: Invalid input string
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.
2017/12/30 12:46:37 runtime error: invalid memory address or nil pointer dereference

I attach the two JSON files, in the ZIP archive editcp-bug.zip.

Regards, and thank you for providing eminently useful software

Andreas, DJ3EI

DaleFarnsworth commented 6 years ago

Thank you Andreas for the bug report. It turns out that the bug has nothing to do with the value of the Model field. The bug occurs pseudo-randomly any time we import a json file that has a broadcast contact (where the Call Type is set to All). It happened for me sometimes for both the broken.rdt file and the works.json files. I have fixed it in v0.10.8, commit 57bde3a2bb9e9c798b7785ec47d0e971cfee8c54.