Maurice Kalinowski <haiku@xxxxxxxxxxxxx> wrote: > it is some time ago since I worked on media related things, so please > forgive me, if the following is wrong. I think it is correct. Stippi obviously does so, too, as the already applied the patch. > The patch is about the following issue: When you launch the Cortex > application, the media_addon_server currently crashes with a debugger > call. The reason is, that Cortex wants to set the RunMode for the global > BTimeSource instance. That one then itself gets into ::SetRunMode() > which calls ::SendRunMode(), which then again informs its slave nodes > about the RunMode changes. Long ago I noticed that Haiku would deadlock when starting Cortex, and after some investigation found that NODE_SET_RUN_MODE was somehow responsible for that. I added some debug code but didn't progress any further. Thanks for finding the source of the bug. > Now the problem is, that after some debugging I found out that the > timesource adds itself to the slave list, when Cortex starts. Though > there is probably some misbehavior in Cortex, the MediaKit should still > not adopt this. So what attached patch does is simply to check for this Yes, this behaviour of Cortex is completely wrong. Of cause, the media kit needs to protect itself from such behaviour, so the patch was required. But Cortex should not do any invasive changes when beeing started. Changing time sources and run mode is for sure the wrong thing to do when trying to visualize media nodes. Time to fix Cortex :) > sanity inside the adding code. And as already mentioned, this prevents > the media_addon_server from crashing in case you want to start Cortex. I think thats the correct place to do the check. > Btw. debugger("scheisse") is not something, which necessarily helped me > out on debugging, though I actually smiled, when I read it the first time... > :D Yes, that debug code initially wasn't meant for public viewing, but I checked it in because crashing the addon-server was better than deadlocking haiku. I'll revert the DataExchange.cpp and TimeSource.cpp changes made in r22029 when I get home. fyi: http://svn.berlios.de/viewcvs/haiku?rev=22029&view=rev regards Marcus Viel oder wenig? Schnell oder langsam? Unbegrenzt surfen + telefonieren ohne Zeit- und Volumenbegrenzung? DAS TOP ANGEBOT FÜR ALLE NEUEINSTEIGER Jetzt bei Arcor: günstig und schnell mit DSL - das All-Inclusive-Paket für clevere Doppel-Sparer, nur 29,95 Euro inkl. DSL- und ISDN-Grundgebühr! http://www.arcor.de/rd/emf-dsl-2