Symulator EU07 (i nie tylko) > Na warsztacie

 Natywny build MacOS

<< < (2/4) > >>

Czarodziej:
Dobry wieczór, odgrzewam kotleta.
Rewizja 98050176 (najnowsza z oficjalnego GitHuba Maszyny, o ile można tak to nazwać).
Buduję tak:

--- Kod: ---build % cmake -DWITH_LUA=false -DWITH_OPENVR=false -DCMAKE_BUILD_TYPE=Release -DPYTHON_LIBRARY=$(python-config --prefix)/lib/libpython2.7.a -DPYTHON_INCLUDE_DIRS=$(python-config --prefix)/include/python2.7 -DOPENAL_INCLUDE_DIR=/opt/homebrew/Cellar/openal-soft/1.22.2/include -DOPENAL_LIBRARY=/opt/homebrew/Cellar/openal-soft/1.22.2/lib/libopenal.dylib ..
make -j20
--- Koniec kodu ---
Kompilator: Apple clang version 13.1.6 (clang-1316.0.21.2.5)
Target: arm64-apple-darwin21.5.0
Zależności dla cmake zainstalowałem z homebrew.
Starożytnego pythona 2.7 zainstalowałem pyenvem, skopiowałem do katalogu z grą i nazwałem macpython64. Symulator się o dziwo uruchamia, FPS jak na kalkulatorze, od 7 do 12. Załączam logi z uruchomienia toru testowego i Zwierzyńca. Poważniejszych nawet nie próbowałem.

Milek7:
Nie zainstalowałeś pillow do katalogu pythona, nie będą ci działać ekrany.
Co do wydajności niestety renderer shaderowy jakoś się gryzie z tą implementacją OpenGL. Na legacy jest dużo lepiej, ale żeby legacy się odpaliło musisz mieć nowszą wersję.
Najnowsza wersja jest tu: https://github.com/Milek7/maszyna/tree/sim
Na azure budują się też binarki, myślę że też powinny działać.

Czarodziej:
Rzeczywiscie, na legacy z twojej gałęzi włącza się, jest dużo FPS, ale wszystko jest czarne. Dasz link do buildów na Azure?

-- Edit
Po zainstalowaniu Pillow dostaję segfault

--- Kod: ----------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Process:               eu07mac.exe [92801]
Path:                  /Users/USER/*/eu07mac.exe
Identifier:            eu07mac.exe
Version:               ???
Code Type:             ARM-64 (Native)
Parent Process:        launchd [1]
Responsible:           Terminal [28384]
User ID:               501

Date/Time:             2022-07-06 13:13:51.2257 +0200
OS Version:            macOS 12.4 (21F79)
Report Version:        12
Anonymous UUID:        CD285B66-886C-7E9B-3D5A-DE9D1255DD4A

Sleep/Wake UUID:       AFCA71DD-5CA5-4BFA-81D5-B32965CA0502

Time Awake Since Boot: 64000 seconds
Time Since Wake:       7805 seconds

System Integrity Protection: enabled

Crashed Thread:        6

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000000
Exception Codes:       0x0000000000000001, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Reason:    Namespace SIGNAL, Code 11 Segmentation fault: 11
Terminating Process:   exc handler [92801]

VM Region Info: 0 is not in any region.  Bytes before following region: 4294967296
      REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      UNUSED SPACE AT START
---> 
      __TEXT                      100000000-100494000    [ 4688K] r-x/r-x SM=COW  ...*/eu07mac.exe

Thread 0::  Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib               0x182556a90 __write_nocancel + 8
1   libsystem_c.dylib                     0x1824845b0 __swrite + 24
2   libsystem_c.dylib                     0x182463444 _swrite + 108
3   libsystem_c.dylib                     0x18246156c __sflush + 232
4   libsystem_c.dylib                     0x18246140c fflush + 36
5   libc++.1.dylib                       0x1824fd958 std::__1::basic_filebuf<char, std::__1::char_traits<char> >::sync() + 328
6   libc++.1.dylib                       0x1824ee324 std::__1::basic_ostream<char, std::__1::char_traits<char> >::flush() + 144
7   eu07mac.exe                           0x1000e7d28 WriteLog(char const*, logtype) + 528
8   eu07mac.exe                           0x1000cbe00 event_manager::AddToQuery(basic_event*, TDynamicObject const*, double) + 384
9   eu07mac.exe                           0x1000cbb94 multi_event::run_() + 116
10  eu07mac.exe                           0x1000c55f0 basic_event::run() + 272
11  eu07mac.exe                           0x1000d292c event_manager::update() + 176
12  eu07mac.exe                           0x1001c1308 driver_mode::update() + 884
13  eu07mac.exe                           0x1001ba610 eu07_application::run() + 696
14  eu07mac.exe                           0x1000c182c main + 328
15  dyld                                 0x10067108c start + 520

Thread 1:
0   libsystem_pthread.dylib               0x18258b078 start_wqthread + 0

Thread 2:
0   libsystem_pthread.dylib               0x18258b078 start_wqthread + 0

Thread 3:: com.apple.NSEventThread
0   libsystem_kernel.dylib               0x1825528b0 mach_msg_trap + 8
1   libsystem_kernel.dylib               0x182552d20 mach_msg + 76
2   CoreFoundation                       0x18265d2b0 __CFRunLoopServiceMachPort + 372
3   CoreFoundation                       0x18265b760 __CFRunLoopRun + 1180
4   CoreFoundation                       0x18265ab24 CFRunLoopRunSpecific + 600
5   AppKit                               0x18532e374 _NSEventThread + 196
6   libsystem_pthread.dylib               0x18259026c _pthread_start + 148
7   libsystem_pthread.dylib               0x18258b08c thread_start + 8

Thread 4:: AMCP Logging Spool
0   libsystem_kernel.dylib               0x1825528ec semaphore_wait_trap + 8
1   caulk                                 0x18affea2c caulk::mach::semaphore::wait_or_error() + 28
2   caulk                                 0x18afe27ac caulk::concurrent::details::worker_thread::run() + 56
3   caulk                                 0x18afe23cc void* caulk::thread_proxy<std::__1::tuple<caulk::thread::attributes, void (caulk::concurrent::details::worker_thread::*)(), std::__1::tuple<caulk::concurrent::details::worker_thread*> > >(void*) + 96
4   libsystem_pthread.dylib               0x18259026c _pthread_start + 148
5   libsystem_pthread.dylib               0x18258b08c thread_start + 8

Thread 5:: com.apple.audio.IOThread.client
0   libsystem_kernel.dylib               0x1825528b0 mach_msg_trap + 8
1   libsystem_kernel.dylib               0x182552d20 mach_msg + 76
2   CoreAudio                             0x1842a1ef4 HALB_MachPort::SendSimpleMessageWithSimpleReply(unsigned int, unsigned int, int, int&, bool, unsigned int) + 104
3   CoreAudio                             0x18412f238 HALC_ProxyIOContext::IOWorkLoop() + 3396
4   CoreAudio                             0x18412defc invocation function for block in HALC_ProxyIOContext::HALC_ProxyIOContext(unsigned int, unsigned int) + 100
5   CoreAudio                             0x1842fa304 HALB_IOThread::Entry(void*) + 88
6   libsystem_pthread.dylib               0x18259026c _pthread_start + 148
7   libsystem_pthread.dylib               0x18258b08c thread_start + 8

Thread 6 Crashed:
0   ???                                           0x0 ???
1   eu07mac.exe                           0x10015679c python_taskqueue::run(GLFWwindow*, threading::lockable<std::__1::deque<render_task*, std::__1::allocator<render_task*> > >&, threading::lockable<std::__1::deque<render_task*, std::__1::allocator<render_task*> > >&, threading::condition_variable&, std::__1::atomic<bool>&) + 332
2   eu07mac.exe                           0x100157ed0 void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (python_taskqueue::*)(GLFWwindow*, threading::lockable<std::__1::deque<render_task*, std::__1::allocator<render_task*> > >&, threading::lockable<std::__1::deque<render_task*, std::__1::allocator<render_task*> > >&, threading::condition_variable&, std::__1::atomic<bool>&), python_taskqueue*, GLFWwindow*, std::__1::reference_wrapper<threading::lockable<std::__1::deque<render_task*, std::__1::allocator<render_task*> > > >, std::__1::reference_wrapper<threading::lockable<std::__1::deque<render_task*, std::__1::allocator<render_task*> > > >, std::__1::reference_wrapper<threading::condition_variable>, std::__1::reference_wrapper<std::__1::atomic<bool> > > >(void*) + 72
3   libsystem_pthread.dylib               0x18259026c _pthread_start + 148
4   libsystem_pthread.dylib               0x18258b08c thread_start + 8

Thread 7:
0   libsystem_pthread.dylib               0x18258b078 start_wqthread + 0


Thread 6 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000de1   x1: 0x0000000000000de1   x2: 0x0000000000002801   x3: 0x00000001701ceefc
    x4: 0x0000000000000001   x5: 0x0000000000000020   x6: 0x00000001701ced2c   x7: 0x00000001701ced24
    x8: 0x0000000000000000   x9: 0x0000000000002703  x10: 0x000000000000000a  x11: 0x000000000000000f
   x12: 0x0000000000000058  x13: 0x0000000000000001  x14: 0xffffffffffffffff  x15: 0x0000000000000000
   x16: 0x00000001e3e8c4bc  x17: 0x00000001e3e8c158  x18: 0x0000000000000000  x19: 0x00006000003aa440
   x20: 0x00000001004e0198  x21: 0x00000001004e3648  x22: 0x00000001004e35d8  x23: 0x0000000100ca9770
   x24: 0x00000001004e3510  x25: 0x0000600003508160  x26: 0x00000001004e3678  x27: 0x00000001004e3608
   x28: 0x00006000003aa440   fp: 0x00000001701cef30   lr: 0x0000000100155cfc
    sp: 0x00000001701cef10   pc: 0x0000000000000000 cpsr: 0x60001000
   far: 0x0000000000000000  esr: 0x82000006 (Instruction Abort) Translation fault
-- ciach ---

--- Koniec kodu ---

-- Edit 2
Wygląda na to, że przez chwilę obraz wygląda w miarę normalnie, a po chwili wszystko robi się ciemne, czarne.

-- Edit 3
I dzieje się tak dlatego, że jakaś lokomotywa na scenerii włącza jakiekolwiek światło. W załącznikach ten efekt na torze testowym.
Da się coś z tym zrobić?

-- Edit 4
Znalazłem Azure: https://dev.azure.com/milek7/maszyna/_build, exe stamtąd nie działa, mam aktualnego macOSa, Apple już jakiś czas temu usunęło Pythona 2.7 z systemu

--- Kod: ---dyld[59793]: Library not loaded: /System/Library/Frameworks/Python.framework/Versions/2.7/Python
  Referenced from: /Volumes/Samsung_T5/gry/MaSzyna/eu07milek.exe
  Reason: tried: '/System/Library/Frameworks/Python.framework/Versions/2.7/Python' (no such file), '/Library/Frameworks/Python.framework/Versions/2.7/Python' (no such file)
--- Koniec kodu ---

Milek7:
Hmm. To znowu jakiś problem z GLem, podobnie jak bywało na intelach.

Zrobiłem zmiany:
Dodałem parametr do wyłączania pythona przy kompilacji, żeby nie przeszkadzał przy testach.
Dozwolona jest wartość 0 dla parametru dynamiclights. Świateł nie ma, ale chociaż tyle że nie ma ciemnicy.

Czarodziej:
Dziękuję. Dałem na 0 i nie zapada zmrok po włączeniu świateł. Zmiana z Pythonem jest chyba zbędna, nie doprecyzowałem, że tak się zaczęło robić, jak doinstalowałem Pillow. Zmieniłem tymczasowo nazwę modułu i nie ma segfaulta. Jak będę miał nieco więcej czasu, to spróbuję przejechać jakiś większy scenariusz i zobaczę, jak się w ogóle to exe sprawuje.

Czy istnieje jakakolwiek szansa na znalezienie problemu z wydajnością na kartach innych niż NVidia? Trochę przeszukałem forum i ludzie z całkiem poważnymi Radeonami też narzekają na wydajność i jeżdżą na "legacy".

-- Edit
No nie wyszło najlepiej :D

--- Kod: ---Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   eu07mac.exe                           0x1001617e4 audio::openal_source& audio::openal_source::bind<std::__1::__wrap_iter<unsigned long*> >(sound_source*, std::__1::vector<unsigned int, std::__1::allocator<unsigned int> >, std::__1::__wrap_iter<unsigned long*>, std::__1::__wrap_iter<unsigned long*>) + 408
1   eu07mac.exe                           0x1001617cc audio::openal_source& audio::openal_source::bind<std::__1::__wrap_iter<unsigned long*> >(sound_source*, std::__1::vector<unsigned int, std::__1::allocator<unsigned int> >, std::__1::__wrap_iter<unsigned long*>, std::__1::__wrap_iter<unsigned long*>) + 384
2   eu07mac.exe                           0x10016145c void audio::openal_renderer::insert<std::__1::__wrap_iter<unsigned long*> >(std::__1::__wrap_iter<unsigned long*>, std::__1::__wrap_iter<unsigned long*>, sound_source*, std::__1::vector<unsigned int, std::__1::allocator<unsigned int> >) + 152
3   eu07mac.exe                           0x10015e59c void sound_source::insert<std::__1::__wrap_iter<unsigned int*> >(std::__1::__wrap_iter<unsigned int*>, std::__1::__wrap_iter<unsigned int*>) + 812
4   eu07mac.exe                           0x10015db48 sound_source::play_basic() + 244
5   eu07mac.exe                           0x1000b6a34 TDynamicObject::powertrain_sounds::render(TMoverParameters const&, double) + 3252
6   eu07mac.exe                           0x1000b4074 TDynamicObject::RenderSounds() + 204
7   eu07mac.exe                           0x10001dad4 TTrack::RenderDynSounds() + 96
8   eu07mac.exe                           0x100198ea8 scene::basic_region::update_sounds() + 280
9   eu07mac.exe                           0x1001bd97c driver_mode::update() + 1100
10  eu07mac.exe                           0x1001b6bac eu07_application::run() + 696
11  eu07mac.exe                           0x1000c1830 main + 328
12  dyld                                 0x10067108c start + 520

--- Koniec kodu ---
Spróbuję dodać tam jakieś logowanie, zobaczę, co się dzieje.

Nawigacja

[0] Indeks wiadomości

[#] Następna strona

[*] Poprzednia strona

Idź do wersji pełnej
Powered by Advanced Topic Prefix Pro
Powered by SMFPacks Likes Pro Mod