Code Monkey home page Code Monkey logo

Comments (10)

vustav avatar vustav commented on June 12, 2024

The crash I'm getting is this one and I'm somewhat able to reproduce it when the sequencer goes from last step -> 0:

2022-06-16 11:33:26.928 32383-32383/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2022-06-16 11:33:26.929 32383-32383/? A/DEBUG: Build fingerprint: 'google/sdk_gphone_x86/generic_x86:8.0.0/OSR1.170901.043/4456315:user/release-keys'
2022-06-16 11:33:26.929 32383-32383/? A/DEBUG: Revision: '0'
2022-06-16 11:33:26.929 32383-32383/? A/DEBUG: ABI: 'x86'
2022-06-16 11:33:26.929 32383-32383/? A/DEBUG: pid: 32329, tid: 32356, name: Thread-2 >>> com.kiefer.llppdrums <<<
2022-06-16 11:33:26.929 32383-32383/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
2022-06-16 11:33:26.929 32383-32383/? A/DEBUG: Cause: null pointer dereference
2022-06-16 11:33:26.929 32383-32383/? A/DEBUG: eax 91b7ea00 ebx 928f48a8 ecx ad8595f0 edx 924ff330
2022-06-16 11:33:26.929 32383-32383/? A/DEBUG: esi 000178bf edi 00017610
2022-06-16 11:33:26.929 32383-32383/? A/DEBUG: xcs 00000073 xds 0000007b xes 0000007b xfs 0000003b xss 0000007b
2022-06-16 11:33:26.929 32383-32383/? A/DEBUG: eip 00000000 ebp 924ff358 esp 924ff2cc flags 00010286
2022-06-16 11:33:26.933 32383-32383/? A/DEBUG: backtrace:
2022-06-16 11:33:26.933 32383-32383/? A/DEBUG: #00 pc 00000000
2022-06-16 11:33:26.933 32383-32383/? A/DEBUG: #1 pc 000c59cb /data/app/com.kiefer.llppdrums-fB9yJKWR7NdQvDCh5i7CIg==/base.apk (offset 0x2c06000)
2022-06-16 11:33:26.933 32383-32383/? A/DEBUG: #2 pc 000b63b2 /data/app/com.kiefer.llppdrums-fB9yJKWR7NdQvDCh5i7CIg==/base.apk (offset 0x2c06000)
2022-06-16 11:33:26.933 32383-32383/? A/DEBUG: #3 pc 000cb2b2 /data/app/com.kiefer.llppdrums-fB9yJKWR7NdQvDCh5i7CIg==/base.apk (offset 0x2c06000)
2022-06-16 11:33:26.933 32383-32383/? A/DEBUG: #4 pc 000cb00c /data/app/com.kiefer.llppdrums-fB9yJKWR7NdQvDCh5i7CIg==/base.apk (offset 0x2c06000)
2022-06-16 11:33:26.933 32383-32383/? A/DEBUG: #5 pc 00013b89 /system/lib/libaaudio.so (_ZN6aaudio17AudioStreamLegacy21processCallbackCommonEiPv+201)
2022-06-16 11:33:26.934 32383-32383/? A/DEBUG: #6 pc 000153eb /system/lib/libaaudio.so (_ZN6aaudio16AudioStreamTrack15processCallbackEiPv+59)
2022-06-16 11:33:26.934 32383-32383/? A/DEBUG: #7 pc 000139f7 /system/lib/libaaudio.so (ZL26AudioStreamLegacy_callbackiPvS+39)
2022-06-16 11:33:26.934 32383-32383/? A/DEBUG: #8 pc 00046ea1 /system/lib/libaudioclient.so (_ZN7android10AudioTrack18processAudioBufferEv+2465)
2022-06-16 11:33:26.934 32383-32383/? A/DEBUG: #9 pc 000491df /system/lib/libaudioclient.so (_ZN7android10AudioTrack16AudioTrackThread10threadLoopEv+207)
2022-06-16 11:33:26.934 32383-32383/? A/DEBUG: #10 pc 0001044f /system/lib/libutils.so (_ZN7android6Thread11_threadLoopEPv+207)
2022-06-16 11:33:26.934 32383-32383/? A/DEBUG: #11 pc 0000fca6 /system/lib/libutils.so (ZN13thread_data_t10trampolineEPKS+246)
2022-06-16 11:33:26.934 32383-32383/? A/DEBUG: #12 pc 000709b5 /system/lib/libc.so (_ZL15__pthread_startPv+53)
2022-06-16 11:33:26.934 32383-32383/? A/DEBUG: #13 pc 0002050b /system/lib/libc.so (__start_thread+75)
2022-06-16 11:33:26.934 32383-32383/? A/DEBUG: #14 pc 0001eda6 /system/lib/libc.so (__bionic_clone+70)
2022-06-16 11:33:27.651 1558-1558/? E//system/bin/tombstoned: Tombstone written to: /data/tombstones//tombstone_00


In this case nothing except for some UI-elements is modified through handleNotification(), but it's much less frequent when calling from the UI-thread so it still feels like it has something to do with that.

No idea if this is the engine or if this info is relevant to you. I've had this for a long time and made an issue before where I blamed muting, which was wrong. I can upload the tombstone if you want it.

from mwengine.

vustav avatar vustav commented on June 12, 2024

I finally got firebase working and this is what I'm getting:
crash

from mwengine.

vustav avatar vustav commented on June 12, 2024

In the crash I was able to reprodice I've deleted steps (which means deleted events) while the engine was paused (and randomized other things) and the crash happens when the sequencer goes from last step -> 0.

Just to be clear: I have no idea if this is thread related, I just noticed less crashes in the UI-thread.

from mwengine.

vustav avatar vustav commented on June 12, 2024

When deleteing tracks while the engine is running I'm getting the exact same crash exept for step 0 in firebase that says "missing". All other steps are identical.

from mwengine.

vustav avatar vustav commented on June 12, 2024

A little note here: deleteing tracks while the engine is running does not mean deleting events. I've had trouble deleting events with the engine running before, so right now I store them and delete all when the engine is paused. Same goes for fxs and instruments. This is an old fix and I don't know if it's needed anymore, I will investigate this soon.

from mwengine.

igorski avatar igorski commented on June 12, 2024

So I had some time to look into this.

Debouncing on the UI thread may work as as the handler will not be executed synchronously with the sequencer, which reduces risk of concurrent operations on removed items.

So just to be clear : the action you re performing is removing events from the sequencer while it is running right (using removeFromSequencer) ? (Note: this should totally work, so this is a definitive bug if this is the case). If you are doing other things maybe you can post a snippet of the changes you are executing ? Judging from the stack trace I have assumed it's related to event removal though.

If you push the latest version of the repository and rebuild the library, is the issue addressed ?

from mwengine.

vustav avatar vustav commented on June 12, 2024

Can't assemble the latest version with #define RECORD_DEVICE_INPUT and #define RECORD_TO_DISK commented away. utilities/diskwriter.h is never included and still called further down. Will try with them enabled but thaught you should know.

Tried for a while with the version I had before the latest and had zero crashes. I could pretty reliably recreate it before, atleast once every 10th try or so, so might be that it was solved allready.

Sorry for the vagueness, been away for three weeks.

from mwengine.

vustav avatar vustav commented on June 12, 2024

utilities/diskwriter.h is never included and still called further down in audioengine.cpp!!

from mwengine.

igorski avatar igorski commented on June 12, 2024

Ah sorry that's embarrassing 🙈

A recent improvement to the recording API left this lingering and I didn't check the impact in the case RECORD_DEVICE_INPUT|RECORD_TO_DISK was disabled in global.h. I have pushed a change that removed the old import guard (DiskWriter will then be included - as it was before, but in a different file as it depends on the same imports as file import/WaveReader - but the recording code will remain dormant during render, as before).

from mwengine.

vustav avatar vustav commented on June 12, 2024

In the crash I could reproduce I had removed/added events to the engine before starting the sequencer. I think the events are irrelevant. The updates are simple, like increasing the delay time on certain steps, using handleNotification(). The crash always occured at step 0 (or maybe the last step) but nothing special in regards to the engine is happening there. Blaming it on threads was just a thaught I had.

from mwengine.

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.