snowcone-ltd / libmatoya

Cross-platform application development.
MIT License
593 stars 53 forks source link

Arch Linux Window Ghosting #111

Open pstoebenau opened 1 year ago

pstoebenau commented 1 year ago

Issue

I was testing this library but I ran into some issues. I get a glitched out screen where it seems that the graphics of the window were not working. I ran 0-minimal, 1-draw, and 2-threaded. I have a windows 11 machine and it works as expected. Any help with this would be appreciated. I would love to start diving into this library.

What I tried

I tested it using OpenGL, Vulkan, and None. I tried enabling and disabling vsync.

Output of neofetch:

image

0-minimal:

image

Result of make in test directory

cc -I../src -O3 -Wall -Wextra -Wno-unused-parameter -Wno-format-overflow -o mty src/test.c ../bin/linux/x86_64/libmatoya.a -lc -lm
[JSON Torture Test] Passed 
[JSON duplication/serialization] Passed 
[JSON UTF-16] Passed 
[MTY_HashCreate] Passed (hashctx != ((void *)0))
[MTY_HashSet (New)] Passed (value == ((void *)0))
[MTY_HashSet (OW)] Passed (value && !strcmp(stringkey, (char *) value))
[MTY_HashGet] Passed (value && !strcmp(stringkey, value))
[MTY_HashSetInt (New)] Passed (value == ((void *)0))
[MTY_HashSetInt (OW)] Passed (value && *(void**)value == intvalue)
[MTY_HashGetInt] Passed (value && value == intvalue)
[MTY_HashGetNextKey (I)] Passed (r): 4294967309
[MTY_HashGetNextKey (S)] Passed (r): 4294967352
[MTY_HashGetNextKeyInt (I)] Passed (r): 4294967309
[MTY_HashGetNextKeyInt (S)] Passed (!r): 4294967352
[MTY_HashPop] Passed (value && !strcmp(stringkey, value))
[MTY_HashPopInt] Passed (value && value == intvalue)
[MTY_HashDestroy] Passed (hashctx == ((void *)0))
[MTY_QueueCreate] Passed (queuectx != ((void *)0))
[MTY_QueueDestroy] Passed (queuectx == ((void *)0))
[MTY_ListCreate] Passed (listctx != ((void *)0))
[MTY_ListGetFirst (Empty)] Passed (node == ((void *)0))
[MTY_ListAppend] Passed (node != ((void *)0))
[MTY_ListRemove] Passed (value && value == intvalue)
[MTY_ListDestroy] Passed (listctx == ((void *)0))
[MTY_GetHostname] Passed (strcmp(hostname, "noname"))
[MTY_GetPlatform] Passed plat > 0: 134217728
[MTY_GetPlatformNoWeb] Passed plat > 0: 134217728
[MTY_IsSupported] Passed (r)
[MTY_GetProcessPath] Passed procpath: /home/patricks/Documents/libmatoya/test/mty
[MTY_GetRunOnStartup] Passed (!r)
[MTY_GetVersionString] Passed verstring: Linux
[MTY_GetVersion] Passed (v == (4 << 8 | 0)): 1024
[MTY_GetTime] Passed (ts > 0): 7746505972
[MTY_Sleep] Passed (100)
[MTY_TimeDiff] Passed (diff >= 99.0f && diff <= 115.0f): 100.08
[MTY_GetDir1] Passed (strlen(get_dir))
[MTY_GetDir2] Passed (strlen(get_dir))
[MTY_GetDir3] Passed (strlen(get_dir))
[MTY_GetDir4] Passed (strlen(cwd))
[MTY_JoinPath] Passed (strlen(full_path) > strlen(origin_file) + strlen(cwd))
[MTY_WriteFile] Passed (MTY_FileExists(full_path))
[MTY_ReadFile] Passed (strlen(g_address_2) == strlen(file_g_address))
file_vfprintf: 'vfprintf' failed with ferror 0
[MTY_AppendTextToFile] Passed (g_address_2[0] == 'a' && g_address_2[1] == 'F')
[MTY_GetPathPrefix] Passed (!strcmp(cwd, prefix))
[MTY_GetFileName] Passed (!strcmp(origin_file, filename))
[MTY_CopyFile] Passed (MTY_FileExists(full_path_2))
[MTY_DeleteFile1] Passed (!MTY_FileExists(full_path))
MTY_DeleteFile: 'remove' failed with errno 2
[MTY_DeleteFile2] Passed (!MTY_DeleteFile(full_path))
[MTY_MoveFile1] Passed (MTY_MoveFile(full_path_2, full_path))
[MTY_MoveFile2] Passed (MTY_FileExists(full_path))
[MTY_MoveFile3] Passed (!MTY_FileExists(full_path_2))
MTY_MoveFile: 'rename' failed with errno 2
[MTY_MoveFile4] Passed (!MTY_MoveFile(full_path_2, full_path))
[MTY_MoveFile5] Passed (MTY_FileExists(full_path))
[MTY_MoveFile6] Passed (!MTY_FileExists(full_path_2))
[MTY_FileList] Passed (!failed)
[MTY_FreeFileList] Passed (!list)
[MTY_Mkdir] Passed (MTY_FileExists(full_path))
[MTY_Free] Passed (!failed)
[MTY_FreeAligned] Passed (!failed)
[MTY_Alloc] Passed (!failed)
[MTY_AllocAligned] Passed (!failed)
[MTY_Realloc] Passed (!failed)
[MTY_Dup] Passed (!failed)
[MTY_Strdup] Passed (dup_str[127] == '\0')
[MTY_Strcat] Passed (dup_str[127] == '\0')
[MTY_Strcasecmp] Passed (cmp == 0)
[MTY_SwapToBE16] Passed (u16_a != u16_b)
[MTY_SwapToBE32] Passed (u32_a != u32_b)
[MTY_SwapToBE64] Passed (u32_a != u32_b)
[MTY_SwapFromBE16] Passed (u16_a == u16_b)
[MTY_SwapFromBE32] Passed (u32_a == u32_b)
[MTY_SwapFromBE64] Passed (u32_a == u32_b)
[MTY_Swap16] Passed (u16_a != u16_b)
[MTY_Swap32] Passed (u32_a != u32_b)
[MTY_Swap64] Passed (u32_a != u32_b)
[MTY_MultiToWide] Passed (!failed)
[MTY_MultiToWideD] Passed (!failed)
[MTY_SprintfD] Passed cmp_val == 0: 42
[MTY_SprintfD] Passed cmp_val == 0: -42
[MTY_SprintfD] Passed cmp_val == 0:    42
[MTY_SprintfD] Passed cmp_val == 0:   -42
[MTY_SprintfD] Passed cmp_val == 0:              42
[MTY_SprintfD] Passed cmp_val == 0:             -42
[MTY_SprintfD] Passed cmp_val == 0:             -42
[MTY_SprintfD] Passed cmp_val == 0:         -42.987
[MTY_SprintfD] Passed cmp_val == 0:          42.987
[MTY_SprintfD] Passed cmp_val == 0: Hello testing
[MTY_SprintfD] Passed cmp_val == 0: 1024
[MTY_SprintfD] Passed cmp_val == 0: -1024
[MTY_SprintfD] Passed cmp_val == 0: 1024
[MTY_SprintfD] Passed cmp_val == 0: -1024
[MTY_SprintfD] Passed cmp_val == 0: 1024
[MTY_SprintfD] Passed cmp_val == 0: 4294966272
[MTY_SprintfD] Passed cmp_val == 0: 777
[MTY_SprintfD] Passed cmp_val == 0: 37777777001
[MTY_SprintfD] Passed cmp_val == 0: 1234abcd
[MTY_SprintfD] Passed cmp_val == 0: edcb5433
[MTY_SprintfD] Passed cmp_val == 0: 1234ABCD
[MTY_SprintfD] Passed cmp_val == 0: EDCB5433
[MTY_SprintfD] Passed cmp_val == 0: x
[MTY_SprintfD] Passed cmp_val == 0: +42
[MTY_SprintfD] Passed cmp_val == 0: -42
[MTY_SprintfD] Passed cmp_val == 0:   +42
[MTY_SprintfD] Passed cmp_val == 0:   -42
[MTY_SprintfD] Passed cmp_val == 0:             +42
[MTY_SprintfD] Passed cmp_val == 0:             -42
[MTY_SprintfD] Passed cmp_val == 0: Hello testing
[MTY_SprintfD] Passed cmp_val == 0: +1024
[MTY_SprintfD] Passed cmp_val == 0: -1024
[MTY_SprintfD] Passed cmp_val == 0: +1024
[MTY_SprintfD] Passed cmp_val == 0: -1024
[MTY_SprintfD] Passed cmp_val == 0: 1024
[MTY_SprintfD] Passed cmp_val == 0: 4294966272
[MTY_SprintfD] Passed cmp_val == 0: 777
[MTY_SprintfD] Passed cmp_val == 0: 37777777001
[MTY_SprintfD] Passed cmp_val == 0: 1234abcd
[MTY_SprintfD] Passed cmp_val == 0: edcb5433
[MTY_SprintfD] Passed cmp_val == 0: 1234ABCD
[MTY_SprintfD] Passed cmp_val == 0: EDCB5433
[MTY_SprintfD] Passed cmp_val == 0: x
[MTY_SprintfD] Passed cmp_val == 0: +
[MTY_SprintfD] Passed cmp_val == 0: 42
[MTY_SprintfD] Passed cmp_val == 0: 42
[MTY_SprintfD] Passed cmp_val == 0: -42
[MTY_SprintfD] Passed cmp_val == 0: 00042
[MTY_SprintfD] Passed cmp_val == 0: -0042
[MTY_SprintfD] Passed cmp_val == 0: 000000000000042
[MTY_SprintfD] Passed cmp_val == 0: -00000000000042
[MTY_SprintfD] Passed cmp_val == 0: 000000000042.12
[MTY_SprintfD] Passed cmp_val == 0: 00000000042.988
[MTY_SprintfD] Passed cmp_val == 0: -00000042.98760
[MTY_SprintfD] Passed cmp_val == 0: 42
[MTY_SprintfD] Passed cmp_val == 0: -42
[MTY_SprintfD] Passed cmp_val == 0: 42   
[MTY_SprintfD] Passed cmp_val == 0: -42  
[MTY_SprintfD] Passed cmp_val == 0: 42             
[MTY_SprintfD] Passed cmp_val == 0: -42            
[MTY_SprintfD] Passed cmp_val == 0: 42
[MTY_SprintfD] Passed cmp_val == 0: -42
[MTY_SprintfD] Passed cmp_val == 0: 42   
[MTY_SprintfD] Passed cmp_val == 0: -42  
[MTY_SprintfD] Passed cmp_val == 0: 42             
[MTY_SprintfD] Passed cmp_val == 0: -42            
[MTY_SprintfD] Passed cmp_val == 0: 42
[MTY_SprintfD] Passed cmp_val == 0: -42
[MTY_SprintfD] Passed cmp_val == 0: 42   
[MTY_SprintfD] Passed cmp_val == 0: -42  
[MTY_SprintfD] Passed cmp_val == 0: 42             
[MTY_SprintfD] Passed cmp_val == 0: -42            
[MTY_SprintfD] Passed cmp_val == 0: 00000000000000001024
[MTY_SprintfD] Passed cmp_val == 0: -0000000000000001024
[MTY_SprintfD] Passed cmp_val == 0: 00000000000000001024
[MTY_SprintfD] Passed cmp_val == 0: -0000000000000001024
[MTY_SprintfD] Passed cmp_val == 0: 00000000000000001024
[MTY_SprintfD] Passed cmp_val == 0: 00000000004294966272
[MTY_SprintfD] Passed cmp_val == 0: 00000000000000000777
[MTY_SprintfD] Passed cmp_val == 0: 00000000037777777001
[MTY_SprintfD] Passed cmp_val == 0: 0x00000000001234abcd
[MTY_SprintfD] Passed cmp_val == 0: 0x0000000000edcb5433
[MTY_SprintfD] Passed cmp_val == 0: 0X00000000001234ABCD
[MTY_SprintfD] Passed cmp_val == 0: 0X0000000000EDCB5433
[MTY_LogFunc(Short)] Passed msg != ((void *)0) && strlen(msg)
[MTY_LogFunc(Long)] Passed msg != ((void *)0) && strlen(msg)
[MTY_GetLog] Passed (last_log != ((void *)0) && strlen(last_log))
[MTY_DisableLog(off)] Passed msg != ((void *)0) && strlen(msg)
[CRC32 1] Passed crc == 0xcbf43926: "123456789"
[CRC32 2] Passed crc == 0x414FA339: "The quick brown fox jumps over the lazy dog"
[CRC32 3] Passed crc == 0x00000000: ""
[CRC32 1] Passed crc == 0x35cdbb82: "123456789"
[CRC32 2] Passed crc == 0x34cc38de: "The quick brown fox jumps over the lazy dog"
[CRC32 3] Passed crc == 0x00001505: ""
[SHA1("abc")] Passed strcmp_v == 0: "a9993e364706816aba3e25717850c26c9cd0d89d"
[SHA1("")] Passed strcmp_v == 0: "da39a3ee5e6b4b0d3255bfef95601890afd80709"
[SHA1("abcdbcde...")] Passed strcmp_v == 0: "84983e441c3bd26ebaae4aa1f95129e5e54670f1"
[SHA1("abcdefgh...")] Passed strcmp_v == 0: "a49b2446a02c645bf419f995b67091253a04a259"
[SHA1("aaaaaaaa...")] Passed strcmp_v == 0: "34aa973cd4c4daa4f61eeb2bdbad27316534016f"
[SHA256("abc")] Passed strcmp_v == 0: "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad"
[SHA256("")] Passed strcmp_v == 0: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
[SHA256("abcdbc...")] Passed strcmp_v == 0: "248d6a61d20638b8e5c026930c3e6039a33ce45964ff2167f6ecedd419db06c1"
[SHA256("abcdef...")] Passed strcmp_v == 0: "cf5b16a778af8380036ce59e7b0492370b249b11e8f07a51afac45037afee9d1"
[SHA256("aaaaaa...")] Passed strcmp_v == 0: "cdc76e5c9914fb9281a1c7e284d73e67f1809a48a497200e046d39ccc7112cd0"
[SHA256("48692054686] Passed strcmp_v == 0: "b0344c61d8db38535ca8afceaf0bf12b881dc200c9833da726e9376c2e32cff7"
[SHA256("77686174206] Passed strcmp_v == 0: "5bdcc146bf60754e6a042426089575c75a003f089d2739839dec58b964ec3843"
[SHA256("ddddddddddd] Passed strcmp_v == 0: "773ea91e36800e46854db8ebd09181a72959098b3ef8c122d9635514ced565fe"
[SHA256("cdcdcdcdcdc] Passed strcmp_v == 0: "82558a389a443c0ea4cc819899f2083a85f0faa3e578f8077a2e3ff46729665b"
[SHA256("54657374205] Passed strcmp_v == 0: "60e431591ee0b67f0d8a26aacbf5b77f8e0bc6213728c5140546040f0ee37f54"
[SHA256("54686973206] Passed strcmp_v == 0: "9b09ffa71b942fcb27635fbcd5b0e944bfdc63644f0713938a7f51535c3a35e2"
[Dist Small] Passed ds >= 0.0035 && ds <= 0.0045: 0.0037
[Dist Large] Passed dl >= 0.0035 && dl <= 0.0045: 0.0041
[Dist Small] Passed ds >= 0.0035 && ds <= 0.0045: 0.0037
[Dist Large] Passed dl >= 0.0035 && dl <= 0.0045: 0.0041
[MTY_AESGCMCreate] Passed (aes1 != ((void *)0))
[MTY_AESGCMDecrypt] Passed (ok)
MTY_AESGCMDecrypt: 'EVP_DecryptFinal_ex' failed with error 0
[MTY_AESGCMDecrypt] Passed (!ok)
MTY_AESGCMDecrypt: 'EVP_DecryptFinal_ex' failed with error 0
[MTY_AESGCMDecrypt] Passed (!ok)
MTY_AESGCMDecrypt: 'EVP_DecryptFinal_ex' failed with error 0
[MTY_AESGCMDecrypt] Passed (!ok)
[MTY_AESGCMDecrypt] Passed (ok)
[MTY_AESGCMCreate] Passed (aes1 != ((void *)0))
MTY_AESGCMDecrypt: 'EVP_DecryptFinal_ex' failed with error 0
[MTY_AESGCMDestroy] Passed (aes1 == ((void *)0))
[MTY_AESGCMDecrypt] Passed (cmp_decr == 0)
[MTY_AESGCMEncrypt] Passed (cmp_encr_1 != 0)
[MTY_AESGCMEncrypt] Passed (cmp_encr_2 != 0)
[MTY_AESGCMEncrypt] Passed (cmp_encr_3 != 0)
[MTY_CondCreate] Passed (data.cond != ((void *)0))
[MTY_Mutex counter] Passed (data.counter == 100)
[MTY_Mutex counter] Passed (data.counter == 100)
[MTY_CondDestroy] Passed (data.cond == ((void *)0))
[MTY_MutexCreate] Passed (data.mutex != ((void *)0))
[MTY_Mutex counter] Passed (data.counter == 0)
[MTY_Mutex counter] Passed (data.counter == 100)
[MTY_MutexTryLock] Passed (MTY_MutexTryLock(data.mutex))
[MTY_MutexTryLock] Passed (MTY_MutexTryLock(data.mutex))
[MTY_MutexDestroy] Passed (data.mutex == ((void *)0))
[MTY_ThreadCreate] Passed (t_test != ((void *)0))
[MTY_Thread executed] Passed (data.executed)
[MTY_ThreadDestroy] Passed (t_test == ((void *)0))
[MTY_Thread executed] Passed (!data.executed)
[MTY_Thread executed] Passed (data.executed)
[MTY_ThreadPoolCreate] Passed (data.pool != ((void *)0))
[MTY_Atomic32Get] Passed (MTY_Atomic32Get(&data.atomic_32) == 100)
[MTY_ThreadPoolDestroy] Passed (data.pool == ((void *)0))
[MTY_Atomic32Get] Passed (MTY_Atomic32Get(&data.atomic_32_detach) == 100)
[MTY_RWLockCreate] Passed (data.rw_lock != ((void *)0))
[MTY_RWLock write counter] Passed (data.counter == 0)
[MTY_RWLock write counter] Passed (data.counter == 0)
[MTY_RWLock write counter] Passed (data.counter == 100)
[MTY_RWLock read counter] Passed data.counter == 0: 0
[MTY_RWLock read counter] Passed data.counter == 0: 0
[MTY_RWLock counter] Passed (data.counter == 100)
[MTY_RWTryLockReader] Passed (MTY_RWTryLockReader(data.rw_lock))
[MTY_RWTryLockReader] Passed (MTY_RWTryLockReader(data.rw_lock))
[MTY_RWTryLockReader] Passed (MTY_RWTryLockReader(data.rw_lock))
[MTY_RWLockDestroy] Passed (data.rw_lock == ((void *)0))
[MTY_WaitableCreate] Passed (data.wait != ((void *)0))
[MTY_Atomic32Get] Passed (MTY_Atomic32Get(&data.atomic_32) == 100)
[MTY_WaitableDestroy] Passed (data.wait == ((void *)0))
[MTY_WebSocketConnect] Failed (ws != ((void *)0))
make: *** [GNUmakefile:37: test] Error 1
chrisd1100 commented 11 months ago

This is likely some issue with back buffer clearing -- it wasn't able to draw the image in 1-draw? Perhaps it's a graphics driver issue, are other 3D applications working as expected?