log 2021 #2398
kjk
started this conversation in
Documentation
log 2021
#2398
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
A daily log of changes and commentary. An experiment of sorts.
2021-12-23 Fri
unfortunately it marks the file as having unsaved annotations
2021-12-14 Tue
2021-12-08 Wed
Also shortened some loops since for (x : a) works on static arrays
Using https://devblogs.microsoft.com/performance-diagnostics/sizebench-a-new-tool-for-analyzing-windows-binary-size/
It's kind of piece of shit but butter than nothing
2021-12-03 Fri
a mismatch between Annotation* kept in EditAnnotationsWindow
and Annotation* from outside.
2021-12-02 Thu
fix management of tooltips for tags (fixes pre-release tabs tooltips bug #2247)
still not a great solution. This information should be stored
on TabsInfo and TabsCtrl2 should only manage ITab objects that
provide needed info
strip 'mailto:' when copying links to clipboard (fixes Email option needed #2244)
2021-11-05 Fri
take access lock in GetToc() (fixes Crash Report, While opening a text book #2229)
there might be more locking lacking
add Shift-F12 shorcut to toggle bookmarks (in addition to F12)
This is for use under Visual Studio. F12 triggers a breakpoint,
which is annoying
hide cursor immediately on F5 and fix cursor hiding regression (fixes Cursor doesn't hide in fullscreen mode #2231)
There was a regression in 3.3 where the cursor in F5 (full-screen) was not auto-hidden
the second time
There was also an issue (probably always present) that hiding a cursor in
EnterFullScreen() was a no-op because would get over-ridden by OnMouseMove()
which is triggered after entering full-screen (which makes sense because it
re-positiones a window and therefore mouse position changes)
restore multi-frame images (tif and gif) (fixes Multi-Page Tiff regression in recent build #2234)
fix tooltips to always show the right text (fixes Tooltip and URL creation errors, 3.4.1.4210 pre-release #2233)
turns out TTM_NEWTOOLRECT doesn't change the text shown by tooltip
so we remember what we show and if it changes, we TTM_DELTOOL
and then TTM_ADDTOOL it. There might be a simpler way
(TTM_GETTOOLINFO followed by TTM_SETTOOLINFO?)
2021-10-26 Tue
2021-10-25 Mon
2021-10-22 Fri
fix generating corrupted PDF when doing 'save to new pdf' twice (fixes annotation editing & saving PDF results in corrupt PDFs in slightly advanced scenarios #2206)
was doing something that wasn't supported by mupdf
re-enable opening fb2 inside .zip and support .fbz extension (fixes Support Fiction Book extensions #870, fixes Restore opening fb2 files inside .zip #2147)
don't show favorites when reloading prefs (fixes Reloading prefs causes Favorites to show up #2145)
still not perfect: we don't save preferences after changing state of showing favorites
swap keyboard shortcuts 'i' and 'shift - i' (fixes swap keyboard shortcuts 'i' and 'shift - i' #2210)
better handle URLs in EngineMupdf
2021-10-20 Wed
removed TocTreeClick handler because it duplicates the work
of selection changed handler
There were 2 problems. OnMenuSaveAs() didn't handle defExt being null
defaultExt for EngineCbx was null because defaultExt field
was hiding one in EngineBase.
2021-10-17 Sun
2021-10-15 Fri
2021-10-04 Mon
2021-09-29 Wed
lesson: should have tested bigger changes like that
seen in crash reports
2021-09-23 Thu
turned out to be quite simple
2021-09-14 Tue
was caused by refactoring
2021-09-12 Sun
2021-09-02 Thu
2021-09-01 Wed
do
2021-08-31 Tue
2021-08-30 Mon
2021-08-27 Fri
2021-08-26 Thu
2021-08-25 Wed
2021-08-22 Sun
2021-08-21 Sat
2021-08-20 Fri
2021-08-17 Tue
should test with more files
2021-08-11 Wed
2021-08-10 Tue
not sure why it broke
2021-08-08 Sun
2021-08-05 Thu
2021-08-04 Wed
2021-08-03 Tue
When extending EngineMupdf to handle more file types I broke
loading with IStream because previously, it was always a pdf
and now we need to tell which kind of file we're loading
by either mimetype or file extension
the fix is to propagate a dummy name that indicates file type
still don't get why I wasn't getting those crashes in debug builds
(so I couldn't reproduce them)
2021-08-02 Mon
2021-08-01 Sun
2021-07-31 Sat
was broken during TreeModel refactor
I think the issue in the latest comment with PDF generated
by overleaf is that there are PDF_ANNOT_SCREEN annotations
that are not handled by mupdf (it prints
"cannot create appearance stream for Screen annotations" message).
they are shown by pdf.js so possibly valid
2021-07-30 Fri
a regression from previous rewrite
should have tested it more
silly typo, should have tested
they store mupdf context in a global fz_hb_secret, which gets
set during html layout in html_layout.c. They have locking
around it which works as long as all threads share ctx and their
locks. It doesn't work when multiple threads use different
fz_context (in Sumatra: opening multiple epub files at the same time)
2021-07-29 Thu
2021-07-28 Wed
2021-07-27 Tue
2021-07-25 Sun
2021-07-24 Sat
chmlib cleanups
progress on fmt::Format
tweak project for zlib-ng
shorten api of Fmt class
rework StrFormat.cpp to be smaller
fix crash regression in reloading 'r' (fixes Crashes continued in 13866 #2055)
use RemoveBadMenuSeparators() in TocContextMenu()
add website-api
fixed PoolAllocator when allocating large chunks (fixes Debug crash in pool allocator #2056)
Debug crash in pool allocator #2056
needs unit tests for PoolAllocator
fix PalmDoc overwrite of WStrVec allocator in debug build (fixes Crash in Allocator::Alloc #2057)
I think str::Str was compiled in DEBUG but EbookDoc.cpp in release
and there was a mismatch between what the layout of str::Str in PalmDoc struct
was vs. what the code in str::Str thought it was. str::Str has nRealloc
variable which was within #if defined(DEBUG) but due to mismatch shared memory
with the first word of the next object, which happened to be WStrVec::allocator.
Changing nRealloc would over-write allocator, leading to crashes.
2021-07-23 Fri
2021-07-22 Thu
2021-07-21 Wed
didn't notice this in code review
Support custom translators for text selection in advanced settings #2046
2021-07-20 Tue
version number showed wrongly, SumatraPDF-prerel-13767 64bit #2040
stupidly removed code when fixing -x extraction
should review code more carefully
2021-07-19 Mon
a case where should have double-checked after changing what looked like incorrect code
(but was correct)
2021-07-18 Sun
was causing debug crashes because I assumed it was a valid page number
and probably was causing tooltips to not show up properly
seen debug crashes from win::menu::SetText() for non-existent menu items
2021-07-17 Sat
A typo when refactoring ToCodePage function when allocated buffer
for the right code page but tried to convert to utf8, sizes mismatched
thankfully had debug assert to catch this
a typo from refactoring toc generation; flipped condition for detecting
toc exists or not
don't send crash reports from debug builds
Debug crashes in DisplayModel::CvtToScreen() due to invalid pageNo #2035
2021-07-16 Fri
2021-07-15 Thu
take into account the language of user
Shift + 'i' does what 'i' used to do i.e. show page number info
2021-07-14 Wed
Tooltips are very annoying to use. Underdocumented and insane API.
Tab code is also very annoying currently.
2021-07-13 Tue
in retrospect, we didn't need to split projects into
"foo" and "foo-opt"
2021-07-12 Mon
2021-07-11 Sun
2021-07-10 Sat
also re-implement TempToUtf8 and TempToWstr
2021-07-09 Fri
kind of expected regression from menu refactor. In refactor lost ability
to ensure we never have trailing separator at the end.
Fixed by adding code to remove trailing separator if we happen to add one
Regression from Odd refresh misbehaviour since between 3.3.112932 and 3.3.112965 #1752
where I changed scroll position from int to float but didn't change
the serialization as int
2021-07-08 Thu
2021-07-07 Wed
also fixed moving annotations - a regression caused a crash because I deleted annotation
prematurely
2021-07-06 Tue
must process the file before setting rotation
Incorrect page rotation in DjVu file #1593
2021-06-29 Tue
2021-06-26 Sat
must have been regression from mupdf update where they changed
how they encode PDF destination info
2021-06-22 Tue
2021-06-20 Sun
probably introduced when I did refactor of geometric structs like Point/PointF
missed the ones generated by settings structs
only had to unmark the setting as internal
2021-06-19 Sat
Create Annotation
context menu and fix Inconvenient to edit existing annotations #1992split
Create Annotation
intoCreate Annotation From Selection
andCreate Annotation Under Cursor
.When using
Edit Annotations
menu, select annotation under cursor (fixes Inconvenient to edit existing annotations #1992).Annotation odd color behaviour in 3.3.13397 #1974
add _TRU() and trans::GetTranslationATemp() to get translation as utf8
use "Background Color" instead of "Color" for Free Text annotation
win => ew renaming for EditAnnotationsWindow
2021-06-18 Fri
2021-06-17 Thu
2021-06-13 Sun
2021-06-12 Sat
2021-06-11 Fri
2021-06-10 Thu
2021-06-09 Wed
2021-06-08 Tue
2021-06-07 Mon
mupdf does that but not sure if that was the right behavior
use shift+a to also open annotation editor
2021-06-06 Sun
2021-06-05 Sat
a crash when pressing 'q' on empty window. a regression from
recent change.
lesson: more testing even when making seemingly simple changes
(will be easier to review diffs after notion import in the future).
this document is somewhat of an edge case in that it has toc items with
lots of children and ChildAt(n) would always traverse from first child,
creating a quadratic time complexity.
still not fast enough for this particular document but at least now
the time is spent fully in windows TreeCtrl code.
the trick was to insert children in reverse order, as per
https://devblogs.microsoft.com/oldnewthing/20111125-00/?p=9033
2021-06-04 Fri
2021-06-01 Tue
2021-05-31 Mon
2021-05-30 Sun
previously we would only open .txt files if advanced setting
"open ebooks with mupdf engine" was true.
2021-05-29 Sat
we consistently start with 2019 Preview.
picked pages. This speeds up stress testing by avoiding rendering really
big documents.
2021-05-28 Fri
the treeview selection to match the current page. In 3.1.2 we would limit
auto-select to currently expanded items. In 3.2 we would auto-expand
tree item to make selected tree item visible.
Fixed it in 4960ce5
The TreeCtrl / TreeModel still has problems.
To make things efficient TreeItem shouldn't be a class but an
opaque pointer-sized handle and it's items should belong to
TreeModel. This would allow us to potentially optimize how we store
information. Currently we have to create TreeItem object for
every node.
Changes to TreeCtrl are not reflected in TreeModel. Maybe
they shouldn't but then we should be more clear about it
in the code.
Folded premake5.opt.lua into premake5.lua. When changing flags
in premake5.lua I would always forget to update premake5.opt.lue
Now relevant projects are close together and in the same file
so maybe less mistakes in the future.
On a treemodel branch, redid TreeModel interface, by folding TreeItem
methods into it. This is to open possibility for more efficient implementation
of TreeModel. Even now the code should be a bit smaller by removing methods
from what were TreeItem subclasses.
Links to /settings3.3.html and /settings/settings3.3.html were broken because
Cloudflare Pages doesn't handle HTML files with '.' in the name.
Had to change naming scheme to /settings/settings3-3.html
Fixed Notion HTML generation to not generate files with '.' in them.
2021-05-27 Thu
Added support for .xps files with jpeg-xr images in them.
mupdf has code that uses open-source jpeg-xr library but we used
to have decoder that used Windows built-in codec. This got lost
during the big mupdf merge.
I resurrected this code and tweak it a bit.
0d5ae4e
b16fda1
Fixed building on GitHub Actions caused by msbuild changes in
Visual Studio 2019 Preview.
In the past "msbuild /t:test_util" worked just fine.
In latest it has to be "msbuild /t:test_util:Rebuild".
No idea why ":Rebuild" (also tried just ":Build" but it didn't work).
2fa0bcf
348d27f
2021-01-02 Sat
2021-01-01 Fri
2020-08-17 Mon
2020-08-16 Sun
2020-08-15 Sat
2020-07-26 Sun
Luckily can do it step-by-step.
change DisplayMode to enum class.
2020-07-25 Sat
Fixed #1286
'i' would show page number only temporarily (persistently with SHIFT)
and only in full screen.
Make it work always and toggle the info.
It could be improved (no close button, don't dismiss with ESC like
other notification windows, no flickering of notification window).
fixed #1711
(and #1454 most likely).
When the cache of rendered pages is full, we free a page. If we happened to
free a page from the document in the current tab, it would lead to free / re-rerender
cycle and flickering.
The fix is to make sure we only free from other tabs.
Not perfect (if it's a visible tab in a different window, we'll probably flicker).
The right approach would be to make the cache expand in FreeIfFull()
if we can't find invisible page to drop (e.g. by using linked list
to store cache entries or by having e.g. 256 over-flow entries).
fixed #1712
Lots of debugging but the root cause was simple: notifications window
is a child of canvas window. it was flickering because a paint of
canvas would paint over notification window.
Fixed by telling canvas window to clip children.
We should make it more flexible and more efficient to add stuff to be
drawn on canvas.
2020-07-10 Fri
handle pdf_annot_author() throwing (fixes #1673)
don't crash when trying to restore deleted file (fixes #1674)
it was a regression from the fix for saving preferences.
probably not the best fix, should fix the fact that prefs::Save()
deletes gGlobalPrefs->sessionData while 're iterating on it
2020-07-09 Thu
2020-07-08 Wed
Parallelized doit -clang-format. Go concurrency is a joy.
implement EngineMupdfHasUnsavedAnnotations() and bug-fix detection
of when to show 'Save PDF' button in annotations editor.
update mupdf.
this was a big one because mupdf switched to using gumbo
as html/xml parser.
2020-07-07 Tue
Added creation of highlight, squiggly, strikeout and underline
annotations.
Replaced EngineMupdf::IsLinearizedFile() with mupdf's pdf_doc_was_linearized.
It didn't exist when IsLinearizedFile() was written.
Removing code feels good.
2020-07-06 Mon
Fixed a bunch of issues related to bugs in freetype and not
compiling Sumatra with the exact same freetype options as mupdf.
Introduced when I updated freetype code.
Removed .smx support. It's a lot of work to add support for all
PDF annotations (for each annotation type need to write code
to serialize it, de-serialize it, draw the annotation for
each engine type).
It's also sumatra-only and I suppose the majority of people
just want PDF annotations.
Might resurrect if there's a lot of requests for it.
2020-07-05 Sun
Link to the commit on pre-release and daily build pages.
Fixed a long-standing issue of loosing list of opened files
if Sumatra crashes or get killed by Windows (e.g. due to restart).
Took so long to fix becaue I believed the code is correct.
Turns out prefs::Save() was haphazardly used. It's still
not great but at least this specific error is fixed.
To be even more robust we should periodically (every 5 min?)
call prefs::Save(). We only do it after opening and closing a file,
which means that if we scroll etc., we'll loose this info.
Coding style refactorings: change enum SettingType to enum class,
change SerializeStruct() and SerializeGlobalPrefs() to return std::span.
Fixed #1661
Another example of broken PDF that can be better handled if we
relax parsing of PDF (cmap).
Fixed #651
Managing focus is tricky.
2020-07-04 Sat
Improving WStr the same way as Str, while we're in this area.
make ByteWriter manage it's own buffer. In retrospect it's
better API than passing a buffer.
2020-07-03 Fri
De-templetizing WStr implementation. Currently it's a subclass
of Vec.
Yes, duplication of code is bad but so are templates.
Reading code where you see T instead of WCHAR is significantly
worse.
The more stuff there is in .h files, the more code uses
templates, the longer are compilation times.
Templated code must be in .h file.
While I can't fix long compilation times, I can try to keep
them as fast as possible.
Also an opportunity to make the API smaller.
Optimized str::Str on 64-bit by changing type of len/cap from
size_t to u32.
Optimizing Str. Turns out that after de-templatizing the code
became easier to understand and opportunities for optimizations turn up.
The optimizations are pretty nasty (re-using the same memory for
more than one purpse) but worth doing for such a fundamental type.
2020-06-29 Mon
Beta Was this translation helpful? Give feedback.
All reactions