xlib, 64bit, pascal
Posted: Sun Jun 14, 2015 12:50 pm
argh... i have been tearing my hair out over this..
i am (always) working on my vst plugin library/framework, and currently i'm trying to get the linux version up to the same 'level' as the windows version.. but i have some serious problems with xlib (i think)..
if i compile a standalone (64bit) binary, the gui and everything works fine, no problems at all..
but when i compile a (64bit) vst plugin (.so), things doesn't look so good.. the behaviour is different in various hosts, so it's hard to find out what's going wrong.. for example, in jost, everything seems to work, haven't been able to crash the plugin(s), and the editor pops up, and works as intended.. but in other hosts - carla, qtractor, bitwig studio, ardour, etc.. it randomly crashes either during the first time the editor/window is opened, or the second time, or some time later.. always during opening.. or the window comes up 'blank'/transparent/unpainted..
i've been suspecting something related to the async nature of xlib, and have added tons of checks and asserts and debugging stuff to try to narrow down the problem.. but no luck so far.. or.. could it be that xlib has some issues in 64bit shared libraries that i'm not aware of?
the code is almost 100% identical to the code i have used in earlier incarnations of the library (axonlib, holos, etc), except that it's now 64bit.. and that it doesn't work reliably.. :-/
so, what do i do now?
i am getting really frustrated by this, and i'm tempted to just forget about it, and concentrate on the windows version(s) instead.. but i don't want to give up just yet..
is there any xlib gurus/experts here that could help me? maybe there's some arcane xlib knowledge that i haven't grasped yet, perhaps it's a xlib vs 64-bit issue.. perhaps something completely different.. just some pointers to things to check, and common pitfalls, or problems, or similar, would help a lot..
here's my library:
https://github.com/skei/kode.pas/
and specifically, here's the window code:
https://github.com/skei/kode.pas/blob/m ... _linux.pas
(where i suspect the problem could be)
it's in pascal, but i don't think it should be too problematic to understand for c/c++ coders, as pascal is quite verbose, and i have tried to keep the code as understandable as i can (well.. tried..)..
anybody?
- tor-helge
i am (always) working on my vst plugin library/framework, and currently i'm trying to get the linux version up to the same 'level' as the windows version.. but i have some serious problems with xlib (i think)..
if i compile a standalone (64bit) binary, the gui and everything works fine, no problems at all..
but when i compile a (64bit) vst plugin (.so), things doesn't look so good.. the behaviour is different in various hosts, so it's hard to find out what's going wrong.. for example, in jost, everything seems to work, haven't been able to crash the plugin(s), and the editor pops up, and works as intended.. but in other hosts - carla, qtractor, bitwig studio, ardour, etc.. it randomly crashes either during the first time the editor/window is opened, or the second time, or some time later.. always during opening.. or the window comes up 'blank'/transparent/unpainted..
i've been suspecting something related to the async nature of xlib, and have added tons of checks and asserts and debugging stuff to try to narrow down the problem.. but no luck so far.. or.. could it be that xlib has some issues in 64bit shared libraries that i'm not aware of?
the code is almost 100% identical to the code i have used in earlier incarnations of the library (axonlib, holos, etc), except that it's now 64bit.. and that it doesn't work reliably.. :-/
so, what do i do now?
i am getting really frustrated by this, and i'm tempted to just forget about it, and concentrate on the windows version(s) instead.. but i don't want to give up just yet..
is there any xlib gurus/experts here that could help me? maybe there's some arcane xlib knowledge that i haven't grasped yet, perhaps it's a xlib vs 64-bit issue.. perhaps something completely different.. just some pointers to things to check, and common pitfalls, or problems, or similar, would help a lot..
here's my library:
https://github.com/skei/kode.pas/
and specifically, here's the window code:
https://github.com/skei/kode.pas/blob/m ... _linux.pas
(where i suspect the problem could be)
it's in pascal, but i don't think it should be too problematic to understand for c/c++ coders, as pascal is quite verbose, and i have tried to keep the code as understandable as i can (well.. tried..)..
anybody?
- tor-helge