YoYoGames / GameMaker-Bugs

Public tracking for GameMaker bugs
26 stars 8 forks source link

physics_joint_exists(joint); #3735

Open iampremo opened 1 year ago

iampremo commented 1 year ago

User request message from ticket Ticket #187289

 

Feature Type: feat_addition_ingame Description: function name: physics_joint_exists(joint); return: boolean param: joint desc: checks if the joint does still exist

Benefit: The only problem at the moment is, that joints get automatically destroyed if one of the 2 connected instances gets destroyed. If both instances have a reference to the joint, then I sometimes face bugs like that. Even If i really try to detect all instance_destroys to tell the other connected instance, that this joint isnt existing anymore. I need the joint references to detect to high forces, so the joint gets deleted and the boat breaks.

Here a video, so you can see, that it can become difficulty to mange this workaround: Its in the additional info URL

Example Google Play crashlog if I miss one joint reference:


pid: 0, tid: 0 >>> com.gaming_apps.water_physics_simulation <<<

backtrace: [#00|Ticket #00] pc 0000000000000000 [#00|Ticket #00] pc 00000000003a1d90 /data/app/~~BXmc3RXoEexHo5DDKtCrmA==/com.gaming_apps.water_physics_simulation-ymlWa7Gy1OizfXd13R3oIA==/lib/arm64/libyoyo.so (b2Joint::Destroy(b2Joint, b2BlockAllocator)+28) [#00|Ticket #00] pc 00000000003b2d10 /data/app/~~BXmc3RXoEexHo5DDKtCrmA==/com.gaming_apps.water_physics_simulation-ymlWa7Gy1OizfXd13R3oIA==/lib/arm64/libyoyo.so (b2World::DestroyJoint(b2Joint)+272) [#00|Ticket #00] pc 0000000000544dac /data/app/~~BXmc3RXoEexHo5DDKtCrmA==/com.gaming_apps.water_physics_simulation-ymlWa7Gy1OizfXd13R3oIA==/lib/arm64/libyoyo.so (CPhysicsJointFactory::DestroyJoint(CPhysicsWorld, unsigned int)+220) [#00|Ticket #00] pc 0000000000675464 /data/app/~~BXmc3RXoEexHo5DDKtCrmA==/com.gaming_apps.water_physics_simulation-ymlWa7Gy1OizfXd13R3oIA==/lib/arm64/libyoyo.so (YYGML_CallLegacyFunction(CInstance, CInstance, YYRValue&, int, int, YYRValue)+240) [#00|Ticket #00] pc 0000000000789ca4 /data/app/~~BXmc3RXoEexHo5DDKtCrmA==/com.gaming_apps.water_physics_simulation-ymlWa7Gy1OizfXd13R3oIA==/lib/arm64/libyoyo.so (gml_Script_comp_joint_clearJoint(CInstance, CInstance, YYRValue&, int, YYRValue)+684) [#00|Ticket #00] pc 000000000078a04c /data/app/~~BXmc3RXoEexHo5DDKtCrmA==/com.gaming_apps.water_physics_simulation-ymlWa7Gy1OizfXd13R3oIA==/lib/arm64/libyoyo.so (gml_Script_comp_joint_cleanUp(CInstance, CInstance, YYRValue&, int, YYRValue)+300) [#00|Ticket #00] pc 00000000006751e4 /data/app/~~BXmc3RXoEexHo5DDKtCrmA==/com.gaming_apps.water_physics_simulation-ymlWa7Gy1OizfXd13R3oIA==/lib/arm64/libyoyo.so (YYGML_CallMethod(CInstance, CInstance, YYRValue&, int, YYRValue const&, YYRValue)+384) [#00|Ticket #00] pc 0000000000ab57f8 /data/app/~~BXmc3RXoEexHo5DDKtCrmA==/com.gaming_apps.water_physics_simulation-ymlWa7Gy1OizfXd13R3oIA==/lib/arm64/libyoyo.so (gml_Object_obj_se_CleanUp_0(CInstance, CInstance)+1380) [#00|Ticket #00] pc 00000000003e14f0 /data/app/~~BXmc3RXoEexHo5DDKtCrmA==/com.gaming_apps.water_physics_simulation-ymlWa7Gy1OizfXd13R3oIA==/lib/arm64/libyoyo.so (ExecuteIt(CInstance, CInstance, CCode, RValue, int)+104) [#00|Ticket #00] pc 00000000003e1608 /data/app/~~BXmc3RXoEexHo5DDKtCrmA==/com.gaming_apps.water_physics_simulation-ymlWa7Gy1OizfXd13R3oIA==/lib/arm64/libyoyo.so (Code_Execute(CInstance, CInstance, CCode, RValue, int)+8) [#00|Ticket #00] pc 00000000003ed8b8 /data/app/~~BXmc3RXoEexHo5DDKtCrmA==/com.gaming_apps.water_physics_simulation-ymlWa7Gy1OizfXd13R3oIA==/lib/arm64/libyoyo.so (CEvent::Execute(CInstance, CInstance)+72) [#00|Ticket #00] pc 00000000003edb84 /data/app/~~BXmc3RXoEexHo5DDKtCrmA==/com.gaming_apps.water_physics_simulation-ymlWa7Gy1OizfXd13R3oIA==/lib/arm64/libyoyo.so (Perform_Event_Object_ASync(CInstance, CInstance, int, int, int)+228) [#00|Ticket #00] pc 00000000003edcd8 /data/app/~~BXmc3RXoEexHo5DDKtCrmA==/com.gaming_apps.water_physics_simulation-ymlWa7Gy1OizfXd13R3oIA==/lib/arm64/libyoyo.so (Perform_Event(CInstance, CInstance, int, int)+152) [#00|Ticket #00] pc 0000000000582cf8 /data/app/~~BXmc3RXoEexHo5DDKtCrmA==/com.gaming_apps.water_physics_simulation-ymlWa7Gy1OizfXd13R3oIA==/lib/arm64/libyoyo.so (CRoom::~CRoom()+104) [#00|Ticket #00] pc 00000000005bc760 /data/app/~~BXmc3RXoEexHo5DDKtCrmA==/com.gaming_apps.water_physics_simulation-ymlWa7Gy1OizfXd13R3oIA==/lib/arm64/libyoyo.so (EndRoom(bool)+1540) [#00|Ticket #00] pc 00000000005bc84c /data/app/~~BXmc3RXoEexHo5DDKtCrmA==/com.gaming_apps.water_physics_simulation-ymlWa7Gy1OizfXd13R3oIA==/lib/arm64/libyoyo.so (SwitchRoom(int)+128) [#00|Ticket #00] pc 00000000005beacc /data/app/~~BXmc3RXoEexHo5DDKtCrmA==/com.gaming_apps.water_physics_simulation-ymlWa7Gy1OizfXd13R3oIA==/lib/arm64/libyoyo.so (MainLoop_Process()+1272) [#00|Ticket #00] pc 0000000000477a74 /data/app/~~BXmc3RXoEexHo5DDKtCrmA==/com.gaming_apps.water_physics_simulation-ymlWa7Gy1OizfXd13R3oIA==/lib/arm64/libyoyo.so (Java_com_yoyogames_runner_RunnerJNILib_Process+868) [#00|Ticket #00] pc 000000000008a5e0 /data/app/~~BXmc3RXoEexHo5DDKtCrmA==/com.gaming_apps.water_physics_simulation-ymlWa7Gy1OizfXd13R3oIA==/oat/arm64/base.odex (art_jni_trampoline+208) [#00|Ticket #00] pc 00000000000d0b48 /data/app/~~BXmc3RXoEexHo5DDKtCrmA==/com.gaming_apps.water_physics_simulation-ymlWa7Gy1OizfXd13R3oIA==/oat/arm64/base.odex (com.gaming_apps.water_physics_simulation.DemoRenderer.onDrawFrame+712) [#00|Ticket #00] pc 0000000000636d04 /system/framework/arm64/boot-framework.oat (android.opengl.GLSurfaceView$GLThread.guardedRun+3668) [#00|Ticket #00] pc 00000000006374f0 /system/framework/arm64/boot-framework.oat (android.opengl.GLSurfaceView$GLThread.run+224) [#00|Ticket #00] pc 0000000000133564 /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+548) [#00|Ticket #00] pc 00000000001a8a78 /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread, unsigned int, unsigned int, art::JValue, char const)+200) [#00|Ticket #00] pc 0000000000555ac4 /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeVirtualOrInterfaceWithJValues<art::ArtMethod>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject, art::ArtMethod, jvalue const)+460) [#00|Ticket #00] pc 00000000005a4e60 /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void)+1308) [#00|Ticket #00] pc 00000000000eb868 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void)+64) [#00|Ticket #00] pc 000000000008ba88 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) Link: [https://www.youtube.com/watch?v=E3iWrNr64Dg]

Glim888 commented 6 months ago

Hi, I am the original issuer of this request. Could you maybe change the description + title to:

Title: [Function Request] physics_joint_exists(joint)

Feature Type: feat_addition_ingame return: boolean param: joint desc: Check if the joint does still exist in the game.

Benefit: The problem at the moment is, that joints get automatically destroyed by the engine if one of the 2 connected instances gets destroyed. In this case accessing the none existing joint will SILENTLY CRASH the game.

Therefore we need this function.

rwkay commented 6 months ago

@Glim888 can you please attach a project that shows this problem and we will ensure we fix the crash as well?

Glim888 commented 5 months ago

Sorry for the delay, it seems like it got fixed. You can close this issue.

Thanks