Jump to content
The Dark Mod Forums

Uninitialized members and Typeinfo


duzenko

Recommended Posts

@duzenko

Linux build now fails:

 

[ 73%] Building CXX object CMakeFiles/TheDarkMod.dir/game/gamesys/TypeInfo.cpp.o
/home/randy/tdm_src/trunk/game/gamesys/TypeInfo.cpp:51:10: fatal error: GameTypeInfo.h: No such file or directory
 #include "GameTypeInfo.h"    // Make sure this is up to date!
          ^~~~~~~~~~~~~~~~
compilation terminated.
CMakeFiles/TheDarkMod.dir/build.make:5252: recipe for target 'CMakeFiles/TheDarkMod.dir/game/gamesys/TypeInfo.cpp.o' failed
make[2]: *** [CMakeFiles/TheDarkMod.dir/game/gamesys/TypeInfo.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /home/randy/tdm_src/trunk/idlib/../idlib/Lib.h:236:0,
                 from /home/randy/tdm_src/trunk/build/TheDarkMod_pch/precompiled.h:45:
/home/randy/tdm_src/trunk/idlib/../idlib/Str.h:815:36: warning: argument 1 null where non-null expected [-Wnonnull]
     int l = static_cast<int>(strlen(text));
                              ~~~~~~^~~~~~
In file included from /home/randy/tdm_src/trunk/ThirdParty/artefacts/tracy/include/Tracy.hpp:102:0,
                 from /home/randy/tdm_src/trunk/build/TheDarkMod_pch/precompiled.h:19:
/usr/include/string.h:384:15: note: in a call to function size_t strlen(const char*)’ declared here
 extern size_t strlen (const char *__s)
               ^~~~~~
At global scope:
cc1plus: warning: unrecognized command line option ‘-Wno-class-memaccess
CMakeFiles/Makefile2:94: recipe for target 'CMakeFiles/TheDarkMod.dir/all' failed
make[1]: *** [CMakeFiles/TheDarkMod.dir/all] Error 2
Makefile:102: recipe for target 'all' failed
make: *** [all] Error 2

 

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

9 minutes ago, stgatilov said:

How did you get away without #define private public ?

As far as I remember, it is required to get member pointers.

I have no idea!11

I can see that text save code calls class methods to get members, could it be it? No idea how it works with sizeof/offsetof  though, maybe those are immune to access modifiers?

Link to comment
Share on other sites

On 12/16/2021 at 2:58 PM, stgatilov said:

Yes, padding is a problem.

One possible thing is to check every 8 bytes instead of 4 bytes: I guess it is already done like that in 64-bit builds. Of course, it allows the check to miss uninitialized members, but I don't think there is a way around it.

In alternative reality I can parse pdb's and get all type info from there 🤪

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

    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 2 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 5 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
×
×
  • Create New...