Discussion:
Error while exe from shell! Please Help!
(too old to reply)
pocahontas
2005-02-24 04:32:19 UTC
Permalink
I can run all the
exe files
successfully from
main individually.
However, when I use
shell.exe to load
other files (b.exe,
long.exe), the
program crashes with
the following error:

Exception 13
received, killing
thread 0x0000c000
eax=001d0028
ebx=0000c000
ecx=0000c000
edx=00003000
esi=00000090
edi=00006f67
ebp=0000dec4
eip=00015540
cs=00000008
eflags=00010002
Interrupt
number=13, error
code=40
index=5, TI=0,
IDT=0, EXT=0
cs: index=1, ti=0,
rpl=0
ds: index=2, ti=0,
rpl=0
es: index=2, ti=0,
rpl=0
fs: index=0, ti=0,
rpl=0
gs: index=0, ti=0,
rpl=0
Failed assertion in
Detach_Thread:
kthread->refCount >
0 at
./src/geekos/kthread.c,
line 193, RA=146f5,
thread=0x0000c000

Does anyone know
how to fix this
error? I've already
used memset() to
clear the allocated
memory for
userContext.

Thanks
Ben Rogers
2005-02-24 04:55:23 UTC
Permalink
Try initializing refCount to 0 even though we never use it, I think
thats how I fixed a similar problem...

Ben
Neil Castine
2005-02-24 05:00:19 UTC
Permalink
The exception 13 should be fixed if you call Exit(code) in your
Sys_Exit() function.
J. Basir van de Fliert
2005-02-25 02:28:03 UTC
Permalink
I have been having the same problem with the exception 13. Does
anyone have any other ideas on how to fix it. Thanks.
Basir
Neil Castine
2005-02-25 05:01:25 UTC
Permalink
Just a few more things you can check that messed me up initially.
Pointers in C are so much more irritating than in C++.
1. Make sure you use Free() on EVERYTHING allocated with Malloc(). And
you should be using Malloc() before memset().
2. Make sure your Sys_Spawn() function program is returning a positive
number. If not you may have pointer issues in your Spawn(char*, char*,
struct Kenrel_Thread**) function.
Post by J. Basir van de Fliert
I have been having the same problem with the exception 13. Does
anyone have any other ideas on how to fix it. Thanks.
Basir
Continue reading on narkive:
Loading...