Coder Social home page Coder Social logo

Comments (10)

alessandrofama avatar alessandrofama commented on July 19, 2024 1

Thank you for the reporting the issue and sorry for the crash. I think you are probably right and the cookie doesn't exist anymore. Earliest I can take a look at the issue is Wednesday next week.

from wwise-godot-integration.

alessandrofama avatar alessandrofama commented on July 19, 2024 1

If you please could give this another try: https://github.com/alessandrofama/wwise-godot-integration/suites/7805292542/artifacts/329361592

otherwise I will check on a linux machine myself^^

from wwise-godot-integration.

Maaack avatar Maaack commented on July 19, 2024

I've never written a gdnative integration, but I was wondering if we could check the callbacks for a subscriptionId that matches with the one we are trying to unsubscribe.
https://github.com/alessandrofama/wwise-godot-integration/blob/main/waapiclient-gdnative/src/waapiclient_gdnative.cpp#L138

from wwise-godot-integration.

alessandrofama avatar alessandrofama commented on July 19, 2024

We can use FuncRef::is_valid in the callback to check whether the cookie object still exists and return early otherwise. This will prevent the crash. I have taken the liberty of printing an error message when this happens. If it's too much I can remove or tone it down in a future commit.

Updated libs to replace for you to try:
win
mac
linux
ios

Android CI seems broken right now ๐Ÿคจ

link to changes: 9821b90

from wwise-godot-integration.

Maaack avatar Maaack commented on July 19, 2024

Yeah, that looks like a more straightforward change. Thank you. I will give these libs a try and report back.

from wwise-godot-integration.

Maaack avatar Maaack commented on July 19, 2024

I tested the linux libs with Godot 3.5.0. I still got it to crash, but with this stack trace.

 handle_crash: Program crashed with signal 11
 Engine version: Godot Engine v3.5.stable.official (991bb6ac74ac8c09d7683041b50a8ced3a2defb1)
 Dumping the backtrace. Please include this when reporting the bug on: https://github.com/godotengine/godot/issues
 [1] /lib/x86_64-linux-gnu/libc.so.6(+0x43090) [0x7f591c3cd090] (??:0)
 [2] /myhomedirectory/Godot_v3.5-stable_x11.64() [0x2dc25f4] (??:0)
 [3] /myhomedirectory/Godot_v3.5-stable_x11.64() [0xbdc060] (??:0)
 [4] godot::FuncRef::is_valid() const (??:0)
 [5] godot::Wwise::eventCallback(AkCallbackType, AkCallbackInfo*) (??:0)
 [6] CAkPlayingMgr::NotifyMusic(unsigned int, AkCallbackType, AkSegmentInfo const&) (??:0)
 [7] CAkScheduledItem::NotifyMusicCallbacks(int, unsigned int, unsigned int, unsigned int, float) const (??:0)
 [8] CAkScheduleWindow::NotifyMusicCallbacks(long, unsigned int, unsigned int, unsigned int, float) const (??:0)
 [9] CAkMatrixSequencer::ProcessMusicNotifications(long, unsigned int) (??:0)
 [10] CAkMatrixSequencer::Process(long, unsigned int) (??:0)
 [11] CAkMatrixAwareCtx::ProcessEpilogue(long, unsigned int) (??:0)
 [12] CAkMusicSwitchCtx::Process(long, unsigned int, AkCutoffInfo&) (??:0)
 [13] CAkMatrixSequencer::Execute(unsigned int) (??:0)
 [14] CAkMusicRenderer::ProcessNextFrame(AK::IAkGlobalPluginContext*, AkGlobalCallbackLocation, void*) (??:0)
 [15] _CallGlobalExtensions(AkGlobalCallbackLocation) (??:0)
 [16] CAkAudioMgr::Perform(bool, bool) (??:0)
 [17] CAkAudioThread::EventMgrThreadFunc(void*) (??:0)
 [18] /lib/x86_64-linux-gnu/libpthread.so.0(+0x8609) [0x7f591c6d9609] (??:0)

from wwise-godot-integration.

alessandrofama avatar alessandrofama commented on July 19, 2024

About 1/10 of the time it crashes on me too, weird. I guess we can`t call anything on the FuncRef because it might be released when GDNative does its interop. I'm trying to use godot_is_instance_valid now to check if the underlying object is still valid and haven't had a crash in a while. Maybe it is worth a try?

Linux libs

from wwise-godot-integration.

Maaack avatar Maaack commented on July 19, 2024

I tried downloading, unzipping, and testing this library twice. Both attempts it crashed as soon as I tried to call Wwise. The editor also reports a number of errors.
image

/addons/wwise/bin/linux/debug/libWwiseGDNative.so: undefined symbol: godot_is_instance_valid
 modules/gdnative/gdnative.cpp:510 - No valid library handle, can't get symbol from GDNative object
 modules/gdnative/nativescript/nativescript.cpp:1503 - No nativescript_init in "res://addons/wwise/bin/linux/debug/libWwiseGDNative.so" found
 Script does not inherit from Node: res://addons/wwise/bin/wwise-gdnative.gdns.
 modules/gdnative/gdnative.cpp:417 - No valid library handle, can't terminate GDNative object
 editor/editor_autoload_settings.cpp:496 - Condition "!info->node" is true. Continuing.
  does not have a library for the current platform.
 Script does not inherit from Node: res://addons/wwise/bin/waapi-gdnative.gdns.
 editor/editor_autoload_settings.cpp:496 - Condition "!info->node" is true. Continuing.

Switching back to the previous library and reloading the project works as expected.

from wwise-godot-integration.

Maaack avatar Maaack commented on July 19, 2024

Thanks for the updated lib. I experienced no crashes with this build. The error reporting is pretty noisy, though.
image

from wwise-godot-integration.

alessandrofama avatar alessandrofama commented on July 19, 2024

I removed the noisy reporting in ac7e734. Will be available in the release or you can grab the updated libs from CI.

from wwise-godot-integration.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.