Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.
 Entire forum ➜ Dawn of Time ➜ Installing/compiling the server ➜ Using Visual Studio 2019 to debug commands

Using Visual Studio 2019 to debug commands

It is now over 60 days since the last post. This thread is closed.     Refresh page


Pages: 1  2 

Posted by Nick Gammon   Australia  (23,121 posts)  Bio   Forum Administrator
Date Reply #15 on Sat 18 Sep 2021 07:22 AM (UTC)
Message
From your link in your earlier post: https://d.pr/i/yIT4qQ

It doesn't close *immediately* - it closes after logging quite a few lines. What lines did you see this time?

Have you ever run the suggested startup with --creatdirs in it?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by BishopOsiris   USA  (55 posts)  Bio
Date Reply #16 on Sun 26 Sep 2021 07:53 PM (UTC)
Message
Yeah sorry. I realize I could have been a lot more helpful in the last post.

So I added the "--createdirs" command line argument like you suggested. That worked but then it closed right after that.

https://d.pr/i/SmRJSi

But this is what happens when I start the mud outside of VS. I do 'dawn --createdirs' which creates all the directories. Then I'm back at the prompt where I type 'dawn' and that's what actually starts the mud. (There are pics of all this in the start up doc I sent you for reference).

BTW, how do you post images here?
Top

Posted by Nick Gammon   Australia  (23,121 posts)  Bio   Forum Administrator
Date Reply #17 on Mon 27 Sep 2021 05:07 AM (UTC)

Amended on Mon 27 Sep 2021 09:46 AM (UTC) by Nick Gammon

Message

You don’t post pictures here unless you are an administrator. Too much abuse for me to worry about tracking down. (It has always been like that). I suggest https://imgur.com/ with an image marked “private” so people don’t browse to it.

As for what you did, OK, now you need to remove “--createdirs” from the command line, and it should run. You just do --createdirs once to make the directories.

It said so on the image you posted:

“Start the mud normally to continue.”


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,121 posts)  Bio   Forum Administrator
Date Reply #18 on Mon 27 Sep 2021 09:48 AM (UTC)
Message
BTW, you don't need to take a screenshot of text like you did, and then worry about how to find somewhere to host that image.

Just copy and paste the actual text you saw. That's easier isn't it? Then I can copy and paste lines of interest rather than having to retype them.

Put text you copy and paste into code tags.

Template:codetag To make your code more readable please use [code] tags as described here.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by BishopOsiris   USA  (55 posts)  Bio
Date Reply #19 on Mon 27 Sep 2021 11:16 PM (UTC)
Message
I think we're getting close. check out the two files below. The first one is the one I ran through VS. The second one is the one I ran through a regular cmd prompt. When you get the end of each file at line:

-= The Dawn of Time (Win32c++) was last compiled on Sep 27 2021 at 11:58:25 =-


it says they both compiled and basically "work." But when we get to:

:: PlatformID: WindowsNT v6.2.9200 []


VS closes out and the regular command prompt starts the mud as intended.

VS debugger


-= The Dawn of Time (Win32c++) was last compiled on Sep 27 2021 at 11:58:25 =-
-= Parent codebase version Dawn 1.69s_beta5 - 23May2009:

:: We are running on exe.
:: The current working directory is C:\Dawn Of Time\dawn.
:: The hostname/ident resolver is not currently running.
:: PlatformID: WindowsNT v6.2.9200 []
:: Boot test completed OK!!!

C:\Dawn Of Time\dawn\Debug\dawn.exe (process 21300) exited with code 0.
To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops.
Press any key to close this window . . .


Command line prompt


-= The Dawn of Time (Win32c++) was last compiled on Sep 27 2021 at 12:23:36 =-
-= Parent codebase version Dawn 1.69s_beta5 - 23May2009:

:: We are running on DESKTOP-1UI98DM.
:: The current working directory is C:\Dawn Of Time\DAWNTEST.
:: The hostname/ident resolver is not currently running.
:: PlatformID: WindowsNT v6.2.9200 []
:: Free stringspace =607349.
:: Dawn v1.69r based mud on DESKTOP-1UI98DM is ready to rock.
:: Logging to logs\game\4000-210927-01.log
:: Mud is running in the foreground with a process id of 31208
:: Pressing ctrl+c will terminate the mud process (unless you have hotrebooted)
:: installing atexit and signal handlers
:: The mud is waiting for connections on the following addresses:
::   s508>  telnet port: 4000, ipv4 address: 0.0.0.0
::   s500>  http   port: 4001, ipv4 address: 0.0.0.0
:: Updating Areas
Mon Sep 27 12:28:36 :: Tick
Top

Posted by Nick Gammon   Australia  (23,121 posts)  Bio   Forum Administrator
Date Reply #20 on Thu 30 Sep 2021 06:29 AM (UTC)
Message
Well, you have a debugger, time to start debugging.

I notice you are using two directories for some reason:

C:\Dawn Of Time\dawn

and

C:\Dawn Of Time\DAWNTEST

Is there a reason for this? If you can get the command-line version running in "C:\Dawn Of Time\dawn" then that eliminates the possibility that it is something about the directory.

A possible explanation is that debuggers tend to zero out memory, whilst the executables don't. So, a variable somewhere might be considered zero in one case and <some random value> in the other. In other words, a bug in the code.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by BishopOsiris   USA  (55 posts)  Bio
Date Reply #21 on Thu 30 Sep 2021 10:37 AM (UTC)
Message
C:\Dawn Of Time is the original directory I started with. I kept it running since it was a working version I could refer to while trying to figure this all out. I used dawn and DAWNTEST for testing. Basically, just booting from scratch to try different trouble shooting techniques. Testing in those directories works just fine, though.

I'm not entirely sure I follow you on the debugging part, though. The code works. It builds and compiles with no warnings nor errors. And if it will boot from the command line it should boot from VS. I do get the part about VS processing the code differently. But the VS output clearly states the boot was successful, it just closes out instead of continuing to run in the background.

I'll do a compare on the two outputs from top to bottom and see if I can find any differences there.
Top

Posted by Nick Gammon   Australia  (23,121 posts)  Bio   Forum Administrator
Date Reply #22 on Fri 01 Oct 2021 02:16 AM (UTC)
Message
I can see quite a few differences. For example, what happened to the ":: Free stringspace =607349." message?

You need to put a breakpoint at (say) the message ":: PlatformID: WindowsNT v6.2.9200 []" (or the code that generates it) and then follow on to see why the "Free stringspace" message doesn't appear.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,121 posts)  Bio   Forum Administrator
Date Reply #23 on Fri 01 Oct 2021 02:17 AM (UTC)
Message

… the boot was successful, it just closes out …

Yes but it does that for a reason. The is where your debugging skills need to get to work. Working out this will help with whatever debugging you are planning to do on commands.


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


40,262 views.

This is page 2, subject is 2 pages long:  [Previous page]  1  2 

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.