Starcounter 2.3.0 Release Notes

May 22, 2017 1:34 pm Published by Leave your thoughts

Starcounter is now released as the new release version. Some of the important changes are:
1. Asynchronous transactions with Db.TransactAsync
2. Upgrade to Polymer 1.8.1
3. New installer

Changing from the previous release version,, to this one requires unloading and reloading the database. Instructions for that can be found in the docs.

This version also comes with a wide range of stability improvements and bug fixes. Read about all the changes below.


  • Fixed infinite waiting loop in the installer when the installation folder was not empty.
  • Starcounter installer now support installing extension in VS 2017, and using another install approach
  • Added support to install the Starcounter Visual Studio extension in VS 2017, by means of manually doing so using a provided Starcounter.VS15.vsix package
  • New compatiblity verification scheme when building projects, assuring projects target a compatible version
  • Support for new staradmin start cleaner command, allowing database cleaning
  • Fixed bug in VS extension, caused by VS Update 3, causing VS to hang when a project without a .suo file was opened from the shell
  • Distributed new extension 1.0.4, due to mismatch in 1.0.3


  • Improved the message coming from exceptions when applying jsonpatches
  • Disabled gzipping for static file resources in the Web server
  • By default PartialToStandaloneHtmlProvider Polymer uses native Shadow DOM if available
  • Removed obsoleted method IResource.GetHtmlPartialUrl from interface and implementations.
  • Including location of session in the response for the standalone html from the PartialToStandaloneHtmlProvider middleware to solve problems with mixed up sessions when several tabs are used
  • Removed automatic adding of Set-Cookie: Location=x and Set-Cookie: ScSessionCookie=x headers for outgoing responses with new session, and instead added X-Location header with the location of the session. This header can be changed or disabled by setting session.UseSessionHeader and session.SessionHeaderName
  • Removed the call to push on websocket directly after upgrade since it’s not needed
  • Fixed bugs when adding and removing blended viewmodels where patches was not correctly generated
  • Fixed checking for null-values in Response/Request headers
  • Fixed a bug where an instance of Session was left on the thread after a task was finished leading to additional exceptions later on #67
  • Fixed a bug in session management where more than one thread/scheduler got access to a session, leading to incorrect versioning for outgoing patches.
  • Fixed a bug where pushing changes on websocket could cause versioning and patches to be messed up
  • Setting references for viewmodel and template instances to null when storing versioninformation needed for transformation of jsonpatches when client and server is out-of-sync. These references are not needed and will, if not resetted, keep the instances from being garbage collected
  • Fixed observing changes to select element in Chrome PuppetJs/PuppetJs#106
  • Fixed a bug in PuppetJs when a new HTTP request from the client aborted the previous request

Client-Side Technologies

  • Fixed race condition with view-model attached by <starcounter-include> Starcounter/starcounter-include#25
  • starcounter-include now attaches view-model after the partial view is imported, once stamped Starcounter/starcounter-include#25
  • starcounter-include (juicy-composition) uses Shadow DOM V1 API if available, translates compositions from V0 to V1 and from V1 to V0 if needed.
  • Added translate-shadowdom v0.0.5 to translate between Shadow DOM v0 and v1.
  • Fixed iOS 10 support in webcomponents Polyfill
  • Speed up page load time by loading starcounter-debug-aid on demand, #42
  • Fixed workaround for webcomponents polyfill bug that result in erasing starcounter-compositions in some cases People/#49

Mapping and Blending

  • Fixed scoping in auto-assigned slots for stamped HTMLCompositions
  • Deprecated/renamed <template is="starcounter-composition"> in favor of <template is="declarative-shadow-dom">
  • Fixed workaround for webcomponents polyfill bug that result in erasing starcounter-compositions in some cases StarcounterSamples/People#49
  • Fixed a bug in serverside blending where stateful partials was blended more than one time leading to duplicate partials on the client
  • Fixed a bug in serverside blending where a flag determining if a path for a patch should be namespaced or not was disabled, but never enabled again


  • Asynchronous transaction support with Db.TransactAsync
  • Changed behaviour of (long-running) transactions to make sure they are only active (i.e. scoped) from one scheduled thread at a time. Calling transaction.Scope from another scheduled thread while a scope is already active for the same transaction will result in an exception
  • Db.Transact() family is redesigned to be a thin wrapper around Db.TransactAsync(), that effectively just calls Db.TransactAsync() and synchronously waits for returned Task. Thus Db.Transact() becomes a blocking call that waits for IO on write transactions. Take a look at the corresponding section at Synchronous vs Asynchronous transactions for reasoning and possible performance implications.
  • Overloads of Db.Transact, Db.Scope, Transaction.Scope, ITransaction.Scope and JsonExtension.Scope that accepts additional arguments for user delegate are marked obsolete. Consider using capturing of local variables instead.

Typed JSON

  • Added possibility to override delegates used for bindings in Typed JSON to allow custom implemented getters and setters
  • Added new option to the deserializer for Typed JSON that will allow conversion, if possible, of values that doesn’t match expected type. This is enabled by default
  • Added interface IExplicitBound<T> which will generate compile-time errors on bound properties in Typed JSON
  • Improved errormessage when an exception occurs in a binding between a Typed JSON object and a dataobject
  • Fixed a bug in Typed JSON when using a property named Item would fail because of indexers (json[int] and json[string]) in baseclass Json
  • Fixed a bug where the OnData() callback in Typed JSON sometimes triggered after bound properties was accessed instead of before
  • Fixed a NullReferenceException when calling ProcessInput for a property in a on a non-stateful Typed JSON instance
  • Fixed a bug when Clear() was called on a Typed JSON array that did not check if changes should be tracked or not
  • Fixed a bug where setting custom bound delegates on a template for Typed JSON would cause the delegates to be called too many times during dirtychecking
  • Fixed a bug where an incorrect mimetype was specified on a response that had Typed JSON as resource #76
  • Improved number of accesses to bound properties in Typed JSON when the whole viewmodel is requested
  • Improved errormessage when an invalid value is detected during deserialization of json and parsing of jsonpatches
  • Made the function that compares two dataobjects in Typed JSON to a delegate which can be overriden to supply custom comparison
  • Rewrote serializer for Typed JSON and changed public API. Typed JSONSerializer class and methods are marked obsolete. Interface ITyped JSONSerializer should be used instead. This doesn’t affect existing apps though since most of this is only used internally
  • Refactored parts of the dirtycheck in Starcounter.XSON to allow overriding methods CollectChanges(ChangeLog) and Checkpoint() to allow custom code to be run when collecting changes and when all changes are collected when generating jsonpatches. First step for issue to enhance callback system for Typed JSON
  • Rewrote how json was parsed and generated in Typed JSON jsonpatch implementation and obsoleted public methods that took IntPtr as input-parameter. This doesn’t affect existing apps though since most of this is only used internally
  • Removed code for creating codegenerated jsonserializers for Typed JSON
  • Changed the parser for Json-by-example from F# parser to NewtonSoft (nuget)
  • Removed virtual methods from class Json that shouldn’t be used, and that never worked correctly (ChildArrayHasAddedAnElement, ChildArrayHasRemovedAnElement, ChildArrayHasReplacedAnElement)
  • Obsoleted class Codeplex.Data.DynamicJson that is currently included in Starcounter.XSON. The class will be removed at a later time. Apps that still has need of this functionality should either include the code themselves or choose another alternative for dynamic json
  • Made several methods in class JsonExtension obsolete as a step to avoid duplication of code and to improve overall code structure in Starcounter.XSON
  • Fixed a bug where a reference to dataobject was not updated during check for bound arrays in Starcounter.XSON
  • Fixed a bug where dynamic usage of single value json did not work as expected
  • Fixed a bug where changing and reusing partials didn’t properly generate patches for client
  • Fixed a bug where bound arrays were not properly marked as dirty when setting dataobject to null
  • Added implementation of Json.ToString() to return json (same as calling Json.ToJson())
  • Changed delegates for templates in Starcounter.XSON from fields to properties to allow setting access modifiers to avoid changing the wrong delegates
  • Fixed a bug when stateful arrays in arrays were used that for certain conditions threw exception
  • Fixed a bug where setting dataobject on an array lead to a NullReferenceException
  • Fixed bug in X6Decimal where an exception was not raised in some cases leading to unhandled dataloss


  • Upgraded Polymer to 1.8.1.
  • Upgraded PuppetJs to 2.4.1.
  • Upgraded fast-json-patch to 1.1.8.
  • Upgraded json-patch-queue to 2.0.1.
  • Upgraded juicy-composition to 0.1.0.
  • Upgraded Juicy/imported-template from 1.4.3 to 1.4.4
  • Upgraded puppetjs/puppet-polymer-client from 3.2.0 to 3.2.2
  • Upgraded starcounter-debug-aid from 2.0.7 to 2.0.10
  • Upgraded jsoneditor from 5.5.6 to 5.5.11
  • Upgraded Bootswatch Paper from 3.3.6+2 to 3.3.7
  • Upgraded webcomponents.js to 0.7.24
  • Upgraded Starcounter/starcounter-include from 2.0.0 to 2.3.2 (
  • Upgraded puppet-redirect to [0.4.3](}.


  • Added Vacuum table and fixed to return a meaningful error if the metatable is missing in existing database
  • Fixed reloading of floating-point fields.
  • Fixed poor user experience when database class contain object array
  • Better predicability when creating UUID from database name to pass to scdata.exe
  • Redesigned weaver and app compiler as host-agnostic libraries
  • Fixed a bug that leading underscore was not allowed in identifiers in CREATE INDEX statements
  • Fixed retrieving long fields containing long.MinValue.
  • Fixed a bug where database may hang deleting a record. As the root cause of the problem is in the wrong data stored in the database image, it’s necessary to do unload/reload during upgrade to fix the image.
  • Fixed problem with cloning databases with x-copy approach, due to usage of embedded UUID

Categorised in:

This post was written by Erlend Landrö

Leave a Reply

Your email address will not be published. Required fields are marked *