Roadblocks to Fixing Known Issues

Cover Photo by Ashkan Forouzani on Unsplash

I have been working on Ink Calendar since October 2017. Since then the app has grown to be much more capable and complex. When developing I expect there will be issues with my code, but as I have discovered there are also major issues with Windows APIs. In this post I plan to layout the issues I have been trying to fix for years with no success.

Ink Analysis Crash

One of the obvious hallmarks of Ink Calendar is the inking. Inking is different than traditional computer inputs like keyboard and mouse. A powerful inking experience requires quick selection and the ability to convert from ink to text. Lucky for me Microsoft makes this very easy with an API.

However this same magical API called InkAnalysis is the single biggest source of instability within Ink Calendar. My personal guess is this API is not heavily used because it has not improved or changed since I have been using it. Also Microsoft’s documentation on how to isolate the application from the InkAnalyzer does not exist. I have been working with the team to resolve issues; so far with no success.

Calendar API Errors

The other headline feature in Ink Calendar is the Calendar part. When users ink on a day and want to add that day to their Calendar in a more formal way there is a very easy API which can be called to add the appointment to the user’s calendar. However this API is frequently and randomly broken. No good feedback on a successfully added appointment. This means as a developer I have to guess if the appointment was added or the dialog was just canceled by the user.

Within the same AppointmentManager API is getting the user’s calendar appointments to show them on the calendar. This also is broken randomly and does not provide up-to-date appointment data. This completely prevents Ink Calendar from being able to provide a seamless calendar application. There is no clear way to connect with Microsoft regarding this issue and I have tried several different avenues.

Azure Pipelines

Building UWP apps and submitting them to the Microsoft Store should be the easiest Azure Pipeline that exists, but it is such a terrible experience there is no wonder UWP was never widely adopted. When users finally get pipelines working they randomly break with totally unhelpful error messages “internal compiler error.”

Does Microsoft Want UWP Developers to be Successful?

It doesn’t seem like it. When compared to other platforms like iOS and Android, UWP devs have no advocates within Microsoft. All of the recent developer and technology investments have been made last and worst for UWP experiences. Azure DevOps, AppCenter, C# language, .NET 5, are best when not developing a Windows GUI application. UWP is ignored and abandoned. Microsoft’s own 15 year old framework WPF has gotten more support than UWP.

I want to be an independent UWP developer, but as time goes on it becomes clear UWP is the bastard child of Microsoft.

Selection Time in 2.1

Work has been going well on Ink Calendar 2.1. The major new feature is selection time. This feature is simple; on week and month views, show text of when the selected ink is. There is a dot which will highlight the exact location being picked when trying to understand the date.

I personally find this feature useful when planning out an itinerary for trips. When I’m zoomed in tight on a week view it can be hard to tell which hour is which and which day is which. Now with selection time it is obvious.

In addition to selection time 2.1 should be faster to load views, more memory efficient, and hopefully fixes a few bugs.

As always, thanks for using Ink Calendar,

Joe

Freezing and Crashing issues

Finding and fixing bugs is a constant struggle with any software. It has been a painstaking process of narrowing down exactly what and where the bug resides in code. With Ink Calendar I group crashes into a few different categories.

  • File read/write
  • Microsoft Graph
  • Unspecified Error
  • null References

Recently I was emailed by a user who mentioned OneNote was unstable until they turned off ink analysis. So in Ink Calendar version 2.0.7 there is a new toggle switch to disable ink analysis.

Turning off ink analysis should help with crashes. If you make this switch and it helps please let me know. The ink analysis is a Windows 10 API, so if there is an issue, I’ll collect what I hear from users and reach out to Microsoft.

Other than analysis issues file read/write issues are largely related to the Microsoft Graph which does the cloud syncing. I can improve the cloud service, but some things are beyond the scope of Ink Calendar.

Finally null reference errors almost all come from getting appointments from Windows 10. The Windows 10 appointments API has some issues with not getting fresh appointments. Also there maybe intermittent access issues resulting in null references. There is a helper in Ink Calendar which checks to see if Ink Calendar has access to the user’s calendars. Even though this check runs before attempting to get calendar data, the data can still return null.

If you are seeing consistent repeatable crashes with Ink Calendar I would like to hear from you so I can get to the bottom of the issue.

As always thank you for using Ink Calendar and please feel free to email me (support at inkcalendar dot com).

Joe

Version 2.0 Work Slow and Steady

The biggest feature request has been cloud syncing feature. With such a big improvement comes a bump to version 2.0. Also on the way with this release comes a refresh to the apps icon set.

The cloud sync plan was going to be a custom hosted cloud service. However, the best long term solution for every option is the Microsoft Graph. Ink Calendar 2.0 will enable users to login with their MSA and sync via OneDrive.

All of the symbols throughout Ink Calendar are being refreshed with Microsoft’s new fluent icons. They are natural and fit the natural shape of inking better than the previous symbol set.

Work is ongoing and hopefully be finished soon. While I want this release to be perfect I also needs to get into users hands to increase their productivity.

Joe

Simple Elements and Bug Fixes

For years I’ve been adding features to Ink Calendar making it more complex. At the same time I’ve been tracking and squashing bugs. This is the classic cycle of app development. With Ink Calendar 1.27 I’ve broken the UI elements into smaller chunks making it easier to reuse them and to find exactly where the bugs are happening.

Since Ink Calendar uses calendar data from Windows 10 that means many of the calendar views are drawn using async methods. Understanding failures in async methods via AppCenter can be tricky. By breaking down the rendering of each UI component into their own UserControl I’ve been able to narrow down exactly where errors are occuring.

Another way 1.27 is more reliable and robust will be in the settings page. The page loading sequence has been reordered to put the longest running tasks at the back and let data validation occur while those long running tasks are happening. Now working hours, agenda start/stop, and week start/stop times should all validate before saving bad data. This was an issue which can be hard to find on my development machine because usually the settings page loaded so fast, but personal usage on my Surface Go highlighted this problem.

The work done in 1.27 doesn’t bring any new major features to users, but should enable me to do some cool view blending in the future. Now that each of these controls are broken out on their own they can be inserted into different views in different ways. Look forward to a possible new blog post about how views could be changing.

As always, thank you for using Ink Calendar. If you encounter any issues please email support at inkcalendar dot com, and if you have any suggestions or ideas I’m always interested to hear!

Joe

WinUI Comes to Ink Calendar

Ink Calendar now makes use of WinUI with version 1.26. In addition to this new modern UI framework comes many changes and bug fixes throughout the app. One of the elements of Ink Calendar which has been improved is when tapping the canvas even when Ink is not selected the Ink Actions menu appears to make you more productive and bring information to your fingertips.

Previously tapping on the inking canvas would just select ink. Now tapping the canvas invokes the Ink Actions menu with a new day button. This button when tapped shows appointments and the ability to quickly jump to different views. The new improvement to the Ink Actions menu means you can more quickly see appointments and can more fluidly switch between days.

When in the year view tapping on any day will enable the Ink Actions menu to show appointments for that day. Quickly zoom into a view or skim a quick list of appointments. In addition to this working on the year view, it also works when tapping the month days shown on the day view. Quickly peak into another day and see what you have going on.

In addition to these changes there have been many bug fixes throughout the app. One major change is handling the way Ink Calendar interacts with the Windows 10 Calendar data. Now when Ink Calendar does not have access to the calendar data the user is notified with a list of steps to take.

If you have any feedback about Ink Calendar don’t hesitate to email support at inkcalendar.com

Joe

Custom View Appointments and Bug Fixes

After releasing Ink Calendar 1.25.3 work began on bringing appointments to the custom views. No major issues were found with the custom views, but there have been nagging bugs within Ink Calendar which have been very difficult to understand what is happening. In addition to rewriting the appointment render logic I have been focusing on every error I see in Microsoft AppCenter.

Appointments

Adding appointments to custom views meant writing as a patchwork of controls which held the smallest size of a appointment canvas. For example the month view shows appointments for a single day, but multi-day appointments stretch over a single day. This means there needs to be a control which displays a week of days and overlays appointments correctly.

Fighting Bugs

With all new features there is the possibility of bugs and crashes. One of the more common crashes I was seeing after introducing Custom Views was “The added or subtracted value results in an un-representable DateTime.” It is unclear why or when this happens. I have several theories but none of them seem to remove this issue altogether.

The issue can be mitigated by making sure the DateTime isn’t of year 0 which would not work when adding a previous year. However maybe this issue happens because the ViewStateHistory list crashes due to File Access Violations. This is also unclear because the actual failure has nothing to do with the ViewStateHistory. What makes me think the ViewStateHistory could be involved is a blank ViewStateHistory could drive the main view constructor to start from a DateTime of 0,0,0.

All this to say bugs are tricky and the hardest part is finding what is failing. Hopefully 1.25.9 will bring an end to this bug and small improvements all over Ink Calendar. Thanks as always for reading.

Joe

Finally, Custom Views

From the first prototypes of Ink Calendar over two years ago I have wanted to add the ability to create arbitrary views representing specific projects or seasons. Now that time has come with version 1.25 of Ink Calendar.

Why use Custom Views?

Planning long term projects is never easy. Looking forward and plotting out when and how to get work done seems like it should be easy. Hopefully with Custom Views Ink Calendar can become a tool which makes long term planning easy and pain free.

At work I have a few long term projects which span several months. Being able to start a new view dedicated to this project enables me to see where I am and where I need to go. Not flipping through months but one unified view for everything.

Planning for a marathon? Planning travel schedules? Use a Custom View to see the schedule. Keep it as organized as you need. Be flexible and ink the way which feels natural.

How to use Custom Views

  1. Click the “All Views” button which opens a pane on the right side of the app
  2. Switch to the “Custom” section of the pane
  3. Click “+New Custom View” at the bottom of the pane
  4. Set all of the details as you want them and click “Done”
  5. Now the view you created will open and now be visible in the All Views Pane

This is the beginning of this feature and I plan to add more details and features to custom views over the coming weeks and months. Please let me know what you are most interested in seeing what is not working.

Joe

Deep Dive: “Why can’t I see ink from other views on the current view?”

Users have asked this question a couple of times. If you have ink on a day in the month view, then switch over to the week view, shouldn’t you be able to see what is written on the month view? Currently there is no mixing between views and this was a design decision but also a technical/UX roadblock.

Design Decision

The way I use Ink Calendar drove the way I designed the app. Year view represents my long term planning. When will I be traveling, when holidays land and how I’m going to use my vacation time. I use month views for daily tracking, jumping quickly between months and looking at what’s coming up in a couple weeks.

Week view is for hour by hour planning of the work week or weekend. When to expect things to come and go. Day view is used when I need to nail down a specific agenda for a day. Like there is a lot going on and I need to know where people are going to be and what is going on.

By these standards I have no need to see all of the different views overlapping each other. Generally I view Ink Calendar as a way to organize my thoughts and plans quickly and easily. When I need to share an event with someone or let it span views, then I add an appointment to my calendar.

Distraction and clutter free planning has always been a core design intent of Ink Calendar. I want to make it easy to jot down timelines and move them around. Overlapping ink from all different views on to a single view would not mesh with this design. Views would become extremely crowded and busy.

Technical and UX Roadblocks

Currently Ink Calendar relates one view to one ink file. Each ink file is loaded into an InkCanvas control. If I were to show week view ink on top of month view ink then any new ink would be added to the week view ink file. Parsing user intent on where they expect the ink to save and load gets complicated and nearly impossible to disentangle.

If the InkCanvas views were not overlapping, but laid out in some sort of side by side arrangement then there would need to be an InkCanvas control for each view. This could work, but it would make for a confusing user experience where a single pen stroke could not span the different views.

Ink Calendar currently can use a lot of RAM from loading views to the right and left of the current view. If one view contained the ink of four different views, then the RAM needs would be much larger. Since I typically use Ink Calendar on a Surface Go, I have no expectation that it would preform well, especially if there is a lot of ink.

It may be possible to have a merged view which shows all of the different views for a particular day. I have been looking into how to render views out as .jpg files. This could help the performance problem and give a unified view to show what is going on at every level for a single date.

Continuous Improvement

If you are reading this and believe I have completely missed something or have a novel idea on how to solve this tricky situation then please let me know. I am going to experiment with adding ink between different views in different ways to see how it feels and looks, however I do not know how it will turn out.

Finally, throughout the development process decisions get made at every fork:

  • Should the ink be editable in a different InkCanvas or just view only?
  • Should year view ink be shown in the day view calendar?
  • Should I add a truncated week to the top of the week view?
  • What about the partial weeks at the end of a month, merge or overlap them?
  • Show the view-only ink as transparent?
  • Could users ink over the view-only ink?
  • Should that ink get shown on the month view?

All things considered this is a tricky problem where every users might have unique expectations. I’m not ruling this out as a possiblity, but I do not want to spend hours and hours on this feature which is only important to a small set of users. My time will probably be better used working on a cloud sync service or some other more broad appeal feature.

Please let me know what you think about all of this, and as always thanks for using Ink Calendar!

Joe