Ofunniku / dwarftherapist

Automatically exported from code.google.com/p/dwarftherapist
Other
0 stars 0 forks source link

Latest source version fails under linux if log directory doesn't exist #344

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Steps to reproduce:
1. Compile the latest source release under linux
2. Run the program without creating the log directory beforehand
3. Program crashes

What is the expected output? What do you see instead?
Program briefly appears, but closes immediately. The console shows: 

Could not open logfile for writing! "No such file or directory" 
Application asked to unregister timer 0x1d000008 which is not registered in 
this thread. Fix application.
Application asked to unregister timer 0x1000008 which is not registered in this 
thread. Fix application.
Application asked to unregister timer 0x10000009 which is not registered in 
this thread. Fix application.
Application asked to unregister timer 0x18000014 which is not registered in 
this thread. Fix application.

What version of the product are you using? On what operating system?
Newest (as of july 6, 2011) source from the repository, on ubuntu 11.04

Please provide the "run.log" file in the "log" directory of DwarfTherapist
when this error occurred.
run.log doesn't exist, and neither does the log directory.

IMPORTANT: If the log directory exists, the program seems to work fine. Given 
my basic coding knowledge, this shouldn't be too hard to fix (*crosses fingers*)

Original issue reported on code.google.com by mbrig...@gmail.com on 7 Jul 2011 at 4:36

GoogleCodeExporter commented 9 years ago
I have this same error, and creating the log directory does not fix it, though 
it does get rid of the "Could not open logfile for writing!" error. The error 
log doesn't record any info about the crash, and I believe that the error is 
caused by this QT bug http://bugreports.qt.nokia.com/browse/QTBUG-16558.

Original comment by AronVie...@gmail.com on 11 Jul 2011 at 11:24

GoogleCodeExporter commented 9 years ago
If creating the directory doesn't fix it, then we might have different 
problems. My copy seems to work (mostly) fine after I made the directory.

Original comment by mbrig...@gmail.com on 11 Jul 2011 at 11:28

GoogleCodeExporter commented 9 years ago
Ok, I went ahead and downloaded the QT SDK so i could try building with the 
recommended tools, still get the same errors and the problem with the log 
folder. But when running the app from QT Creator I get this extra info. 

"DwarfTherapist exited with code 244"

Original comment by AronVie...@gmail.com on 12 Jul 2011 at 12:07

GoogleCodeExporter commented 9 years ago
Ok, I have now built it using the SDk and from the command line and run each 
successfully. They will only run if I use the command 
./bin/release/DwarfTherapist, if I run it from any other directory it errors 
out. Is that normal?

Original comment by AronVie...@gmail.com on 12 Jul 2011 at 12:32

GoogleCodeExporter commented 9 years ago
Wait, do you mean if you cd into the release directory, then run it, it doesn't 
work? That's not what's supposed to happen. Or do you mean that you can't just 
run "DwarfTherapist" in a terminal? If its the second, that's because DT 
doesn't get installed into your path variable, which isn't too hard to fix, and 
is normal behavior.

Original comment by mbrig...@gmail.com on 12 Jul 2011 at 1:34

GoogleCodeExporter commented 9 years ago
If I cd into the release directory and run it, it will error out.

Original comment by AronVie...@gmail.com on 12 Jul 2011 at 1:39

GoogleCodeExporter commented 9 years ago
That's weird. What happens if you copy it to the where you compiled it from 
(the folder above bin)? Also, maybe see if anything changes if you create the 
log directory in the release folder.

Original comment by mbrig...@gmail.com on 12 Jul 2011 at 1:58

GoogleCodeExporter commented 9 years ago
If I copy it to the 'top level' directory it will run from there only if I am 
in that directory. For example if I used ./~/DwarfTherapist/DwarfTherips it 
will error out. Creating the log directory only allowed the program to create 
the error log, not having a log directory wasn't stopping me from loading the 
program. I have been using it, and it seems to be running stable.

Original comment by AronVie...@gmail.com on 12 Jul 2011 at 2:30

GoogleCodeExporter commented 9 years ago
huh, seems like it prefers to be run from that top level directory. Maybe some 
libs or something that it doesn't know how to find. 

Original comment by mbrig...@gmail.com on 12 Jul 2011 at 2:41

GoogleCodeExporter commented 9 years ago
This patch makes the program write the log file to ~/.local/share/data/UDP 
Software/Dwarf Therapist/log instead of ./log/. The directory is created if it 
doesn't exist.
it is possible to remove the probbaly unneeded last /log/ component by removing 
the line "log_dir += QLatin1String("/log");".

Original comment by wrar42@gmail.com on 6 Aug 2011 at 4:01

Attachments:

GoogleCodeExporter commented 9 years ago
Therapist has been modified to create the log directory if it doesn't exist. 
Will look into alternate log locations in the future.

Original comment by ehler...@gmail.com on 6 Mar 2012 at 3:14