Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bucket system issues #111

Closed
Buom01 opened this issue Mar 22, 2020 · 4 comments
Closed

Bucket system issues #111

Buom01 opened this issue Mar 22, 2020 · 4 comments

Comments

@Buom01
Copy link
Member

Buom01 commented Mar 22, 2020

Hi,
I notice that there are a persistent critical error with the new bucket system,
Step to reproduce:

  1. git clone https://github.com/GrangerHub/tremulous
  2. make debug
    2.1. maybe you will need to patch curl path in src/client/cl_curl.h line 29 to compile: replace it to #include "../../external/libcurl-7.35.0/curl/curl.h" . (I will patch it with Controls update and joystick/gamepad #110)
  3. copy data-1.1.0.pk3 and data-gpp1.pk3
  4. ./build/debug-linux-x86_64/tremulous
  5. Observe (with incessant restart)
********************
ERROR: Q_strncpyz: NULL src
********************

My way to found that it come from bucket system:

  1. Edit q_shared.c, line 771
	if ( !src ) {
		Com_Printf("NULL src, but dest is %s\n", dest ? dest : "undefined");
		strncpy( dest, "_epicfail", destsize-1 );
		dest[destsize-1] = 0;
		// Com_Error( ERR_FATAL, "Q_strncpyz: NULL src" );
		return;
	}
  1. make debug && ./build/debug-linux-x86_64/tremulous
  2. Open console and type ui_mainMenuSelectedMusic
  3. Observe
]/ui_mainMenuSelectedMusic
"ui_mainMenuSelectedMusic" is:"_epicfail^7" default:"^7"

Moreover there are some important warnings (In french, sorry):

CXX src/qcommon/common.cpp
src/qcommon/common.cpp: Dans la fonction « void* Z_PlaceHolderAlloc(int) »:
src/qcommon/common.cpp:3674:1: attention: « return » manquant dans une fonction devant retourner une valeur [-Wreturn-type]
 3674 | }
      | ^
src/qcommon/common.cpp: Dans la fonction « unsigned int Com_Bucket_Create_Bucket() »:
src/qcommon/common.cpp:3678:1: attention: « return » manquant dans une fonction devant retourner une valeur [-Wreturn-type]
 3678 | }
      | ^
src/qcommon/common.cpp: Dans la fonction « void* Com_Bucket_Select_A_Random_Item(unsigned int) »:
src/qcommon/common.cpp:3701:1: attention: « return » manquant dans une fonction devant retourner une valeur [-Wreturn-type]
 3701 | }
      | ^

Information; using the release build do the same error

@Buom01
Copy link
Member Author

Buom01 commented Mar 31, 2020

Closed thanks to 798ad46

@Buom01 Buom01 closed this as completed Mar 31, 2020
@Buom01
Copy link
Member Author

Buom01 commented Oct 15, 2020

Hi,
I just noticed that 798ad46 is still not present on 'master' branch. Is it intended ?
As shown here: https://github.com/GrangerHub/tremulous/blob/master/src/game/bg_misc.c#L4007

@dGr8LookinSparky
Copy link

It looks like I committed that on the new file system branch/pullrequest, which we didn't merge in yet (still have to do some testing server side). I may not have time to properly test the server side aspect of the new file system for a couple more weeks. @Buom01 , if you would like, feel free to setup a server using that branch ( https://github.com/dGr8LookinSparky/tremulous/tree/filesystem ) and let us know if you find any issues. That would save us some time. We have tested the client aspect of the new file system, and from what I have seen so far it works great, this is definitely something I want to get merged in.

@Buom01
Copy link
Member Author

Buom01 commented Oct 15, 2020

OK.
Currently I only seen that my compiled Windows binary (compiled with docker) fail silently (from server branch, with a copy of your bucket system fix that I want to remove to keep yours). It doesn't contain new FileSystem as I know.

So I tested yours binary on WineHQ this time. It seem that v1.3.0-alpha.0.14.10 works perfectly but, v1.3.0-alpha.0.14.11 fail silently too.
I hate coding on Windows, but I my current server absolutely need the client since my TeamStatus patch, so I will look deeper into common commit across theses binaries.

I'm thinking about the idea of making softer error for unhanded system call trap which could allow older client to use new QVM as currently I have some new call in my QVM and making it compatible just to allow player to play sound complicated.
But anything else like an auto-updating launcher sound better. I already started a non published project to launch all. I wait a little before continuing (like stability of Stellar-Prey, time to deep into new file system, ......)

I didn't known that gdb is able to run Windows binary, but seem to work as it output the same address as WineHQ does

#0  ___chkstk_ms () at /build/mingw-w64-gcc/src/gcc/libgcc/config/i386/cygwin.S:126
#1  0x000000000040ba1b in Con_CheckResize () at src/client/cl_console.cpp:323
#2  0x000000000040c6b0 in CL_ConsolePrint (txt=0x31e7a0 "Have SSE support\n")
    at src/client/cl_console.cpp:546
#3  0x000000000043f1c6 in Com_Printf (
    fmt=0x7015eb <color_definitions+4363> "Have SSE support\n")
    at src/qcommon/common.cpp:195
#4  0x0000000000443154 in Com_DetectSSE () at src/qcommon/common.cpp:2613
#5  0x000000000044320d in Com_Init (commandLine=0x31f8a0 "") at src/qcommon/common.cpp:2679
#6  0x000000000049a031 in SDL_main (argc=1, argv=0x6cd48e0) at src/sys/sys_main.cpp:761
#7  0x00000000005a1610 in main_utf8 (argv=0x6cd48e0, argc=<optimized out>)
    at src/main/windows/SDL_windows_main.c:126
#8  WinMain (hInst=<optimized out>, hPrev=hPrev@entry=0x0, szCmdLine=<optimized out>, 
    sw=<optimized out>) at src/main/windows/SDL_windows_main.c:189
#9  0x00000000006ecfa2 in main (flags=<optimized out>, cmdline=<optimized out>, 
    inst=<optimized out>)
    at /build/mingw-w64-crt/src/mingw-w64-v7.0.0/mingw-w64-crt/crt/crt0_c.c:18
#10 0x00000000004013b1 in __tmainCRTStartup ()
    at /build/mingw-w64-crt/src/mingw-w64-v7.0.0/mingw-w64-crt/crt/crtexe.c:339
#11 0x00000000004014cb in WinMainCRTStartup ()
    at /build/mingw-w64-crt/src/mingw-w64-v7.0.0/mingw-w64-crt/crt/crtexe.c:195

Talking about it in #116

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants