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

Check why the parts are not being shown on KSP 1.2.2. #10

Open
Lisias opened this issue Aug 9, 2022 · 2 comments
Open

Check why the parts are not being shown on KSP 1.2.2. #10

Lisias opened this issue Aug 9, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@Lisias
Copy link
Collaborator

Lisias commented Aug 9, 2022

KSP 1.2.2 is a bit out of scope (who is using it nowadays), but I consider it the best and most stable release of KSP ever - besides a bit featureless…

Anyway, allowing things to work on KSP 1.2.2 (and 1.3.1) is a good exercise and a source of information for KSP modding.

So, even by not supporting actively this thing on KSP 1.2.2, I consider fruitful to at least try, so…

Fellow Kerbonaut Rutabaga22 reported on forum that HLA's parts are not being shown on the Editor's Part's Menu.

I was pretty sure I would have a problem with the DLL, due some changes on the UI from 1.2.2 to 1.3.0 but the parts I think should be there.

On the bright side, 1.3.0 apparently is working :)

@Lisias Lisias added the enhancement New feature or request label Aug 9, 2022
@Lisias Lisias self-assigned this Aug 11, 2022
@Lisias
Copy link
Collaborator Author

Lisias commented Aug 11, 2022

The problem is KSPe.Light. This thing is short circuited to support KSP >= 1.4.3 and Unity >= 2019 only.

By compiling the thing against KSPe (the full package), it apparently worked on KSP 1.2.2!!

I will need some time playing with the thing, however, to be sure about the functionalities.

@Lisias
Copy link
Collaborator Author

Lisias commented Aug 11, 2022

Damn. I changed something on the AirshipCap part that is making KSP 1.2.2 to bork on a null pointer exception inside the C land! :(

PartLoader: Compiling Part 'HLAirshipsCore/Parts/Aero/HL_AirshipEnvelope/part/HL_AirshipEnvelope'

(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

Receiving unhandled NULL exception
Obtained 3 stack frames.
#0  0x00000101e0fca4 in create_custom_attr
#1  0x00000101e10f39 in mono_reflection_get_custom_attrs_by_type
#2  0x00000101db114f in custom_attrs_get_by_type
Stacktrace:

  at (wrapper managed-to-native) System.MonoCustomAttrs.GetCustomAttributesInternal (System.Reflection.ICustomAttributeProvider,System.Type,bool) <0x0006a>
  at (wrapper managed-to-native) System.MonoCustomAttrs.GetCustomAttributesInternal (System.Reflection.ICustomAttributeProvider,System.Type,bool) <0x0006a>
  at System.MonoCustomAttrs.GetCustomAttributesBase (System.Reflection.ICustomAttributeProvider,System.Type) <0x0006a>
  at System.MonoCustomAttrs.GetCustomAttributes (System.Reflection.ICustomAttributeProvider,System.Type,bool) <0x00095>
  at System.Reflection.MonoMethod.GetCustomAttributes (System.Type,bool) <0x00028>
  at BaseEventList/ReflectedData..ctor (System.Type) <0x00176>
  at BaseEventList.GetReflectedAttributes (System.Type) <0x00078>
  at BaseEventList.CreateDelegates (object) <0x00045>
  at BaseEventList..ctor (Part,PartModule) <0x0005e>
  at PartModule.ModularSetup () <0x00047>
  at PartModule.Awake () <0x00050>
  at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) <0x0005e>
  at (wrapper managed-to-native) UnityEngine.GameObject.Internal_AddComponentWithType (System.Type) <0x00074>
  at (wrapper managed-to-native) UnityEngine.GameObject.Internal_AddComponentWithType (System.Type) <0x00074>
  at UnityEngine.GameObject.AddComponent (System.Type) <0x0001e>
  at Part.AddModule (string,bool) <0x000ab>
  at Part.AddModule (ConfigNode,bool) <0x0008e>
  at PartLoader.ParsePart (UrlDir/UrlConfig,ConfigNode) <0x01d9d>
  at PartLoader/<CompileParts>c__Iterator62.MoveNext () <0x00ec8>
  at UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator,intptr) <0x00062>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object_intptr (object,intptr,intptr,intptr) <0x00065>

Native stacktrace:

        0   libsystem_kernel.dylib              0x00007fff6f0fd2c2 __pthread_kill + 10
        1   libsystem_c.dylib                   0x00007fff6f0676a6 abort + 127
        2   KSP                                 0x0000000100bb4ef4 _Z12HandleSignaliP9__siginfoPv + 36
        3   libmono.0.dylib                     0x0000000101d7dece mono_chain_signal + 75
        4   libmono.0.dylib                     0x0000000101cc638a mono_sigsegv_signal_handler + 210
        5   libsystem_platform.dylib            0x00007fff6f1adb5d _sigtramp + 29
        6   libmono.0.dylib                     0x0000000101dab9b3 fill_runtime_generic_context + 1418
        7   libmono.0.dylib                     0x0000000101e10f39 mono_reflection_get_custom_attrs_by_type + 306
        8   libmono.0.dylib                     0x0000000101db114f custom_attrs_get_by_type + 46

Debug info from gdb:

/tmp/mono-gdb-commands.uS0Cn3:1: Error in sourced command file:
I refuse to debug myself!

=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================

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

No branches or pull requests

1 participant