Reintegrate projectM Visualizer
-
Might be worth to mention, no Linux distros seem to have projectm version 4 yet, so it's not a major issue if we continue to use version 3 for a while longer.
-
@jonas I started to fiddle with this last week, got into some issues.... first of all It looks like I need Qt 5.6 to compile it, have to get it so I can test the Qt 5 part, as Ubuntu still has 5.3 even on 24.04 LTS
Using libprojectM 4 and Qt6, it segfaults exactly when it is supposed to start rendering to the opengl context. It looks like if it initializes it, but when AddBufferConsumer gets triggered, when data is supposed to arrive and draw to the screen, it segfaults. I still have no clue but I'm trying to understand; I saw something about this:
QOpenGLWidget::makeCurrent(): This function makes the context associated with a QOpenGLWidget the current context for rendering. This is analogous to "setting" the context.
and also doneCurrent(), I believe this is missing but i'm not sure how to implement due to the inheritance of the visualizercontainer class
-
Qt 5.6 is ancient, do you mean Qt 6.5?
I tested with Qt 5.15.14 and the latest Qt 6 (dev) code.
Turns out that the issue I'm seeing with QOpenGLWidget is known to projectm:
https://github.com/orgs/projectM-visualizer/discussions/820#discussioncomment-9864556
-
@jonas its strange indeed, I believe to already have compiled strawberry against qt 5 before.... but maybe not. Inspecting, I see I kinda have qt 5.15 here
~/strawberry$ qmake -v QMake version 3.1 Using Qt version 5.15.13 in /usr/lib/x86_64-linux-gnu
qtbase5-dev/noble,now 5.15.13+dfsg-1ubuntu1 amd64 [installed] Qt 5 base development files
So indeed, I'm crazy, I was sick as hell when I tought to have Qt 5.3, I saw the wrong version and that sticked to my head, I double checked and of course, its not Qt 5.1 or 5.3 its 5. 15 !!!! Just shoot me.
The error I receive with -DBUILD_WITH_QT6=off is this:
strawberry/src/globalshortcuts/globalshortcut-x11.cpp:56:7: error: โQNativeInterfaceโ has not been declared 56 | if (QNativeInterface::QX11Application *x11_app = qApp->nativeInterface<QNativeInterface::QX11Application>()) { | ^~~~~~~~~~~~~~~~
QNativeInterface, Which first appeared in Qt 5.6, thats the huge mess I made, sorry.
The error has nothing to do with Qt versions anyway. Maybe some typo in ifdefs? or missing headers? This is from a fresh master clone.About the issue in QOpenGLWidget,
since we are spawning a new window, we could use SDL2 instead just for that.. could we?Strange that for you and other ppl the rendering becomes garbage, for me it plain segfaults as soon as it tries to render ( libprojectM 4, Qt 6 )
I have onboard INTEL graphics
-
This post is deleted! -
@jonas look at this, this problem is not new at all!!!
-
I've tested without
QGraphicsScene
and I'm having the same issue.
MakingProjectMVisualization
inheritpublic QOpenGLWidget, protected QOpenGLFunctions, public GstBufferConsumer
Then i override
paintGL
like this:void ProjectMVisualization::paintGL() { QPainter p(this); p.beginNativePainting(); #ifdef HAVE_PROJECTM4 if (projectm_instance_) { projectm_set_window_size(projectm_instance_, width() * pixel_ratio_, height() * pixel_ratio_); projectm_opengl_render_frame(projectm_instance_); } #else projectm_->projectM_resetGL(width() * pixel_ratio_, height() * pixel_ratio_); projectm_->renderFrame(); #endif p.endNativePainting(); update(); }
-
Here is how it some look, just so we are talking about the same thing:
This is with ProjectM3, with version 4 I still have no luck.
-
@Gustavo-L-Conte said in Reintegrate projectM Visualizer:
QX11Application
Did you clean the build directory, or at least delete
CMakeCache.txt
before you built with Qt 5,QX11Application
is part of Qt 6.2 and newer, it shouldn't be included anywhere with Qt 5.
Variables in CMake are cached, so it does not help to re-run cmake without deleting the cache first.
Also, you should use:-DBUILD_WITH_QT5=ON
to disable autodetecting Qt version, settingBUILD_WITH_QT6
to OFF won't do that. -
@jonas yep I tried the same trhink you did, the override in paintGL, but with projectM4 and Qt6, for me only blank screen
and yes, I realized about the flags too. From certain point I was always doing a make clean, and I was able to successfully build with Qt5,
with -DHAVE_X11_GLOBALSHORTCUTS=off(i think it was that flag) because it issued that error I pointed above; but thats not necessary now I see, if I remove the build dir. feeling pretty dumb.
anyway, both ways for me, projectM4 or below, gives me only blank screen. I'm rebuilding right now with all combinations to test everything again
-
@jonas thanks!!!!! now visualization at least shows for me with Qt5 and projectM 3, as expected!
Gonna try things I did before but now properly cleaning the builddir LoL
-
about the v4, I think its some config missing. I'm going to double check after taking a break, all of these: (got from frontend-SDL2)
projectm_set_preset_duration(projectMWrapper.ProjectM(), _displayDuration); projectm_set_preset_locked(projectMWrapper.ProjectM(), !projectm_get_preset_locked(projectMWrapper.ProjectM())); projectm_set_beat_sensitivity(_projectMWrapper.ProjectM(), beatSensitivity); projectm_set_window_size(_projectMHandle, renderWidth, renderHeight); projectm_set_aspect_correction(_projectMHandle, aspectCorrectionEnabled); projectm_set_window_size(_projectM, canvasWidth, canvasHeight); projectm_set_fps(_projectM, fps); projectm_set_mesh_size(_projectM, _projectMConfigView->getInt("meshX", 48), _projectMConfigView->getInt("meshY", 32)); projectm_set_aspect_correction(_projectM, _projectMConfigView->getBool("aspectCorrectionEnabled", true)); projectm_set_preset_locked(_projectM, _projectMConfigView->getBool("presetLocked", false)); projectm_set_preset_duration(_projectM, _projectMConfigView->getDouble("displayDuration", 30.0)); projectm_set_soft_cut_duration(_projectM, _projectMConfigView->getDouble("transitionDuration", 3.0)); projectm_set_hard_cut_enabled(_projectM, _projectMConfigView->getBool("hardCutsEnabled", false)); projectm_set_hard_cut_duration(_projectM, _projectMConfigView->getDouble("hardCutDuration", 20.0)); projectm_set_hard_cut_sensitivity(_projectM, static_cast<float>(_projectMConfigView->getDouble("hardCutSensitivity", 1.0))); projectm_set_beat_sensitivity(_projectM, static_cast<float>(_projectMConfigView->getDouble("beatSensitivity", 1.0))); projectm_set_texture_search_paths(_projectM, texturePathList.data(), texturePaths.size()); projectm_set_fps(_projectM, static_cast<uint32_t>(std::round(fps))); projectm_set_mesh_size(_projectM, _projectMConfigView->getInt("meshX", 220), _projectMConfigView->getInt("meshY", 125)); projectm_set_beat_sensitivity(_projectM, projectm_get_beat_sensitivity(_projectM) + value); projectm_set_preset_locked(_projectM, _projectMConfigView->getBool("presetLocked", false)); projectm_set_aspect_correction(_projectM, _projectMConfigView->getBool("aspectCorrectionEnabled", true)); projectm_set_preset_duration(_projectM, _projectMConfigView->getDouble("displayDuration", 30.0)); projectm_set_soft_cut_duration(_projectM, _projectMConfigView->getDouble("transitionDuration", 3.0)); projectm_set_aspect_correction(_projectM, _projectMConfigView->getBool("hardCutsEnabled", false)); projectm_set_hard_cut_duration(_projectM, _projectMConfigView->getDouble("hardCutDuration", 20.0)); projectm_set_hard_cut_sensitivity(_projectM, static_cast<float>(_projectMConfigView->getDouble("hardCutSensitivity", 1.0))); projectm_set_mesh_size(_projectM, _projectMConfigView->getUInt64("meshX", 48), _projectMConfigView->getUInt64("meshY", 32));
-
If I add a call to
projectm_playlist_play_next
orprojectm_playlist_set_position
, it crashes onprojectm_opengl_render_frame
. -
Which makes me think it wasn't trying to render any visualization, because it wasn't set before.
-
@jonas exactly!!! makes total sense!
Im testing now Qt6 with lib v3, all presets are pretty good, did not see any bug at all!!!!!
PresetFactory] path is r/share//projectM/presets/Waveform/Wire Tangle/Fireball.milk [PresetFactory] url is /usr/share//projectM/presets/Waveform/Wire Tangle/Fireball.milk [PresetFactory] path is r/share//projectM/presets/Dancer/Glowsticks/LuxXx - The Way God Is Rearranged ix.milk [PresetFactory] url is /usr/share//projectM/presets/Dancer/Glowsticks/LuxXx - The Way God Is Rearranged ix.milk [PresetFactory] path is r/share//projectM/presets/Waveform/Spectrum/suksma - ed geining hateops - flx not caring is my favorite downer.milk [PresetFactory] url is /usr/share//projectM/presets/Waveform/Spectrum/suksma - ed geining hateops - flx not caring is my favorite downer.milk [PresetFactory] path is r/share//projectM/presets/Waveform/Wire Flat Double/Geiss - Motion Blur 2 (Reverse Jelly V3).milk [PresetFactory] url is /usr/share//projectM/presets/Waveform/Wire Flat Double/Geiss - Motion Blur 2 (Reverse Jelly V3).milk [PresetFactory] path is r/share//projectM/presets/Waveform/Wire Tangle/Geiss - Cauldron - painterly 3.milk [PresetFactory] url is /usr/share//projectM/presets/Waveform/Wire Tangle/Geiss - Cauldron - painterly 3.milk [PresetFactory] path is r/share//projectM/presets/Dancer/Glowsticks Mirror/261.milk [PresetFactory] url is /usr/share//projectM/presets/Dancer/Glowsticks Mirror/261.milk [PresetFactory] path is r/share//projectM/presets/Geometric/Cathedral/xtramartin (95).milk [PresetFactory] url is /usr/share//projectM/presets/Geometric/Cathedral/xtramartin (95).milk [PresetFactory] path is r/share//projectM/presets/Waveform/Wire Tangle/suksma - i'm the unestimated (ngas) mash geek - eid (-sdi) nz+.milk [PresetFactory] url is /usr/share//projectM/presets/Waveform/Wire Tangle/suksma - i'm the unestimated (ngas) mash geek - eid (-sdi) nz+.milk [PresetFactory] path is r/share//projectM/presets/Waveform/Wire Flower/cellular growth.milk [PresetFactory] url is /usr/share//projectM/presets/Waveform/Wire Flower/cellular growth.milk [PresetFactory] path is r/share//projectM/presets/Fractal/Nested Spiral/Rovastar - Harlequin's Fractal Encounter - the lord's plan of sadness2.milk [PresetFactory] url is /usr/share//projectM/presets/Fractal/Nested Spiral/Rovastar - Harlequin's Fractal Encounter - the lord's plan of sadness2.milk [PresetFactory] path is r/share//projectM/presets/Reaction/Liquid Windy/Isosceles mashup05.milk [PresetFactory] url is /usr/share//projectM/presets/Reaction/Liquid Windy/Isosceles mashup05.milk [PresetFactory] path is r/share//projectM/presets/Fractal/Lattice Mirror/EoS - Phat - randombox - mantra 5 response lullquestent vlasphume love discipline chastity nz+.milk [PresetFactory] url is /usr/share//projectM/presets/Fractal/Lattice Mirror/EoS - Phat - randombox - mantra 5 response lullquestent vlasphume love discipline chastity nz+.milk [PresetFactory] path is r/share//projectM/presets/Dancer/Whirl Mirror/Tripgnosis - Antiphotonic Dual.milk [PresetFactory] url is /usr/share//projectM/presets/Dancer/Whirl Mirror/Tripgnosis - Antiphotonic Dual.milk [PresetFactory] path is r/share//projectM/presets/Drawing/Trails/Including Adam FX 2 flexi + fishbrain - operation fatcap + Fishbrain and WitchCraft .milk [PresetFactory] url is /usr/share//projectM/presets/Drawing/Trails/Including Adam FX 2 flexi + fishbrain - operation fatcap + Fishbrain and WitchCraft .milk [PresetFactory] path is r/share//projectM/presets/Fractal/Nested Circle/CantStop AdamFX 2 Stahlregen & Bmelgren + EoS + Geiss + Krash + Rocke + Rovastar - Glowstick Heart (MashUp 7) + Rovastar 3.milk [PresetFactory] url is /usr/share//projectM/presets/Fractal/Nested Circle/CantStop AdamFX 2 Stahlregen & Bmelgren + EoS + Geiss + Krash + Rocke + Rovastar - Glowstick Heart (MashUp 7) + Rovastar 3.milk [PresetFactory] path is r/share//projectM/presets/Reaction/Liquid Ripples/Flexi + geiss - the deep diver's cognitive dissonance [cavity + pataoblivion3].milk [PresetFactory] url is /usr/share//projectM/presets/Reaction/Liquid Ripples/Flexi + geiss - the deep diver's cognitive dissonance [cavity + pataoblivion3].milk [PresetFactory] path is r/share//projectM/presets/Geometric/Stripes/one-stop step-by-step deviance cure 13th step devolution reprisal loss-through-finding inverse paradigm degenerating entropy gain.milk [PresetFactory] url is /usr/share//projectM/presets/Geometric/Stripes/one-stop step-by-step deviance cure 13th step devolution reprisal loss-through-finding inverse paradigm degenerating entropy gain.milk [PresetFactory] path is r/share//projectM/presets/Fractal/Core Mirror/AdamFX 2 Geiss - Mash-Up - Angelic Staine Glass Chapters 6.milk [PresetFactory] url is /usr/share//projectM/presets/Fractal/Core Mirror/AdamFX 2 Geiss - Mash-Up - Angelic Staine Glass Chapters 6.milk [PresetFactory] path is r/share//projectM/presets/Waveform/Wire Spirograph/Fumbling_Foo & Flexi, Martin, Orb - Star Forge v14d.milk [PresetFactory] url is /usr/share//projectM/presets/Waveform/Wire Spirograph/Fumbling_Foo & Flexi, Martin, Orb - Star Forge v14d.milk
-
oh noessss
crashed12:01:36.038 DEBUG CollectionModel:541 Container key for 7013 "Dave Dee, Dozy, Beaky, Mick, Tich - All I Want" was not changed, only updating song metadata. 12:01:36.064 DEBUG CollectionModel:627 Song metadata for 7013 "Dave Dee, Dozy, Beaky, Mick, Tich - All I Want" changed free(): invalid pointer Aborted (core dumped)
-
This is the crash I'm seeing with the latest ProjectM code from git.:
[Thread 0x7fffdbe006c0 (LWP 125822) exited] [Thread 0x7fffce0006c0 (LWP 125831) exited] [Thread 0x7fffcd6006c0 (LWP 125832) exited] [Thread 0x7fffccc006c0 (LWP 125833) exited] [Thread 0x7fffc3e006c0 (LWP 125834) exited] [Thread 0x7fffc34006c0 (LWP 125835) exited] [Thread 0x7fffcf4006c0 (LWP 125829) exited] [Thread 0x7fffcea006c0 (LWP 125830) exited] [Thread 0x7fffe74006c0 (LWP 125817) exited] double free or corruption (out) Thread 1 "strawberry" received signal SIGABRT, Aborted. __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44 44 return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO (ret) : 0; Missing separate debuginfos, use: zypper install libSvtAv1Enc2-debuginfo-2.1.1-1.1.x86_64 libavcodec58_134-debuginfo-4.4.4-10.1.x86_64 libavutil56_70-debuginfo-4.4.4-10.1.x86_64 libdrm2-debuginfo-2.4.122-1.1.x86_64 libgcc_s1-debuginfo-14.1.1+git10335-1.1.x86_64 libgomp1-debuginfo-14.1.1+git10335-1.1.x86_64 libgpg-error0-debuginfo-1.50-1.1.x86_64 libstdc++6-debuginfo-14.1.1+git10335-1.1.x86_64 libswresample3_9-debuginfo-4.4.4-10.1.x86_64 libvlc5-debuginfo-3.0.21-2.1.x86_64 libvlccore9-debuginfo-3.0.21-2.1.x86_64 libxvidcore4-debuginfo-1.3.7-3.3.x86_64 nvidia-gl-G06-debuginfo-550.90.07-23.1.x86_64 (gdb) bt #0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44 #1 0x00007ffff3e94a63 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78 #2 0x00007ffff3e41176 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26 #3 0x00007ffff3e28917 in __GI_abort () at abort.c:79 #4 0x00007ffff3e297e8 in __libc_message_impl (fmt=fmt@entry=0x7ffff3fb3321 "%s\n") at ../sysdeps/posix/libc_fatal.c:132 #5 0x00007ffff3e9f3b7 in malloc_printerr (str=str@entry=0x7ffff3fb6518 "double free or corruption (out)") at malloc.c:5772 #6 0x00007ffff3ea1580 in _int_free_merge_chunk (av=av@entry=0x7ffff3fefac0 <main_arena>, p=0x2cc86c0, size=4294967296) at malloc.c:4676 #7 0x00007ffff3ea1889 in _int_free (av=0x7ffff3fefac0 <main_arena>, p=<optimized out>, have_lock=<optimized out>, have_lock@entry=0) at malloc.c:4646 #8 0x00007ffff3ea4133 in __GI___libc_free (mem=<optimized out>) at malloc.c:3398 #9 0x00007fffa97e8cb1 in ??? () at /lib64/libnvidia-glcore.so.550.90.07 #10 0x00007fffa95121c6 in ??? () at /lib64/libnvidia-glcore.so.550.90.07 #11 0x00007fffa989f944 in ??? () at /lib64/libnvidia-glcore.so.550.90.07 #12 0x00007fffa98aec30 in ??? () at /lib64/libnvidia-glcore.so.550.90.07 #13 0x00007fffa9538e78 in ??? () at /lib64/libnvidia-glcore.so.550.90.07 #14 0x00007fffa95a1ac5 in ??? () at /lib64/libnvidia-glcore.so.550.90.07 #15 0x00007fffa9524327 in ??? () at /lib64/libnvidia-glcore.so.550.90.07 #16 0x00007fffa9524ff5 in ??? () at /lib64/libnvidia-glcore.so.550.90.07 #17 0x00007fffa95250f0 in ??? () at /lib64/libnvidia-glcore.so.550.90.07 #18 0x00007ffff476c2ac in libprojectM::Renderer::Framebuffer::RemoveAttachment(int, unsigned int) () at /usr/local/lib64/libprojectM-4.so.4 #19 0x00007ffff476b945 in libprojectM::Renderer::Framebuffer::RemoveColorAttachment(int, int) () at /usr/local/lib64/libprojectM-4.so.4 #20 0x00007ffff47692ff in libprojectM::Renderer::CopyTexture::Draw(std::shared_ptr<libprojectM::Renderer::Texture> const&, libprojectM::Renderer::Framebuffer&, int, bool, bool) () at /usr/local/lib64/libprojectM-4.so.4 #21 0x00007ffff47175f0 in libprojectM::MilkdropPreset::MilkdropPreset::RenderFrame(libprojectM::Audio::FrameAudioData const&, libprojectM::Renderer::RenderContext const&) () at /usr/local/lib64/libprojectM-4.so.4 #22 0x00007ffff47d135b in libprojectM::ProjectM::RenderFrame(unsigned int) () at /usr/local/lib64/libprojectM-4.so.4 #23 0x00007ffff47d55cf in projectm_opengl_render_frame () at /usr/local/lib64/libprojectM-4.so.4 #24 0x0000000000d6e4b2 in ProjectMVisualization::drawBackground(QPainter*, QRectF const&) () #25 0x00007ffff6b78797 in QGraphicsView::drawBackground (this=<optimized out>, painter=0x7fffffffaf10, rect=...) at /home/jonas/Projects/Qt/qtbase/qtbase/src/widgets/graphicsview/qgraphicsview.cpp:3716 #26 0x00007ffff6b7bfea in operator() (__closure=__closure@entry=0x7fffffffaf40) at /home/jonas/Projects/Qt/qtbase/qtbase/src/widgets/graphicsview/qgraphicsview.cpp:3481 #27 0x00007ffff6b7f9c1 in QGraphicsView::paintEvent (this=0x355bbb0, event=<optimized out>) at /home/jonas/Projects/Qt/qtbase/qtbase/src/widgets/graphicsview/qgraphicsview.cpp:3570 #28 0x00007ffff67f5d22 in QWidget::event (this=this@entry=0x355bbb0, event=event@entry=0x7fffffffb400) at /home/jonas/Projects/Qt/qtbase/qtbase/src/widgets/kernel/qwidget.cpp:9112 #29 0x00007ffff688abc6 in QFrame::event (this=this@entry=0x355bbb0, e=e@entry=0x7fffffffb400) at /home/jonas/Projects/Qt/qtbase/qtbase/src/widgets/widgets/qframe.cpp:521 #30 0x00007ffff6888430 in QAbstractScrollArea::viewportEvent (this=this@entry=0x355bbb0, e=e@entry=0x7fffffffb400) at /home/jonas/Projects/Qt/qtbase/qtbase/src/widgets/widgets/qabstractscrollarea.cpp:1064 #31 0x00007ffff6b7e885 in QGraphicsView::viewportEvent (this=0x355bbb0, event=0x7fffffffb400) at /home/jonas/Projects/Qt/qtbase/qtbase/src/widgets/graphicsview/qgraphicsview.cpp:2936 #32 0x00007ffff6888ba7 in QAbstractScrollAreaPrivate::viewportEvent (event=<optimized out>, this=<optimized out>) at /home/jonas/Projects/Qt/qtbase/qtbase/src/widgets/widgets/qabstractscrollarea_p.h:74 #33 QAbstractScrollAreaFilter::eventFilter (this=<optimized out>, o=<optimized out>, e=<optimized out>) at /home/jonas/Projects/Qt/qtbase/qtbase/src/widgets/widgets/qabstractscrollarea_p.h:85 #34 0x00007ffff53639ce in QCoreApplicationPrivate::sendThroughObjectEventFilters (receiver=receiver@entry=0x38559d0, event=event@entry=0x7fffffffb400) at /home/jonas/Projects/Qt/qtbase/qtbase/src/corelib/kernel/qcoreapplication.cpp:1293 #35 0x00007ffff679a131 in QApplicationPrivate::notify_helper (this=this@entry=0x15863f0, receiver=receiver@entry=0x38559d0, e=e@entry=0x7fffffffb400) at /home/jonas/Projects/Qt/qtbase/qtbase/src/widgets/kernel/qapplication.cpp:3288 #36 0x00007ffff679ff53 in QApplication::notify (this=0x7fffffffcba0, receiver=0x38559d0, e=0x7fffffffb400) at /home/jonas/Projects/Qt/qtbase/qtbase/src/widgets/kernel/qapplication.cpp:3241 #37 0x00007ffff5363e07 in QCoreApplication::notifyInternal2 (receiver=receiver@entry=0x38559d0, event=event@entry=0x7fffffffb400) at /home/jonas/Projects/Qt/qtbase/qtbase/src/corelib/kernel/qcoreapplication.cpp:1154 #38 0x00007ffff5363f09 in QCoreApplication::sendSpontaneousEvent (receiver=receiver@entry=0x38559d0, event=event@entry=0x7fffffffb400) at /home/jonas/Projects/Qt/qtbase/qtbase/src/corelib/kernel/qcoreapplication.cpp:1612 #39 0x00007ffff67eddb1 in QWidgetPrivate::sendPaintEvent (this=this@entry=0x2e8c300, toBePainted=...) at /home/jonas/Projects/Qt/qtbase/qtbase/src/widgets/kernel/qwidget.cpp:5655 #40 0x00007ffff680491d in QWidgetRepaintManager::paintAndFlush (this=this@entry=0x3c840f0) at /home/jonas/Projects/Qt/qtbase/qtbase/src/widgets/kernel/qwidgetrepaintmanager.cpp:826 #41 0x00007ffff68051cb in QWidgetRepaintManager::sync (this=0x3c840f0) at /home/jonas/Projects/Qt/qtbase/qtbase/src/widgets/kernel/qwidgetrepaintmanager.cpp:659 #42 0x00007ffff67ef182 in QWidgetPrivate::syncBackingStore (this=this@entry=0x2f6b560) at /home/jonas/Projects/Qt/qtbase/qtbase/src/widgets/kernel/qwidget.cpp:1765 #43 0x00007ffff67f61d7 in QWidget::event (this=this@entry=0x355bbb0, event=event@entry=0x7fffe0021d80) at /home/jonas/Projects/Qt/qtbase/qtbase/src/widgets/kernel/qwidget.cpp:9276 #44 0x00007ffff688abc6 in QFrame::event (this=this@entry=0x355bbb0, e=e@entry=0x7fffe0021d80) at /home/jonas/Projects/Qt/qtbase/qtbase/src/widgets/widgets/qframe.cpp:521 #45 0x00007ffff6888a17 in QAbstractScrollArea::event (this=this@entry=0x355bbb0, e=e@entry=0x7fffe0021d80) at /home/jonas/Projects/Qt/qtbase/qtbase/src/widgets/widgets/qabstractscrollarea.cpp:1011 #46 0x00007ffff6b7e6e0 in QGraphicsView::event (this=0x355bbb0, event=0x7fffe0021d80) at /home/jonas/Projects/Qt/qtbase/qtbase/src/widgets/graphicsview/qgraphicsview.cpp:2807 #47 0x00007ffff679a141 in QApplicationPrivate::notify_helper (this=this@entry=0x15863f0, receiver=receiver@entry=0x355bbb0, e=e@entry=0x7fffe0021d80) at /home/jonas/Projects/Qt/qtbase/qtbase/src/widgets/kernel/qapplication.cpp:3294 #48 0x00007ffff679ff53 in QApplication::notify (this=0x7fffffffcba0, receiver=0x355bbb0, e=0x7fffe0021d80) at /home/jonas/Projects/Qt/qtbase/qtbase/src/widgets/kernel/qapplication.cpp:3241 #49 0x00007ffff5363e07 in QCoreApplication::notifyInternal2 (receiver=receiver@entry=0x355bbb0, event=event@entry=0x7fffe0021d80) at /home/jonas/Projects/Qt/qtbase/qtbase/src/corelib/kernel/qcoreapplication.cpp:1154 #50 0x00007ffff5363eab in QCoreApplication::sendEvent (receiver=receiver@entry=0x355bbb0, event=event@entry=0x7fffe0021d80) at /home/jonas/Projects/Qt/qtbase/qtbase/src/corelib/kernel/qcoreapplication.cpp:1598 #51 0x00007ffff5365098 in QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x355bbb0, event_type=event_type@entry=77, data=0x15c3100) at /home/jonas/Projects/Qt/qtbase/qtbase/src/corelib/kernel/qcoreapplication.cpp:1954 #52 0x00007ffff53652a6 in QCoreApplication::sendPostedEvents (receiver=0x355bbb0, event_type=event_type@entry=77) at /home/jonas/Projects/Qt/qtbase/qtbase/src/corelib/kernel/qcoreapplication.cpp:1786 #53 0x00007ffff6b5479e in QGraphicsViewPrivate::dispatchPendingUpdateRequests (this=0x2f6b560) at /home/jonas/Projects/Qt/qtbase/qtbase/src/widgets/graphicsview/qgraphicsview_p.h:160 #54 0x00007ffff6b47989 in QGraphicsScenePrivate::_q_emitUpdated (this=<optimized out>) at /home/jonas/Projects/Qt/qtbase/qtbase/src/widgets/graphicsview/qgraphicsview.h:241 #55 0x00007ffff6b4cded in QGraphicsScene::qt_static_metacall (_o=0x381fda0, _c=<optimized out>, _id=13, _a=0x3f672a8) at /home/jonas/Projects/Qt/qtbase/qtbase/src/widgets/graphicsview/qgraphicsscene.h:244 #56 0x00007ffff53a89f8 in QMetaCallEvent::placeMetaCall (this=0x3f67260, object=0x381fda0) at /home/jonas/Projects/Qt/qtbase/qtbase/src/corelib/kernel/qobject.cpp:622 #57 0x00007ffff53ac19d in QObject::event (this=this@entry=0x381fda0, e=e@entry=0x3f67260) at /home/jonas/Projects/Qt/qtbase/qtbase/src/corelib/kernel/qobject.cpp:1419 #58 0x00007ffff6b54381 in QGraphicsScene::event (this=0x381fda0, event=0x3f67260) at /home/jonas/Projects/Qt/qtbase/qtbase/src/widgets/graphicsview/qgraphicsscene.cpp:3438 #59 0x00007ffff679a141 in QApplicationPrivate::notify_helper (this=this@entry=0x15863f0, receiver=receiver@entry=0x381fda0, e=e@entry=0x3f67260) at /home/jonas/Projects/Qt/qtbase/qtbase/src/widgets/kernel/qapplication.cpp:3294 #60 0x00007ffff67a18a5 in QApplication::notify (this=0x7fffffffcba0, receiver=0x381fda0, e=0x3f67260) at /home/jonas/Projects/Qt/qtbase/qtbase/src/widgets/kernel/qapplication.cpp:3245 #61 0x00007ffff5363e07 in QCoreApplication::notifyInternal2 (receiver=receiver@entry=0x381fda0, event=event@entry=0x3f67260) at /home/jonas/Projects/Qt/qtbase/qtbase/src/corelib/kernel/qcoreapplication.cpp:1154 #62 0x00007ffff5363eab in QCoreApplication::sendEvent (receiver=receiver@entry=0x381fda0, event=event@entry=0x3f67260) at /home/jonas/Projects/Qt/qtbase/qtbase/src/corelib/kernel/qcoreapplication.cpp:1598 #63 0x00007ffff5365098 in QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x15c3100) at /home/jonas/Projects/Qt/qtbase/qtbase/src/corelib/kernel/qcoreapplication.cpp:1954 #64 0x00007ffff53652a6 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at /home/jonas/Projects/Qt/qtbase/qtbase/src/corelib/kernel/qcoreapplication.cpp:1786 #65 0x00007ffff55e8ef2 in postEventSourceDispatch (s=0x16339a0) at /home/jonas/Projects/Qt/qtbase/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:245 #66 0x00007ffff497f740 in g_main_dispatch (context=0x15d59f0) at ../glib/gmain.c:3344 --Type <RET> for more, q to quit, c to continue without paging-- #67 g_main_context_dispatch_unlocked (context=context@entry=0x15d59f0) at ../glib/gmain.c:4152 #68 0x00007ffff4981388 in g_main_context_iterate_unlocked (context=context@entry=0x15d59f0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4217 #69 0x00007ffff4981a3c in g_main_context_iteration (context=0x15d59f0, may_block=1) at ../glib/gmain.c:4282 #70 0x00007ffff55e86f1 in QEventDispatcherGlib::processEvents (this=0x1630020, flags=...) at /home/jonas/Projects/Qt/qtbase/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:395 #71 0x00007fffef986a84 in QXcbGlibEventDispatcher::processEvents (this=<optimized out>, flags=...) at /home/jonas/Projects/Qt/qtbase/qtbase/src/plugins/platforms/xcb/qxcbeventdispatcher.cpp:96 #72 0x00007ffff536e2e8 in QEventLoop::processEvents (this=this@entry=0x7fffffffc430, flags=flags@entry=...) at /home/jonas/Projects/Qt/qtbase/qtbase/src/corelib/kernel/qeventloop.cpp:100 #73 0x00007ffff536eb2f in QEventLoop::exec (this=this@entry=0x7fffffffc430, flags=flags@entry=...) at /home/jonas/Projects/Qt/qtbase/qtbase/src/corelib/global/qflags.h:34 #74 0x00007ffff5367691 in QCoreApplication::exec () at /home/jonas/Projects/Qt/qtbase/qtbase/src/corelib/global/qflags.h:74 #75 0x00000000004b4926 in main () (gdb)
-
I just saw the visualisations2 branch, gonna take a look!!!
@jonas for libprojectM v4, in ConsumeBuffer, I removed the static cast to short on samples_per_channel and stops segfaulting...
#ifdef HAVE_PROJECTM4 if (projectm_instance_) { const unsigned int samples_per_channel = (map.size) / sizeof(short) / 2; const short *data = reinterpret_cast<short*>(map.data); projectm_pcm_add_int16(projectm_instance_, data, samples_per_channel, PROJECTM_STEREO); }
-
@Gustavo-L-Conte said in Reintegrate projectM Visualizer:
I just saw the visualisations2 branch, gonna take a look!!!
@jonas for libprojectM v4, in ConsumeBuffer, I removed the static cast to short on samples_per_channel and stops segfaulting...
nice nice this visualization2 branch.... its cool to see we had the same ideas and its even better to see then implemented the right way LoL
Okey, compiled, and after removing static_cast<short> on (map.size) I could play a song without crashing... black screen and no overlay, but the selector menu works.
One of the things I did to test yesterday was to succesfully render an animated triangle inside the drawBackground, proving that OpenGL context is working.
I really think Its something with the preset loading like you said, I really think so. Yesterday, after debugging a LOT, including sending random data in ConsumeBuffer, with not a single pixel plot by render_frame, everything indicates that there is a gap between the PCM send and the render_frame; I believe your hypothesis of no preset loaded is the right track here. Even more true since the logo M does not even load. -
@Gustavo-L-Conte
The crash I'm getting isn't related toprojectm_pcm_add_int16
, it's happens when callingprojectm_opengl_render_frame
, I suspect it's NVIDIA related. Problem is that all my computers have nvidia graphics.