The following warnings occurred:
Warning [2] Undefined array key "lockoutexpiry" - Line: 94 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 94 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "lockoutexpiry" - Line: 573 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 573 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $can_access_moderationqueue - Line: 752 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 752 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 892 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 892 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 892 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 892 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $awaitingusers - Line: 34 - File: global.php(959) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/global.php(959) : eval()'d code 34 errorHandler->error
/global.php 959 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 1024 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 1024 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5308 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 5308 errorHandler->error
/global.php 1024 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key 1 - Line: 1474 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 1474 errorHandler->error
/inc/functions.php 1429 fetch_forum_permissions
/printthread.php 76 forum_permissions
Warning [2] Undefined property: MyLanguage::$archive_pages - Line: 2 - File: printthread.php(257) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/printthread.php(257) : eval()'d code 2 errorHandler->error
/printthread.php 257 eval
/printthread.php 117 printthread_multipage
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key 1 - Line: 866 - File: inc/class_parser.php PHP 8.1.27 (Linux)
File Line Function
/inc/class_parser.php 866 errorHandler->error
/inc/class_parser.php 938 postParser->mycode_parse_post_quotes
[PHP] postParser->mycode_parse_post_quotes_callback1
/inc/class_parser.php 816 preg_replace_callback
/inc/class_parser.php 451 postParser->mycode_parse_quotes
/inc/class_parser.php 201 postParser->parse_mycode
/printthread.php 179 postParser->parse_message
Warning [2] Undefined array key 1 - Line: 885 - File: inc/class_parser.php PHP 8.1.27 (Linux)
File Line Function
/inc/class_parser.php 885 errorHandler->error
/inc/class_parser.php 938 postParser->mycode_parse_post_quotes
[PHP] postParser->mycode_parse_post_quotes_callback1
/inc/class_parser.php 816 preg_replace_callback
/inc/class_parser.php 451 postParser->mycode_parse_quotes
/inc/class_parser.php 201 postParser->parse_mycode
/printthread.php 179 postParser->parse_message
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key 1 - Line: 866 - File: inc/class_parser.php PHP 8.1.27 (Linux)
File Line Function
/inc/class_parser.php 866 errorHandler->error
/inc/class_parser.php 938 postParser->mycode_parse_post_quotes
[PHP] postParser->mycode_parse_post_quotes_callback1
/inc/class_parser.php 816 preg_replace_callback
/inc/class_parser.php 451 postParser->mycode_parse_quotes
/inc/class_parser.php 201 postParser->parse_mycode
/printthread.php 179 postParser->parse_message
Warning [2] Undefined array key 1 - Line: 885 - File: inc/class_parser.php PHP 8.1.27 (Linux)
File Line Function
/inc/class_parser.php 885 errorHandler->error
/inc/class_parser.php 938 postParser->mycode_parse_post_quotes
[PHP] postParser->mycode_parse_post_quotes_callback1
/inc/class_parser.php 816 preg_replace_callback
/inc/class_parser.php 451 postParser->mycode_parse_quotes
/inc/class_parser.php 201 postParser->parse_mycode
/printthread.php 179 postParser->parse_message
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Forums
Need help: serialization class and binary compatibility - Printable Version

+- Forums (https://www.vdrift.net/Forum)
+-- Forum: Project (https://www.vdrift.net/Forum/forumdisplay.php?fid=4)
+--- Forum: Development (https://www.vdrift.net/Forum/forumdisplay.php?fid=9)
+--- Thread: Need help: serialization class and binary compatibility (/showthread.php?tid=797)

Pages: 1 2


Need help: serialization class and binary compatibility - joevenzon - 10-14-2007

I've added a new serialization class to VDrift in SVN R1853/R103. This will be used for replays and, more importantly, for upcoming improved mulitplayer. I need help from you guys to make sure that there aren't going to be incompatibilities in the binary format between different platforms.

Here's what I need: check out the latest code, compile, and run with the -test argument. You should see a bunch of text and then something like this:
Code:
[---------------- RUNNING TESTS ----------------]
Results: 5 succeeded, 0 failed
[---------------- TESTS FINISHED ---------------]

Post what's between the RUNNING TESTS and TESTS FINISHED blocks, along with your OS and CPU (and whether or not you run a 64-bit system) in a reply to this post.

I'm curious to see if this will pass for those w/ 64-bit systems, for those on OSX, and for those with big endian machines.


- xTs - 10-14-2007

Quote:BinReloc successfully initialized.
Executable path: /home/xts/source/vdrift/build/vdrift
Data dir: /home/xts/source/vdrift/data
Localedir: /home/xts/source/vdrift/share/locale
No data_dir found in VDrift.config, using /home/xts/source/vdrift/data
Found config file /home/xts/.vdrift/controls.
Found config file /home/xts/.vdrift/VDrift.config.
No data_dir found in VDrift.config, using /home/xts/source/vdrift/data
Version of game: development-full
Skin name not found in config file...
OGG Vorbis loading: 4/5 = 80% FAIL
Performance testing Sample16bit (240ms for 1 second of 44.1khz stereo audio with 32 sources): 1/1 = 100% PASS
Performance testing SampleAndAdvance16bit (64ms for 1 second of 44.1khz stereo audio with 32 sources): 1/1 = 100% PASS
Performance testing SampleAndAdvanceWithPitch16bit (234ms for 1 second of 44.1khz stereo audio with 32 sources): 1/1 = 100% PASS
Performance testing SampleAndAdvanceWithPitch16bit with 1st order filter (475ms for 1 second of 44.1khz stereo audio with 32 sources): 1/1 = 100% PASS
Sound callback testing: 512/512 = 100% PASS
Sound effects testing: 3/3 = 100% PASS
Sound filter testing: 1/2 = 50% FAIL
Sound management testing: 6/6 = 100% PASS
Sound source testing: 3/3 = 100% PASS
Wave loading 44k s16 c2: 5/5 = 100% PASS
TOTAL: 538/540 = 99.6296% FAIL
Drawable filtering: 4/4 = 100% PASS
Scene node and drawable deletion: 4/4 = 100% PASS
Scene node and drawable management: 6/6 = 100% PASS
Transform into and out of local space: 1/1 = 100% PASS
TOTAL: 15/15 = 100% PASS
Pointer/bipointer allocation/deallocation: 13/13 = 100% PASS
TOTAL: 13/13 = 100% PASS
[---------------- RUNNING TESTS ----------------]
Bus error



- joevenzon - 10-14-2007

This is probably because you have a 64-bit system. Alright, try R1854/R104.


- xTs - 10-14-2007

Code:
[---------------- RUNNING TESTS ----------------]
Results: 5 succeeded, 0 failed
[---------------- TESTS FINISHED ---------------]

Ok now.


- cotharyus - 10-14-2007

Not building under OSX - most likely due to my lack of Xcode knowledge. I'll get you errors when I have a minute.


- joevenzon - 10-14-2007

R1855 and R106 implement byte-swapping, so it *should* work on big-endian machines properly, now.


- abs1nth - 10-14-2007

I've added the serialization files to the xcode project but it doesn't compile:


Code:
vdrift/tools/osx/../../include/serialization.h: In member function 'void TEST_FRAMEWORK::TEST_VERTEX::Serialize(TEST_FRAMEWORK::SERIALIZER*)':
vdrift/tools/osx/../../include/serialization.h:598: error: invalid use of undefined type 'struct TEST_FRAMEWORK::SERIALIZER'
vdrift/tools/osx/../../include/serialization.h:588: error: forward declaration of 'struct TEST_FRAMEWORK::SERIALIZER'
vdrift/tools/osx/../../include/serialization.h:599: error: invalid use of undefined type 'struct TEST_FRAMEWORK::SERIALIZER'
vdrift/tools/osx/../../include/serialization.h:588: error: forward declaration of 'struct TEST_FRAMEWORK::SERIALIZER'
vdrift/tools/osx/../../include/serialization.h:600: error: invalid use of undefined type 'struct TEST_FRAMEWORK::SERIALIZER'
vdrift/tools/osx/../../include/serialization.h:588: error: forward declaration of 'struct TEST_FRAMEWORK::SERIALIZER'



- cotharyus - 10-14-2007

Then maybe I do understand the Xcode thing a little better. Because I "added" the file(s) as well, and came up with very much the same thing. And here I thought it was something I was doing.


- alex25 - 10-14-2007

abs1nth Wrote:I've added the serialization files to the xcode project but it doesn't compile:


Code:
vdrift/tools/osx/../../include/serialization.h: In member function 'void TEST_FRAMEWORK::TEST_VERTEX::Serialize(TEST_FRAMEWORK::SERIALIZER*)':
vdrift/tools/osx/../../include/serialization.h:598: error: invalid use of undefined type 'struct TEST_FRAMEWORK::SERIALIZER'
vdrift/tools/osx/../../include/serialization.h:588: error: forward declaration of 'struct TEST_FRAMEWORK::SERIALIZER'
vdrift/tools/osx/../../include/serialization.h:599: error: invalid use of undefined type 'struct TEST_FRAMEWORK::SERIALIZER'
vdrift/tools/osx/../../include/serialization.h:588: error: forward declaration of 'struct TEST_FRAMEWORK::SERIALIZER'
vdrift/tools/osx/../../include/serialization.h:600: error: invalid use of undefined type 'struct TEST_FRAMEWORK::SERIALIZER'
vdrift/tools/osx/../../include/serialization.h:588: error: forward declaration of 'struct TEST_FRAMEWORK::SERIALIZER'

try this patch
Code:
Index: include/serialization.h
===================================================================
--- include/serialization.h     (revision 1856)
+++ include/serialization.h     (working copy)
@@ -585,7 +585,7 @@
{
        class TEST_VERTEX
        {
-       friend class SERIALIZER;
+       friend class ::SERIALIZER;
        public:
                TEST_VERTEX() {}
                TEST_VERTEX(float nx, float ny, float nz) : x(nx),y(ny),z(nz) {}

--alex--


- alex25 - 10-14-2007

and looking at include/serialization.h some more. at line 263, there is the following code:
Code:
if (dataread[0] = '\n')
                        start = 1;
                if (dataread[end-1] = '\n')
                        end--;

shouldn't those ='s be =='s.

--alex--


- joevenzon - 10-14-2007

I checked in alex25's fix to R1857.


- joevenzon - 10-14-2007

alex25 Wrote:shouldn't those ='s be =='s.

Yep! Good catch. I've checked the fix into R1858. This is the great thing about open source software. :-)


- cotharyus - 10-15-2007

still bombing on OS X:
/Projects/vdrift/tools/osx/../../include/serialization.h: In member function 'void TEST_FRAMEWORK::TEST_PLAYER::Serialize(TEST_FRAMEWORK::SERIALIZER*)':
/Projects/vdrift/tools/osx/../../include/serialization.h:648: error: invalid use of undefined type 'struct TEST_FRAMEWORK::SERIALIZER'

etc..


- abs1nth - 10-15-2007

applying alex's fix to line 607 in addition to line 588 makes it compile

commited


- cotharyus - 10-15-2007

indeed:
Version of game: 2007-10-15
Skin name not found in config file...
OGG Vorbis loading: 5/5 = 100% PASS
Performance testing Sample16bit (14ms for 1 second of 44.1khz stereo audio with 32 sources): 1/1 = 100% PASS
Performance testing SampleAndAdvance16bit (8ms for 1 second of 44.1khz stereo audio with 32 sources): 1/1 = 100% PASS
Performance testing SampleAndAdvanceWithPitch16bit (29ms for 1 second of 44.1khz stereo audio with 32 sources): 1/1 = 100% PASS
Performance testing SampleAndAdvanceWithPitch16bit with 1st order filter (50ms for 1 second of 44.1khz stereo audio with 32 sources): 1/1 = 100% PASS
Sound callback testing: 512/512 = 100% PASS
Sound effects testing: 3/3 = 100% PASS
Sound filter testing: 1/2 = 50% FAIL
Sound management testing: 6/6 = 100% PASS
Sound source testing: 3/3 = 100% PASS
Wave loading 44k s16 c2: 5/5 = 100% PASS
TOTAL: 539/540 = 99.8148% FAIL
Drawable filtering: 4/4 = 100% PASS
Scene node and drawable deletion: 4/4 = 100% PASS
Scene node and drawable management: 6/6 = 100% PASS
Transform into and out of local space: 1/1 = 100% PASS
TOTAL: 15/15 = 100% PASS
Pointer/bipointer allocation/deallocation: 13/13 = 100% PASS
TOTAL: 13/13 = 100% PASS
[---------------- RUNNING TESTS ----------------]
Results: 5 succeeded, 0 failed
[---------------- TESTS FINISHED ---------------]