Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
85 user(s) are online (67 user(s) are browsing Forums)

Members: 0
Guests: 85

more...

Support us!

Headlines

 
  Register To Post  

« 1 ... 17 18 19 (20) 21 22 23 ... 72 »
Re: Odyssey 1.23 progress
Home away from home
Home away from home


See User information
@kas1e

The crashes seem random from those logs you posted.

But something is getting trashed.

I would suggest you go through all amiga specific structure allocations and check they are all the right size, there's an outside chance of an allocation of a pointer to struct rather than a struct or something like that. (ie sizeof(struct foo*) instead of sizeof(struct foo) very easy mistake to make and hard to spot ... and you rarely get a DSI from such errors.


Go to top
Re: Odyssey 1.23 progress
Home away from home
Home away from home


See User information
@broadblues

Quote:
I would suggest you go through all amiga specific structure allocations and check they are all the right size, there's an outside chance of an allocation of a pointer to struct rather than a struct or something like that. (ie sizeof(struct foo*) instead of sizeof(struct foo) very easy mistake to make and hard to spot ... and you rarely get a DSI from such errors.
If it would be something like that he'd get random crashes no matter how he starts Odyssey, but not never crashes for the 1st run and always for the 2nd in the same shell.

Some cleanup seems to be missing somewhere which results in destroying something, or even more likely setting it to some data of Odyssey which is freed after exit, in struct Process or something else the shell is using.

@kas1e
Use tools like Ranger or Scout to check the struct Process of the shell you are using for starting Odyssey, nothing must change after the 1st run but something probably does. Knowing what is trashed would help a lot.

Go to top
Re: Odyssey 1.23 progress
Home away from home
Home away from home


See User information
@Georg
Quote:

It sounds stupid, but what happens if you make a copy of the exe and the first time you start the original (owb). And the second time you start the copy (owb_copy).


Same crash (i.e. run owb, then exit, then owb_copy), same crash, same stack trace.

@joerg
Quote:

Why are you using
static Mutex* atomicallyInitializedStaticMutex=NULL;
What was the reason you did that?


We add it with Deniil few years ago, and all what i found now in the logs is just some irc quote:

Quote:

[23:49] <Deniil> this line:
[23:49] <Deniil> static Mutex* atomicallyInitializedStaticMutex;
[23:49] <Deniil> should be static Mutex* atomicallyInitializedStaticMutex=NULL; I think
[23:49] <Deniil> because in initializeThreading() there is if (!atomicallyInitializedStaticMutex)


So we imho add it just in case, and now i remove it back, and do check : all works as before: i.e. crash on second time as well.

@joerg
Quote:

Use tools like Ranger or Scout to check the struct Process of the shell you are using for starting Odyssey, nothing must change after the 1st run but something probably does. Knowing what is trashed would help a lot.


before start anything:
http://kas1e.mikendezign.com/temp/joerg/01_before_anything.jpg

start of odyssey first time:
http://kas1e.mikendezign.com/temp/joerg/02_run_first_time.jpg

quit from odyssey:
http://kas1e.mikendezign.com/temp/joerg/03_quit_from_odyssey.jpg

start of odyssey second time:
http://kas1e.mikendezign.com/temp/joerg/04_second_run.jpg

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: Odyssey 1.23 progress
Home away from home
Home away from home


See User information
@kas1e

No idea what it is, but "MUI imagespace screen notify" child process is still running after exit, and it's still waiting for some signals which shouldn't happen either.

Using something like Scout instead of Ranger would be better, it includes much more things from struct Process like the Input(), Output() and ErrorOutut() files (pr_CIS, pr_COS and pr_CES), current directory lock, etc.

Go to top
Re: Odyssey 1.23 progress
Just popping in
Just popping in


See User information
@kas1e

Very early in prog startup in main() try

FindTask(NULL)->tc_UserData = NULL;

(or if you changed BCThreadSpecifcWTF.cpp to use something else than tc_UserData, try to NULL that).


Go to top
Re: Odyssey 1.23 progress
Home away from home
Home away from home


See User information
@Joerg
Quote:

No idea what it is, but "MUI imagespace screen notify" child process is still running after exit, and it's still waiting for some signals which shouldn't happen either.


Dunno what is exactly, but that thing leaves from any mui app after exit (if i even run for example wookiechat, or amirc, or anything). So imho should be not relaed.

Quote:

Using something like Scout instead of Ranger would be better


Tried one from os4depot, and once run and press on Tasks it just crashes.

@Georg
Ok, will check now

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: Odyssey 1.23 progress
Home away from home
Home away from home


See User information
@kas1e

Sent a working scout by email.

If you try Georg's experiment print out the value before NULL ing just see what changed if anything.


Go to top
Re: Odyssey 1.23 progress
Home away from home
Home away from home


See User information
The scout I sent you was 3.5 but 3.6 from os4depot also works for me so could be a machine problem.


Go to top
Re: Odyssey 1.23 progress
Home away from home
Home away from home


See User information
@Andy
Same crash with your scout too , but its probably because i am on debug kernel + munge , and DAR are: CCCCCCD0 (so its munge then). Ignore dsi help through. Will try now.

@Andy, Georg
I have for now:

BTThreadingWTF.cpp:

Quote:

NewThreadContext* context = reinterpret_cast<NewThreadContext*>(IDOS->GetEntryData());


What should i "null" ?

Go to top
Re: Odyssey 1.23 progress
Home away from home
Home away from home


See User information

Go to top
Re: Odyssey 1.23 progress
Home away from home
Home away from home


See User information
@georg
So, because of that the same value of tc_UserData, i still Null exactly that tc_UserData and crash gone !!

Through i do not know where that tc_UserData is used as well, as in BTThreadingWTF.cpp i change that as i show before, but still NULLed it at begining deal with crash , maybe somewhere else it in use, dunno.

On exit, tc_UserData still have that value from odyssey, but with FindTask(NULL)->tc_UserData = NULL; at main there no crash anymore.

I even do run it 10 times in row, and valut in tc_UserData always the same (i was expected it will be changed from run to run, after we NULL it)

Go to top
Re: Odyssey 1.23 progress
Home away from home
Home away from home


See User information
@kas1e

Quote:
On exit, tc_UserData still have that value from odyssey, but with FindTask(NULL)->tc_UserData = NULL; at main there no crash anymore.
Instead of setting it to NULL at the start of main() you should do it at the end. It's the same for Odyssey, but other software might have the same problem if you don't set it to NULL. Or even better at the start and at the end, in case someone runs another program in a shell which doesn't clear it on exit before Odyssey.

And of course you should fix the actual bug in Odyssey as well.

Go to top
Re: Odyssey 1.23 progress
Just popping in
Just popping in


See User information
So, OS4 is incompatible with AmigaOS 3.x?
Many programs use tc_UserData. tc_UserData is meant to be *used* by the programs, not by the operating system (hence the name).

Go to top
Re: Odyssey 1.23 progress
Home away from home
Home away from home


See User information
@joerg
Quote:

And of course you should fix the actual bug in Odyssey as well.

If only i found where is it :)

@georg
Only now got what you mean, you mean exactly BCThreadSpecificWTF.cpp (i just forgot about that one at all), and there i didn't change anything, its still the same tc_UserData everywhere (in threadSpecificKeyCreate() and in threadSpecificKeyDelete() ).

Go to top
Re: Odyssey 1.23 progress
Home away from home
Home away from home


See User information
@Fab

Quote:
So, OS4 is incompatible with AmigaOS 3.x?
Many programs use tc_UserData. tc_UserData is meant to be *used* by the programs, not by the operating system (hence the name).
It's not a bug in AmigaOS but in Odyssey (maybe in Roman's parts only), it obviously crashes if tc_UserData wasn't NULL when it's started.

AmigaOS still doesn't use tc_UserData itself.

Go to top
Re: Odyssey 1.23 progress
Home away from home
Home away from home


See User information
If that function is invoked from the main process, it will corrupt stuff id tc_UserData is not NULL at program start.



void threadSpecificKeyCreate(ThreadSpecificKeykeyvoid (*destructor)(void *))
{
    
struct Task *FindTask(NULL);

    if(
t->tc_UserData == NULL)
    {
        
t->tc_UserData = (struct MinList *) malloc(sizeof(struct MinList));

        if(
t->tc_UserData)
        {
            
NEWLIST(t->tc_UserData);
        }
    }

    if(
t->tc_UserData)
    {
        *
key = (ThreadSpecificKeymalloc(sizeof(struct ThreadSpecificNode));

        if(*
key)
        {
            (*
key)->value NULL;
            (*
key)->destructor destructor;

            
ADDTAIL(t->tc_UserData, (*key));
        }
    }
}

Go to top
Re: Odyssey 1.23 progress
Home away from home
Home away from home


See User information
@Fab

tc_UserData is indeed for user use, but you can't assume any value before you use it if you running on someone else's process (shells in this case but could be another program running Odyssey direct) or after you run some external program on your process (not relevant here).

To be most "friendly" you might save and restore the start value if running in someone else's process, but then again they shouldn't assume you did that.


Go to top
Re: Odyssey 1.23 progress
Just popping in
Just popping in


See User information
@joerg

Quote:
No idea what it is, but "MUI imagespace screen notify" child process is still running after exit, and it's still waiting for some signals which shouldn't happen either.


That is a process created by MUI which will flush all unused images used on a just closed screen. This process is started with NP_Child=FALSE.

Go to top
Re: Odyssey 1.23 progress
Home away from home
Home away from home


See User information
@broadblues

The code you quoted has a few bugs.


t->tc_UserData = (struct MinList *) malloc(sizeof(struct MinList));

should be.

t->tc_UserData = (struct List *) IExec -> AllocSysObject(ASOT_LIST, TAG_END);

and freed whit.

IExec -> FreeSysObject(ASOT_LIST, t->tc_UserData );

some where else in the code.

if(t->tc_UserData)
        {
            
NEWLIST(t->tc_UserData);
        }


and NEWLIST(...) is bullshit, not needed, when using AllocSysObject(...).


so *key should be a (struct *Node) type, there for malloc() is wrong command to allocate the memory, because malloc() was private memory, and t->tc_UserData comes from outside the process.

*key = (ThreadSpecificKey) malloc(sizeof(struct ThreadSpecificNode));

should be:

*key = (struct ThreadSpecificKey *) IExce -> AllocSysObject(ASOT_NODE, ASONODE_Size, sizeof(struct ThreadSpecificNode) ,TAG_END);

And should be freed whit FreeSysObject(ASOT_NODE, *key); where ever free(*key) is.



Edited by LiveForIt on 2014/3/1 1:14:02
Edited by LiveForIt on 2014/3/1 1:20:17
Go to top
Re: Odyssey 1.23 progress
Home away from home
Home away from home


See User information
@broadblues

I have a problem to understand way the List is allocated here at all, should this not be provided when thread starts, after the thread is closed the (struct *Task) will be deleted so getting or poking at Task -> tc_UserData after the thread has stopped, is like asking for trouble, hopefully this not what is happening.

Go to top

  Register To Post
« 1 ... 17 18 19 (20) 21 22 23 ... 72 »

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project