Jump to content
The Dark Mod Forums

Compiling on OSX


Midnight

Recommended Posts

  • Replies 145
  • Created
  • Last Reply

Top Posters In This Topic

Is the problem reproducable (always on the second restart?) or is it seemingly random? Any pattern?

 

Sorry, I had meant to test this before. Yes, I can confirm it does appear to be every second restart. The attached terminal log shows this failure happening twice (i.e. after four restarts), and then the fifth attempt at a restart saw a segmentation fault.

 

terminal.txt

 

Darkmod_segfault.txt

 

Link to comment
Share on other sites

I suspect the issue is related to the relative path specification passed to the game the second time tdmlauncher is starting the engine: /Users/rsphares/Library/Application Support/Doom 3/darkmod/../Doom 3.app/Contents/MacOS/Doom 3

 

The ../ in the path might confuse things, I'll try to normalise the path before starting the game. Here's a new tdmlauncher, please check if the restart issues are still here with that build: http://www.dramthethief.com/darkmod/files/tdmlauncher.macosx

Link to comment
Share on other sites

Midnight or grayman: can you confirm that tdmaluncher's Doom 3 process detection is working correctly by doing the following: please start Doom 3 and open another terminal to launch tdmlauncher.macosx. Since D3 is already running, it should state something like "Doom 3 is still running, waiting one second...". Can you confirm that?

Link to comment
Share on other sites

Midnight or grayman: can you confirm that tdmaluncher's Doom 3 process detection is working correctly by doing the following: please start Doom 3 and open another terminal to launch tdmlauncher.macosx. Since D3 is already running, it should state something like "Doom 3 is still running, waiting one second...". Can you confirm that?

 

Confirmed.

 

It spit out that line ~10x, then started TDM.

 

I installed a mission from the New Mission page, TDM exited, the terminal started sayin "waiting one second" again, for ~10x, then TDM restarted with my new mission installed. I asked it to install a different mission. It exited, the terminal waited another 10s with the repeated message, then it crashed.

 

This was with the new tdmlauncher.macosx.

 

The final lines in the terminal output were the same as those in Midnight's terminal output:

 

 

Unknown command 'vid_restart'

idRenderSystem::Shutdown()

----- Shutting down GL -----

FIXME: Sys_FadeScreen

FIXME: Sys_UnfadeScreens

----- Done shutting down GL -----

Sys_Error: Couldn't reopen /Users/rsphares/Library/Application Support/Doom 3/base/pak000.pk4

Link to comment
Share on other sites

I don't see double quotes in my Darkmod.log.

 

The final lines before the crash:

 

 

[DarkMod/DarkModGlobals.cpp ( 830):INF (MAINMENU) FR: 0] Parent path is /Users/rsphares/Library/Application Support/Doom 3/

[DarkMod/DarkModGlobals.cpp ( 834):INF (MAINMENU) FR: 0] fs_game_base is darkmod

[DarkMod/DarkModGlobals.cpp ( 854):INF (MAINMENU) FR: 0] Resulting darkmod path is /Users/rsphares/Library/Application Support/Doom 3/darkmod

[DarkMod/ModMenu.cpp ( 389):DEB (MAINMENU) FR: 0] Engine Path: /Users/rsphares/Library/Application Support/Doom 3/Doom 3.app/Contents/MacOS/Doom 3

[DarkMod/ModMenu.cpp ( 429):DEB (MAINMENU) FR: 0] TDM Launcher Path: /Users/rsphares/Library/Application Support/Doom 3/darkmod/tdmlauncher.macosx

[DarkMod/ModMenu.cpp ( 458):DEB (MAINMENU) FR: 0] Starting tdmlauncher /Users/rsphares/Library/Application Support/Doom 3/darkmod/tdmlauncher.macosx with argument /Users/rsphares/Library/Application Support/Doom 3/Doom 3.app/Contents/MacOS/Doom 3

Link to comment
Share on other sites

I installed a mission from the New Mission page, TDM exited, the terminal started sayin "waiting one second" again, for ~10x, then TDM restarted with my new mission installed. I asked it to install a different mission. It exited, the terminal waited another 10s with the repeated message, then it crashed.

I think the problem here is that Doom 3 doesn't cleanly terminate itself - the process seems to stick around for too long. Also the Mac Doom 3 engine doesn't seem to prevent multiple instances of itself - in Windows it's not possible to have two Doom 3 processes next to each other, in Mac this might be possible. This would also explain the "Couldn't reopen blah" messages, the newly started instance can't acquire locks on the PK4 files and bails out. I don't think this is tdmlauncher's fault at all, unless it's just a matter of increasing the 10 second timeout when waiting for Doom 3 to exit.

 

When TDM restarts, it does so by issuing a "quit" command to the command interpreter. This is the same as pulling the down the console and entering "quit". Can you try this out, grayman? What happens if you exit TDM by entering quit in the console, does the Doom 3 process terminate properly, and if yes, how long does it take?

 

After clearing off my terminal and Safari windows, I found Doom 3 still running underneath.

 

A restart just restarts TDM, it doesn't restart Doom 3?

As explained above, TDM issues the quit command, which fully exits the game. At this point we don't have the means to just restart the TDM mod portion only. (There is a command "reloadEngine", but I've read reports that it just crashes the engine. Never tried that myself, I think.)

Link to comment
Share on other sites

Typing "quit" kills Doom 3 w/in a second.

 

Edit:

 

Typing "quit" after starting TDM kills TDM and Doom 3 w/in a second.

 

Starting TDM, asking for a new mission, TDM restarts, type "quit" kills TDM and Doom 3 w/in a second.

Link to comment
Share on other sites

And here's a new tdmlauncher.macosx, it is surrounding the command line arguments with double quotes if any of them has a space in it: http://www.dramthethief.com/darkmod/files/tdmlauncher.macosx

 

Generally, you really want to almost always use double quotes on such arguments, and further, if they already contain things like spaces, "!", "$", or even " or ', either filter these out, or escape them with a backslash. Otherwise, the shell might (almost will) interpret them in funny and painful ways. "!" f.i. will look for past "events" - while it usually errors out with "no such event", who knows what it sometimes will do :)

 

I *think* "abc!$" (e.g. double quoted) is ok, tho, but it depends on the shell, which might be different on Mac than in Linux.

 

In Perl, you have a way to automatically escape things for you (the system call), but I am not sure how to handle this from C or C++. Maybe there is a helper in the boost library?

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Can you confirm the opposite too, that quitting through an FM installation restart does not kill the Doom 3 process that quickly?

 

 

"quitting through an FM installation restart" = ?

 

Another bit of info: If I start Doom 3, then start TDM in a terminal window, I get a second copy of Doom 3. Upthread, when I reported that Doom 3 was still around after TDM died, it was my original copy I was seeing.

 

In the terminal output (console output) I'm seeing "unknown command Support/Doom" (after the Warnings section) which looks like something's having a problem with spaces in the command line arguments. But the game comes up successfully anyway.

 

 

Link to comment
Share on other sites

Sorry, language fail. I meant to ask whether you can confirm that the d3 process gets properly terminated after a normal FM installation, or whether you end up with two d3 processes at some point.

Link to comment
Share on other sites

Sorry, language fail. I meant to ask whether you can confirm that the d3 process gets properly terminated after a normal FM installation, or whether you end up with two d3 processes at some point.

 

 

While watching the Activity Monitor, I only see one D3 process when I start it with tdmlauncher.macosx.

 

That process ends when I ask for a new mission restart.

 

It reappears when TDM comes back.

 

When I ask for a second new mission restart, the process ends w/TDM.

 

After that, TDM crashes and no D3 process is left behind.

 

The only time I see 2 D3 processes is if I start D3, then execute tdmlauncher.macosx. That brings up a 2nd D3 process, which behaves as described above.

 

 

Link to comment
Share on other sites

Ok, Mac liked that version.

 

But I'm getting the same bad result.

 

Could we just put this in the known bugs list? In one session, we could expect the player to bring up TDM and install a new mission, then play it. Or bring up TDM and load a saved game. Those both work fine. They just wouldn't be able to finish a mission, then ask for a second mission to be installed.

Link to comment
Share on other sites

Well, it depends whether we classify that bug as "needs to be fixed before we can announce Mac support" or as "known, yet annoying limitation". I'm fine with not having to fix that bug of course, needless to say... it's kind of tedious trying to fix a bug I can't reproduce myself since I don't have a proper OSX environment.

 

Are there any remaining open issues with the current set of binaries or is everything else working ok so far? Are there any problems with the TDM Updater?

Link to comment
Share on other sites

The only other bug I've seen is the segmentation fault, but this happens less frequently than the restart bug. The restart isn't a huge issue since when a FM restart fails you can just launch TDM again and the correct FM will have been installed, so it just requires that additional manual intervention.

 

We could leave this as a known bug for 1.06 and then have a closer look once I get you remote access to a OSX environment if you're happy with that approach.

Link to comment
Share on other sites

So, I guess we can proceed now putting the relevant instructions for Mac users on the wiki? Can you please revisit the instructions you gave above and check if it got any simpler in the meantime?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recent Status Updates

    • Ansome

      Finally got my PC back from the shop after my SSD got corrupted a week ago and damaged my motherboard. Scary stuff, but thank goodness it happened right after two months of FM development instead of wiping all my work before I could release it. New SSD, repaired Motherboard and BIOS, and we're ready to start working on my second FM with some added version control in the cloud just to be safe!
      · 0 replies
    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
×
×
  • Create New...