Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault if cty.dat cannot be found/loaded #5

Open
jpronans opened this issue Apr 11, 2015 · 4 comments
Open

Segfault if cty.dat cannot be found/loaded #5

jpronans opened this issue Apr 11, 2015 · 4 comments
Assignees
Labels

Comments

@jpronans
Copy link

Program received signal SIGSEGV, Segmentation fault.
lookupcountry_by_callsign (callsign=) at text.c:1035
1035 dxcc_data *d = g_ptr_array_index(dxcc, lookup.country);

@jpronans jpronans changed the title Segfault if cty.dat cannto be found. Segfault if cty.dat cannot be found/loaded Apr 11, 2015
@N0NB
Copy link
Owner

N0NB commented May 10, 2015

Hi John.

I'll look into this. How did all copies of cty.dat get removed? There should be at least a fallback copy installed by 'make install' and if a copy is found in ~/.xdx then it will be used.

I agree that a segfault is a poor way to handle this so the program should exit gracefully.

73, Nate

@jpronans
Copy link
Author

I don't remember, but I believe I hadn't done a 'make install', and ran it in its main directory... I know it isn't a biggie, just thought you should know. Tbh, I had meant to get back to you with a patch, but completely forgot about it until now.

@N0NB
Copy link
Owner

N0NB commented May 10, 2015

  • On 2015 10 May 09:32 -0500, John Ronan wrote:

    I don't remember, but I believe I hadn't done a 'make install', and
    ran it in its main directory... I know it isn't a biggie, just thought
    you should know. Tbh, I had meant to get back to you with a patch,
    but completely forgot about it until now.

Thanks, John.

That will be helpful in replicating the issue and chasing it down.

73, Nate

"The optimist proclaims that we live in the best of all
possible worlds. The pessimist fears this is true."

Ham radio, Linux, bikes, and more: http://www.n0nb.us

@N0NB
Copy link
Owner

N0NB commented May 10, 2015

I just tried running it from the src directory with no cty.dat in the installation directory or in ~/.xdx and finally saw the segmentation fault (likely due to the filters I have set on the DX Cluster I use) as follows:

 $ ./xdx 

** (xdx:22916): WARNING **: Error loading icon: Failed to open file '/usr/local/share/xdx/pixmaps/xdx.png': No such file or directory
No such file or directory: /home/nate/.xdx/cty.dat
Cannot read cty.dat in /usr/local/share/xdx/cty.dat

(xdx:22916): GLib-CRITICAL **: g_hash_table_lookup: assertion 'hash_table != NULL' failed

(xdx:22916): GLib-CRITICAL **: g_hash_table_lookup: assertion 'hash_table != NULL' failed

(xdx:22916): GLib-CRITICAL **: g_hash_table_lookup: assertion 'hash_table != NULL' failed

(xdx:22916): GLib-CRITICAL **: g_hash_table_lookup: assertion 'hash_table != NULL' failed

(xdx:22916): GLib-CRITICAL **: g_hash_table_lookup: assertion 'hash_table != NULL' failed

(xdx:22916): GLib-CRITICAL **: g_hash_table_lookup: assertion 'hash_table != NULL' failed
Segmentation fault

This is from a fresh build of the master branch (there is no difference right now between master and the xdx-2.5.0 branch except for the version string in configure.ac which shows up in the About dialog).

I will probably release 2.5 before this gets fixed. At least I'm aware of it and it should be a rare issue.

73, Nate

@N0NB N0NB self-assigned this May 10, 2015
@N0NB N0NB added the bug label May 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants