![]() |
Wierd Crash
Hi, when I run this code program crash. In scratchbox is all ok but in real device no. File save.txt is saved in /home/usr/.app/
Code:
FILE *file = fopen("/home/usr/.app/save.txt","w"); Code:
FILE *file = fopen("save.txt","w"); |
Re: Wierd Crash
Are you sure its this line thats causing the trouble? Are you checking the returned pointer "file"? BTW, I think you are trying to write "/home/user...." whats the error message?
|
Re: Wierd Crash
I am sure. I dont know what return file because app crashed. Thx for your time.
|
Re: Wierd Crash
Quote:
Code:
#include <stdio.h> |
Re: Wierd Crash
fopen doesnt open this file and pointer is empty. I am sure that the file exists. Where is problem?
|
Re: Wierd Crash
Quote:
If you really have created a directory called /home/usr/.app (why would you do that?), then: a) sorry b) please don't release an app that writes to this crazy location c) paste the output of the command Code:
ls -l -R /home/usr/.app |
Re: Wierd Crash
-rw-r--r-- 1 root root 0 Feb 16 14:48 candidates.txt
-rw-r--r-- 1 root root 0 Feb 16 14:52 resources.rcc -rw-r--r-- 1 root root 0 Feb 16 14:54 save.txt |
Re: Wierd Crash
OK, 2 more questions:
1) are you running the app as 'root', or as 'user'? 2) can you also paste the output of the command Code:
ls -l -d /home/usr/.app |
Re: Wierd Crash
As user.
drwxr-xr-x 2 root root 4096 Mar 1 18:35 /home/usr/.app THX /home/user/.app is better? |
Re: Wierd Crash
Quote:
if you do Code:
chown -R user.user /home/usr/.app Quote:
|
All times are GMT. The time now is 21:05. |
vBulletin® Version 3.8.8