Closed GoogleCodeExporter closed 8 years ago
Thanks for the detailed bug report and crash logs. Sounds like you're doing
everything right and I assume that there is just a bug somewhere in
MobileTerminal given the stack trace. I have yet to test this program on a
real device, and only ever really run it on the Simulator so perhaps we're
hitting a difference between the two.
Notably, I recently fixed a bug on the simulator that was causing random
crashes like this http://code.google.com/p/mobileterminal/source/detail?r=476
so maybe it is similar.
Original comment by allen.po...@gmail.com
on 12 Jan 2011 at 5:28
I had a similar problem, build, copy to the device and screens of error
messages followed by a program exit. I'm using a 3G and iOS 4.2.1
In my case I tracked the problem down to the start_process function in
SubProcess.m returning -1 before being able to execve. start_process thought
that I didnt have permissions to execute /usr/bin/login even though I did.
For me a code change was required. The stat_hack function in SubProcess.m didnt
set any of the passed in stat structs members. The memcpy on line 31 appears to
have the parameters in the wrong order, I believe the intent is to copy the
contents of buf (which contains the result of the stat() function) into the
passed in stat structure. The memcpy on line 31 copies the contents of the
passed in stat instance (st) into buf, which isnt used. If you change line 31
to:
memcpy(st, buf, sizeof(struct stat));
Then everything worked for me. On my device, the unitialised value of the st
variables st_mode member is such that the permission check on line 47 always
evaluates to zero returning -1 from start_process, meaning the execve on line
51 never runs. Then I get a whole bunch of "you forked but didnt exec" errors.
Presumably the reason it worked on the emulator is related to the different
unitialised st_mode value, which in my case was always sufficient to allow the
permission check to succeed.
Original comment by Aaron.Cu...@gmail.com
on 13 Jan 2011 at 1:32
Thanks for debugging, ill make the code change.
Original comment by allen.po...@gmail.com
on 13 Jan 2011 at 3:41
This issue was closed by revision r492.
Original comment by allen.po...@gmail.com
on 13 Jan 2011 at 4:52
Original issue reported on code.google.com by
fredleason@gmail.com
on 11 Jan 2011 at 12:56