Currently, elementary programs crash on termination on macOS (seems
Sierra-specific). This is very nasty, looks like deep memory corruption...
Without valgrind (or like) support on Sierra, it is difficult to
pinpoint the origin of the problem.
Due to the imminient release, and after discussion with @stefan, this
kludge will allow the release to happen.
This commit MUST be reverted just after the release, so we don't
blindfold ourselves!
Ref T5245
flipselector item destructor had a severe drawback and this patch fixes it.
when deleting multiple items at once, the view needs to be updated only once.
however, the destructor updated the view on deletion of
every single item and it caused a severe performance issue.
the worst case happened when deleting a flipselector object -
with 10000 items, it took 10 seconds to finish deletion.
this patch has two points:
1. if a flipselector object is on deletion, item destructor doesn't update the view
2. otherwise, view update is handled in one job for multiple item deletion
Summary:
eina_file_virtualize is causing issues.
memfile_set is better but see attached bt.
What to do???
Reviewers: raster, cedric
Subscribers: jpeg
Differential Revision: https://phab.enlightenment.org/D4743
If the given string is not null-terminated, then strlen() will go out
of boundaries, we must limit the lookup to given 'n' parameter.
To do so use strnlen(), that is a strlen() bounded by a maximum size.
currently it's being defined in evil_fcntl.h, but the actual
implementation of fcntl() in evil_fcntl.c is causing problems with
sockets. So one possibility is to remove the ifdef, another is to
change the implementation.
This is the local socket for windows, analogous to AF_UNIX.
`Efl_Net_Socket_Windows` is the base class doing `ReadFile()` and
`WriteFile()` using overlapped I/O, as well as the close procedure
(`FlushFileBuffers()`, `DisconnectNamedPipe()` and
`CloseHandle()`). These are done on top of an existing HANDLE that is
set by `Efl_Net_Dialer_Windows` (from `CreateFile()`) or
`Efl_Net_Server_Windows` (from `CreateNamedPipe()`).
The overlapped I/O will return immediately, either with operation
completed or `ERROR_IO_PENDING`, which means the kernel will execute
that asynchronously and will later `SetEvent(overlapped.hEvent)` which
is an event we wait on our main loop. That `overlapped` handle must
exist during the call lifetime, thus cannot be bound to `pd`, as we
may call `CancelIo()` but there is no guarantee the memory won't be
touched, in that case we keep the overlapped around, but without an
associated object.
Windows provides no notification "can read without blocking" or
non-blocking calls that returns partial data. The way to go is to use
these overlapped I/O, with an initial `ReadFile()` to an internal
buffer, once that operation finishes, we callback the user to says
there is something to read (`efl_io_reader_can_read_set()`) and wait
until `efl_io_reader_read()` is called to consume the available data,
then `ReadFile()` is called again to read more data to the same
internal buffer.
Likewise, there is no "can write without blocking" or non-blocking
calls that sends only partial data. The way to go is to get user bytes
in `efl_io_writer_write()` and copy them in an internal buffer, then
call `WriteFile()` on that and inform the user nothing else can be
written until that operation completes
(`efl_io_writer_can_write_set()`).
This is cumbersome since we say we "sent" stuff when we actually
didn't, it's still in our internal buffer (`pd->send.bytes`), but
nonetheless the kernel and the other peer may be adding even more
buffers, in this case we need to do a best effort to get it
delivery. A particular case is troublesome: `write() -> close()`, this
may result in `WriteFile()` pending, in this case we wait using
`GetOverlappedResult()`, *this is nasty and may block*, but it's the
only way I see to cope with such common use case.
Other operations, like ongoing `ReadFile()` or `ConnectNamedPipe()`
will be canceled using `CancelIo()`.
Q: Why no I/O Completion Port (IOCP) was used? Why no
CreateThreadpoolIo()? These perform much better!
A: These will call back from secondary threads, but in EFL we must
report back to the user in order to process incoming data or get
more data to send. That is, we serialize everything to the main
thread, making it impossible to use the benefits of IOCP and
similar such as CreateThreadpoolIo(). Since we'd need to wakeup the
main thread anyways, using `OVERLAPPED.hEvent` with
`ecore_main_win32_handler_add()` does the job as we expect.
Thanks to Vincent Torri (vtorri) for his help getting this code done
with an example on how to do the NamedPipe handling on Windows.
While in UNIX we use 'select()/poll()' to query for read fds and this
will eventually callback with "can_read" event, use the loop to match
other implementations where can_read keeps true if not all data was
read.
We have a tag for unstable API, use it. It'll be visible in the
doc and force users to add the macro before being able to compile
code.
This amends d8dd685966.
_elm_gengrid_item_edge_check can have eo_it as NULL if none of widget item
is focused. This could happen if item_focus is not enabled on items.
test case: elm test -> gengrid 2 (enable only "focus hightligt set") and move focus.
@fix
Signed-off-by: Amitesh Singh <amitesh.sh@samsung.com>
We test a second match for a perfect match, then stop all further processing,
but we never test the first match. This leads to a situation where a system
wide .desktop file is given precedence over a local override.
Instead, check the first match too.
#test-e
if buffer canvas is not image object, this needs to emit a move event
to be consistent with other engines
probably this should emit events in all cases, but adding for image buffers
this close to release seems potentially risky so I'll leave that for later
ref 4a691f79df
Summary:
pa_stream's write callback requires to size of stream data
using 'len' parameter.
This size depend on pulse audio's internal status and not
consistent.
When a efl read audio's last stream, length of read('bread')
is less than write callback's 'len' parameter.
If the gap between 'len' and 'bread' is small,
last stream is played fortunately.
Otherwise, the last stream is discarded.
(It is doubtful about pa_stream's pre-buffering.)
To prevent it, push silent stream which is amount
of deficient length.
@fix T5281
Reviewers: raster
Reviewed By: raster
Subscribers: cedric, jpeg, woohyun
Maniphest Tasks: T5281
Differential Revision: https://phab.enlightenment.org/D4726
Summary:
There should be reallocation +1 (for last '\0') and also
checking >0, not !=0, because of getxattr can return -1 in case of error
@fix
Reviewers: cedric, raster, NikaWhite, jpeg
Reviewed By: NikaWhite
Subscribers: myoungwoon
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D4734
the code added by minkyoung has a definite security flaw here trusting
e->response to be within a small range when all it is is an int -
range is not limited other than that... so fix the code to check for
range like further code below does.
this commit went in 2 days ago... so not an existing bug fix.
The things you learn to love...
The situation was:
- An object is mapped (naviframe in an animation)
- One of its children has a mask
- The window is rotated by 90 or 270 degrees (landscape)
The mask glsl code to invert the x,y coordinate depends on the
screen rotation and this somehow was wrong.
Tested on Tizen and in elm_test "Masking", made with @jiin.moon.
@fix
Summary:
Delete check on NULL for icon object due to incorrect work. Function must delete
icon in map overlay (according to documentation) if we set NULL, but with this check -
nothing happening and after elm_map_overlay_icon_get we have not NULL returned value.
@fix
Reviewers: cedric, Hermet, raster, jpeg
Reviewed By: cedric
Subscribers: artem.popov
Differential Revision: https://phab.enlightenment.org/D4720
Summary:
This prevent invalid shared memory access.
Invalid access occur when server is resized sequentially from now to A-size
to B-size, and client receive A resize message after resizing B.
Then client try to render plug image with A-size, but shared memory is B-size
buffer. Size are mismatch. This makes segmentation fault when uploading texture(gl)
or rendering image(sw).
Test Plan: Indicator rendering on Tizen3.0 platform.
Reviewers: jypark, wonsik, dkdk, scholb.kim, jiin.moon, jpeg, cedric
Reviewed By: cedric
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4711
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
If we don't have EGL_EXT_buffer_age then we don't have buffer age - it's
a completely independent extension to KHR partial update.
This partially fixes partial update on recent mali drivers.