Re: Compositor crashes when switching tty

2019-05-31 Thread Pekka Paalanen
On Fri, 31 May 2019 04:39:44 +0100 adlo wrote: > On Fri, 2019-05-31 at 01:22 +0100, adlo wrote: > > On Thu, 2019-05-30 at 13:39 +0300, Pekka Paalanen wrote: > > > > > > Hi, > > > > > > as always, look at the very first problem reported. Other problems > > > may be fallout from the first one,

Re: Compositor crashes when switching tty

2019-05-30 Thread adlo
On Fri, 2019-05-31 at 01:22 +0100, adlo wrote: > On Thu, 2019-05-30 at 13:39 +0300, Pekka Paalanen wrote: > > > > Hi, > > > > as always, look at the very first problem reported. Other problems > > may be fallout from the first one, so fix the first one, and > > repeat. > > > > It is quite easy t

Re: Compositor crashes when switching tty

2019-05-30 Thread adlo
On Thu, 2019-05-30 at 13:39 +0300, Pekka Paalanen wrote: > On Thu, 30 May 2019 00:50:32 +0100 > adlo wrote: > > > Also, there are lots of "Invalid writes of size 8", but a lot of > > them > > don't seem to originate from functions in my program, but from the > > Wayland libraries themselves. What

Re: Compositor crashes when switching tty

2019-05-30 Thread Pekka Paalanen
On Thu, 30 May 2019 00:50:32 +0100 adlo wrote: > On Wed, 2019-05-29 at 08:19 -0500, Matteo Valdina wrote: > > Re-iterate the process.Run valgrind, read the log, search for bugs. > > Until valgrind run smoothly. > Also, there are lots of "Invalid writes of size 8", but a lot of them > don't see

Re: Compositor crashes when switching tty

2019-05-29 Thread adlo
On Wed, 2019-05-29 at 08:19 -0500, Matteo Valdina wrote: > Re-iterate the process.Run valgrind, read the log, search for bugs. > Until valgrind run smoothly. > > Best > > On Wed, May 29, 2019, 02:32 adlo wrote: > > On 29 May 2019, at 03:53, Matteo Valdina > > wrote: > > > > > As valgrind poi

Re: Compositor crashes when switching tty

2019-05-29 Thread Matteo Valdina
Re-iterate the process. Run valgrind, read the log, search for bugs. Until valgrind run smoothly. Best On Wed, May 29, 2019, 02:32 adlo wrote: > On 29 May 2019, at 03:53, Matteo Valdina wrote: > > As valgrind pointing out at shell.c line 982 > > shell = zalloc (sizeof (shell)); > > Here you a

Re: Compositor crashes when switching tty

2019-05-29 Thread adlo
> On 29 May 2019, at 03:53, Matteo Valdina wrote: > > > As valgrind pointing out at shell.c line 982 > > shell = zalloc (sizeof (shell)); > > Here you are allocating the pointer size not the structure size. You probably > want type Shell. > This reduces the amount of crashing, but does not

Re: Compositor crashes when switching tty

2019-05-28 Thread Matteo Valdina
As valgrind pointing out at shell.c line 982 shell = zalloc (sizeof (shell)); Here you are allocating the pointer size not the structure size. You probably want type Shell. Best Matteo On Tue, May 28, 2019 at 9:36 PM adlo wrote: > On Tue, 2019-05-28 at 13:38 -0400, Adam Jackson wrote: > > On

Re: Compositor crashes when switching tty

2019-05-28 Thread adlo
On Tue, 2019-05-28 at 13:38 -0400, Adam Jackson wrote: > On Tue, 2019-05-28 at 08:26 +0100, adlo wrote: > > When switching tty, my compositor crashes with error messages such > > as > > > > free (): invalid size Aborted (core dumped) > > or > > malloc (): invalid chunk size > > This means somet

Re: Compositor crashes when switching tty

2019-05-28 Thread Adam Jackson
On Tue, 2019-05-28 at 08:26 +0100, adlo wrote: > When switching tty, my compositor crashes with error messages such as > > free (): invalid size Aborted (core dumped) > or > malloc (): invalid chunk size This means something is corrupting the malloc arena metadata. Run your compositor under val

Compositor crashes when switching tty

2019-05-28 Thread adlo
When switching tty, my compositor crashes with error messages such as free (): invalid size Aborted (core dumped) or malloc (): invalid chunk size when running on the DRM backend. Here is my code: https://github.com/adlocode/xfway/blob/master/src/main-wayland.c https://github.com/adlocode/xf