Ticket #27 (accepted bug)

Opened 4 years ago

Last modified 4 years ago

enthral segfaults if not run from a dir with configs?

Reported by: truck Owned by: mercyful
Priority: major Milestone: milestone:
Component: Scripts Version: Alpha
Keywords: Cc: enthrallerd@…

Description

Attempting to run enthrall as user 'bbs' from the user's homedir, which had no files, results in a segfault. (Same with root.)

bbs@bbs:~$ pwd
/home/bbs
bbs@bbs:~$ enthral 
Segmentation fault
bbs@bbs:~$ enthral  -h
Segmentation fault

Debian Lenny; fresh svn pull of source (June 7, 2009)

AHA! gdb shows:

Starting program: /usr/local/bin/enthral 
[Thread debugging using libthread_db enabled]

Error Creating: /usr/local/bin/ini/config.ini 

Program exited with code 01.

that would be bad, you don't want to make the config in /usr/local/bin (:

Change History

Changed 4 years ago by mercyful

  • owner changed from Mercyful to mercyful
  • status changed from new to assigned

Sorry, i should update the makefile to remove that install. Install doesn't need to be run, you can run the program in the main folder where it's compile, the source stree with config, data, ini and all of the other folders and data are already present there.

If you install to /usr/bin then the program will not know where the data and config files are.

There is an Enviroment Variable still in testing for this instance.

Set the ENTHRAL variable to point to your root data files directory.
ie:

ENTHRAL="/home/bbs/enthral/src/" # ie if your folder structure is located here, make sure to add trailing slash /.

I haven't tested the environment variable much so if it doesn't work let me know and i will get it working. Otherwise the quick fix is to run the program/executable in the folder where it compile and all will be well.

Changed 4 years ago by mercyful

  • status changed from assigned to accepted

Changed 4 years ago by mercyful

I will add some better ini ile checking to make sure no more segfaults happen without warnings of the causes.

Note: See TracTickets for help on using tickets.