Ошибка "Sdl.SDL_Init (Sdl.SDL_INIT_EVERYTHING);"при попытке запустить приложение с Mono (Mac OS) - PullRequest
0 голосов
/ 26 октября 2018

Я создаю приложение на C # для института, проблема в том, что я использую Mac и использую Mono для разработки приложения.

Это приложение должно читать некоторые DLL-файлы, в которых говоритсяон не может найти.

Каждый раз, когда я запускаю приложение, я получаю сообщение об ошибке System.DllNotFoundException, и если я запускаю его из консоли, появляется сообщение:

Unhandled Exception:
System.DllNotFoundException: SDL
  at (wrapper managed-to-native) Tao.Sdl.Sdl.__SDL_Init(int)
  at Tao.Sdl.Sdl.SDL_Init (System.Int32 flags) [0x0004f] in <972d5c5bca2f41cfb37254230540a96a>:0 
  at SdlHardware.Init (System.Int16 w, System.Int16 h, System.Int32 colors, System.Boolean fullScreen) [0x00020] in <141a1af9b0a44e5e8272d4a405970f55>:0 
  at GalaxianSDL.Main (System.String[] args) [0x00001] in <141a1af9b0a44e5e8272d4a405970f55>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: SDL
  at (wrapper managed-to-native) Tao.Sdl.Sdl.__SDL_Init(int)
  at Tao.Sdl.Sdl.SDL_Init (System.Int32 flags) [0x0004f] in <972d5c5bca2f41cfb37254230540a96a>:0 
  at SdlHardware.Init (System.Int16 w, System.Int16 h, System.Int32 colors, System.Boolean fullScreen) [0x00020] in <141a1af9b0a44e5e8272d4a405970f55>:0 
  at GalaxianSDL.Main (System.String[] args) [0x00001] in <141a1af9b0a44e5e8272d4a405970f55>:0

вывод "MONO_LOG_LEVEL = debug":

Mono: Config attempting to parse: '/Library/Frameworks/Mono.framework/Versions/5.12.0/etc/mono/config'.
Mono: Config attempting to parse: '/Users/user/.mono/config'.
Mono: process_set_name: using [GalaxianSDL.exe] as prog name
Mono: mono_w32handle_new: create Process handle 0x7fcb1901d608
Mono: Assembly Loader probing location: '/Library/Frameworks/Mono.framework/Versions/5.12.0/lib/mono/4.5/mscorlib.dll'.
Mono: Image addref mscorlib[0x7fcb18408d30] -> /Library/Frameworks/Mono.framework/Versions/5.12.0/lib/mono/4.5/mscorlib.dll[0x7fcb18805400]: 2
Mono: Prepared to set up assembly 'mscorlib' (/Library/Frameworks/Mono.framework/Versions/5.12.0/lib/mono/4.5/mscorlib.dll)
Mono: AOT: module /Library/Frameworks/Mono.framework/Versions/5.12.0/lib/mono/4.5/mscorlib.dll.dylib wants to load image 0: mscorlib
Mono: Found assembly remapping for mscorlib and was for the same version 4.0.0.0
Mono: Found assembly remapping for mscorlib and was for the same version 4.0.0.0
Mono: Assembly Loader probing location: '/Library/Frameworks/Mono.framework/Versions/5.12.0/lib/mono/4.5/mscorlib.dll'.
Mono: AOT: image '/Library/Frameworks/Mono.framework/Versions/5.12.0/lib/mono/4.5/mscorlib.dll.dylib' found.
Mono: Assembly Loader loaded assembly from location: '/Library/Frameworks/Mono.framework/Versions/5.12.0/lib/mono/4.5/mscorlib.dll'.
Mono: Config attempting to parse: '/Library/Frameworks/Mono.framework/Versions/5.12.0/lib/mono/4.5/mscorlib.dll.config'.
Mono: Config attempting to parse: '/Library/Frameworks/Mono.framework/Versions/5.12.0/etc/mono/assemblies/mscorlib/mscorlib.config'.
Mono: AOT: FOUND method System.OutOfMemoryException:.ctor (string) [0x10c956690 - 0x10c9566b2 0x10ccdc208]
Mono: AOT NOT FOUND: (wrapper runtime-invoke) <Module>:runtime_invoke_void__this___object (object,intptr,intptr,intptr).
Mono: AOT: FOUND method System.SystemException:.ctor (string) [0x10c96ec90 - 0x10c96ecb2 0x10ccdcbff]
Mono: AOT: FOUND method System.Exception:.cctor () [0x10c93b500 - 0x10c93b527 0x10ccdb68d]
Mono: AOT NOT FOUND: (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr).
Mono: AOT NOT FOUND: (wrapper alloc) object:AllocSmall (intptr,intptr).
Mono: AOT: FOUND method System.Exception:.ctor (string) [0x10c939b80 - 0x10c939bbf 0x10ccdb512]
Mono: AOT: FOUND method System.Exception:Init () [0x10c939af0 - 0x10c939b54 0x10ccdb506]
Mono: AOT: FOUND method System.NullReferenceException:.ctor (string) [0x10c953570 - 0x10c953592 0x10ccdc146]
Mono: AOT: FOUND method System.StackOverflowException:.ctor (string) [0x10c963f70 - 0x10c963f92 0x10ccdc912]
Mono: Assembly mscorlib[0x7fcb18408d30] added to domain GalaxianSDL.exe, ref_count=1
Mono: Assembly Loader probing location: 'GalaxianSDL.exe'.
Mono: Image addref GalaxianSDL[0x7fcb18507c60] -> /Users/user/Documents/GalaxianSDL/GalaxianSDL/bin/Debug/GalaxianSDL.exe[0x7fcb18805c00]: 2
Mono: Prepared to set up assembly 'GalaxianSDL' (/Users/user/Documents/GalaxianSDL/GalaxianSDL/bin/Debug/GalaxianSDL.exe)
Mono: Assembly GalaxianSDL[0x7fcb18507c60] added to domain GalaxianSDL.exe, ref_count=1
Mono: AOT: image '/Users/user/Documents/GalaxianSDL/GalaxianSDL/bin/Debug/GalaxianSDL.exe.dylib' not found: dlopen(/Users/user/Documents/GalaxianSDL/GalaxianSDL/bin/Debug/GalaxianSDL.exe.dylib, 9): image not found
Mono: AOT: image '/Library/Frameworks/Mono.framework/Versions/5.12.0/lib/mono/aot-cache/amd64/GalaxianSDL.exe.dylib' not found: dlopen(/Library/Frameworks/Mono.framework/Versions/5.12.0/lib/mono/aot-cache/amd64/GalaxianSDL.exe.dylib, 9): image not found
Mono: Assembly Loader loaded assembly from location: 'GalaxianSDL.exe'.
Mono: Config attempting to parse: '/Users/user/Documents/GalaxianSDL/GalaxianSDL/bin/Debug/GalaxianSDL.exe.config'.
Mono: Config attempting to parse: '/Library/Frameworks/Mono.framework/Versions/5.12.0/etc/mono/assemblies/GalaxianSDL/GalaxianSDL.config'.
Mono: Assembly Loader probing location: 'GalaxianSDL.exe'.
Mono: AOT: image '/Users/user/Documents/GalaxianSDL/GalaxianSDL/bin/Debug/GalaxianSDL.exe.dylib' not found: dlopen(/Users/user/Documents/GalaxianSDL/GalaxianSDL/bin/Debug/GalaxianSDL.exe.dylib, 9): image not found
Mono: AOT: image '/Library/Frameworks/Mono.framework/Versions/5.12.0/lib/mono/aot-cache/amd64/GalaxianSDL.exe.dylib' not found: dlopen(/Library/Frameworks/Mono.framework/Versions/5.12.0/lib/mono/aot-cache/amd64/GalaxianSDL.exe.dylib, 9): image not found
Mono: Found assembly remapping for mscorlib and was for the same version 4.0.0.0
Mono: Found assembly remapping for mscorlib and was for the same version 4.0.0.0
Mono: Assembly Ref addref GalaxianSDL[0x7fcb18507c60] -> mscorlib[0x7fcb18408d30]: 2
Mono: AOT NOT FOUND: (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr).
Mono: Config attempting to parse: '/Users/user/Documents/GalaxianSDL/GalaxianSDL/bin/Debug/GalaxianSDL.exe.config'.
Mono: Domain GalaxianSDL.exe search path is:
Mono:   path[0] = '/Users/user/Documents/GalaxianSDL/GalaxianSDL/bin/Debug/'
Mono: End of domain GalaxianSDL.exe search path.
Mono: Assembly Loader probing location: '/Library/Frameworks/Mono.framework/Versions/5.12.0/lib/mono/gac/Tao.Sdl/1.2.8.1__9c7a200e36c0094e/Tao.Sdl.dll'.
Mono: Assembly Loader probing location: '/Library/Frameworks/Mono.framework/Versions/5.12.0/lib/Tao.Sdl.dll'.
Mono: Assembly Loader probing location: '/Library/Frameworks/Mono.framework/Versions/5.12.0/lib/mono/4.5//Facades/Tao.Sdl.dll'.
Mono: Assembly Loader probing location: '/Library/Frameworks/Mono.framework/Versions/5.12.0/lib/mono/gac/Tao.Sdl/1.2.8.1__9c7a200e36c0094e/Tao.Sdl.exe'.
Mono: Assembly Loader probing location: '/Library/Frameworks/Mono.framework/Versions/5.12.0/lib/Tao.Sdl.exe'.
Mono: Assembly Loader probing location: '/Library/Frameworks/Mono.framework/Versions/5.12.0/lib/mono/4.5//Facades/Tao.Sdl.exe'.
Mono: AOT: FOUND method System.AppDomain:DoAssemblyResolve (string,System.Reflection.Assembly,bool) [0x10c98c3e0 - 0x10c98c71c 0x10ccdd933]
Mono: AOT NOT FOUND: (wrapper runtime-invoke) <Module>:runtime_invoke_object__this___object_object_byte (object,intptr,intptr,intptr).
Mono: Domain GalaxianSDL.exe search path is:
Mono:   path[0] = '/Users/user/Documents/GalaxianSDL/GalaxianSDL/bin/Debug/'
Mono: End of domain GalaxianSDL.exe search path.
Mono: Assembly Loader probing location: '/Library/Frameworks/Mono.framework/Versions/5.12.0/lib/mono/gac/Tao.Sdl/1.2.8.1__9c7a200e36c0094e/Tao.Sdl.dll'.
Mono: Assembly Loader probing location: '/Users/user/Documents/GalaxianSDL/GalaxianSDL/bin/Debug/Tao.Sdl.dll'.
Mono: Assembly Loader probing location: '/Library/Frameworks/Mono.framework/Versions/5.12.0/lib/Tao.Sdl.dll'.
Mono: Assembly Loader probing location: '/Library/Frameworks/Mono.framework/Versions/5.12.0/lib/mono/4.5//Facades/Tao.Sdl.dll'.
Mono: Assembly Loader probing location: '/Library/Frameworks/Mono.framework/Versions/5.12.0/lib/mono/gac/Tao.Sdl/1.2.8.1__9c7a200e36c0094e/Tao.Sdl.exe'.
Mono: Assembly Loader probing location: '/Users/user/Documents/GalaxianSDL/GalaxianSDL/bin/Debug/Tao.Sdl.exe'.
Mono: Assembly Loader probing location: '/Library/Frameworks/Mono.framework/Versions/5.12.0/lib/Tao.Sdl.exe'.
Mono: Assembly Loader probing location: '/Library/Frameworks/Mono.framework/Versions/5.12.0/lib/mono/4.5//Facades/Tao.Sdl.exe'.
Mono: The following assembly referenced from /Users/user/Documents/GalaxianSDL/GalaxianSDL/bin/Debug/GalaxianSDL.exe could not be loaded:
     Assembly:   Tao.Sdl    (assemblyref_index=1)
     Version:    1.2.8.1
     Public Key: 9c7a200e36c0094e
The assembly was not found in the Global Assembly Cache, a path listed in the MONO_PATH environment variable, or in the location of the executing assembly (/Users/user/Documents/GalaxianSDL/GalaxianSDL/bin/Debug/).

Mono: Failed to load assembly GalaxianSDL[0x7fcb18507c60].
Mono: AOT: FOUND method System.IO.FileNotFoundException:.ctor (string,string) [0x10caa4790 - 0x10caa47e5 0x10cce50bb]
Mono: AOT NOT FOUND: (wrapper runtime-invoke) <Module>:runtime_invoke_void__this___object_object (object,intptr,intptr,intptr).
Mono: AOT: FOUND method System.IO.IOException:.ctor (string) [0x10caa74a0 - 0x10caa74c2 0x10cce51f3]

Unhandled Exception:
System.IO.FileNotFoundException: Could not load file or assembly 'Tao.Sdl, Version=1.2.8.1, Culture=neutral, PublicKeyToken=9c7a200e36c0094e' or one of its dependencies.
File name: 'Tao.Sdl, Version=1.2.8.1, Culture=neutral, PublicKeyToken=9c7a200e36c0094e'
  at GalaxianSDL.Main (System.String[] args) [0x00001] in <141a1af9b0a44e5e8272d4a405970f55>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could not load file or assembly 'Tao.Sdl, Version=1.2.8.1, Culture=neutral, PublicKeyToken=9c7a200e36c0094e' or one of its dependencies.
File name: 'Tao.Sdl, Version=1.2.8.1, Culture=neutral, PublicKeyToken=9c7a200e36c0094e'
  at GalaxianSDL.Main (System.String[] args) [0x00001] in <141a1af9b0a44e5e8272d4a405970f55>:0

Я читал на одном форуме, что они используют карты dll, а на другом форуме они комментируют что-то о маршрутах, которые ищет Mono, или файлах, которые он ищетпо умолчанию происходит то, что я не очень контролирую эту тему и не знаю, с чего начать.Если бы кто-то мог мне помочь, я был бы очень признателен.

Я использую Mac OS 10.14

Mono версия - это Mono JIT версия компилятора 5.12.0.309 (2018-02 / 39d89a335c8 Чт, 27 сентября 06:54: 53 EDT 2018)

Если вам нужно что-нибудь еще, пожалуйста, скажите мне.

Я также был бы признателен за самый простой из возможных ответов, так как я не понимаю ничего из этого.

Спасибо заранее

...