Macrobug Stray Event Scanner - Frequently Asked Questions

Basics

What is a Stray Event anyway?
A stray event is where a message is sent from one Symbian OS thread to another one, but the receiving thread isn't ready to receive it. Symbian OS therefore panics the receiving thread. But, by then, there's no way of knowing what mistake the receiving thread has made, so it's very hard to debug it.

Product capabilities

Will the tool identify all causes of stray events in my code?
We believe so. It's still a new tool and there might be things we haven't thought of. But that is the intention. (Subject to the source code structures which are unsupported - see a later FAQ about that.)
Can the tool analyse all source code? Is there anything it can't parse?
It can parse anything which can be parsed by GCC, so there's no limitation there. Unless your code can't be compiled with GCC, the tool will successfully run. But some features of code are not yet understood by the subsequent analysis engine - specifically:
  • User::WaitForNRequest
  • APIs which make a request but may also Leave
  • Request-making APIs which the tool is not aware of - in this case, you'll get a warning and be asked to annotate the code to explain what the API does.
  • If you store the same TRequestStatus pointer or reference in two member variables, and use one to make a request and the other to wait for the request, you'll get extra errors. But then, you're crazy if you do this anyway.
  • If the request and the wait are in separate 'if' blocks with the same condition, you'll get extra errors. For example:
    	if (a == 3)
    		MakeRequest(iStatus);
    	DoSomethingElse();
    	if (a == 3)
    		SetActive();
      
    The tool can't be sure that the value of 'a' hasn't changed due to the effects of DoSomethingElse.
What SDKs are supported?
The tool runs on S60 3rd edition MR2 and UIQ 3.3 beta SDKs. It should work on other Symbian OS 9.x SDKs. The tool has knowledge of the Symbian APIs within the S60 3rd edition MR2 SDK (based on Symbian OS 9.3); APIs added subsequently may not be recognised. Some UIQ 3.3 APIs are also recognised. Similarly, it only knows about the publicly-available Symbian APIs. If the tool does not recognise a particular API, you can fix it using the function markup attributes.

Business questions

What are the demo limitations?
The demo will work without any restriction for ten days. After that, it will go into an annoying lock-down mode where it will only show you errors in the first half of any source code file. You can of course fix this by downloading another demo license! But please be aware that the demonstration license does not legally allow you to use the product for commercial purposes. If you want to use the tool to fix problems in commercial software, you have to buy the product.
What are the differences between the versions for device manufacturers and for other users?
Technically, none. Both are completely unlimited. But if you bought the cheap version, the license prevents you from using it at a company which manufactures Symbian OS devices.
Why have two versions?
Symbian OS device manufacturers will have lots more source code and will get much more benefit from a product like this. So, it's really aimed at them. But we don't want to exclude it from smaller Independent Software Vendors so there's a cheap version for them too.
What support is provided?
For the device manufacturer version, unlimited phone and e-mail support. For the ISV version, officially up to five incidents (but we'll probably support you indefinitely anyway). Unfortunately, though, we're a small company so it's quite possible we'll all be out of touch sometimes. But feel free to let us know if you're planning to use the product in the next few weeks, and we will figure out some arrangement to make sure somebody is available when you need them. Anyway, e-mail support@macrobug.com.
I am a freeware or open-source author. Can I use the tool?
Yes - get in touch and we'll give you a free version.
Can you summarise those licenses again?
License type Behaviour Legal rights
No license - or license expired Scans only the first half of each file Cannot use for commercial purposes
Demo license (10 days) Fully functional
Full license No limitations

Technical questions

How can I extend the tool to be aware of extra request APIs?
Look up the 'markup' section of the online help (available only in the Carbide.c++ version of the tool). This will show you what attributes you need to add to a function to indicate to the tools that it makes a request. You will need to add these attributes to the declaration of the function; this may involve modifying header files you don't normally want to modify. But for now, there's no other mechanism. If there's demand, we will later make an XML extensibility mechanism.
I am getting lots of messages saying "an explicit specialization must be preceded by template<>" - what does that mean?
You need to add a couple of macros to your MMP file, or to the system-wide variant.h file. Please see the online help in the "building" section. In this case you haven't got __EABI__ defined.
The tools do not seem to be detecting my TRAP blocks properly. Why not?
You probably don't have __SUPPORT_CPP_EXCEPTIONS__ defined. You need to add a couple of macros to your MMP file, or to the system-wide variant.h file. Please see the online help in the "building" section.
Why do I need to add macros to my MMP file?
Unfortunately the Symbian toolchain has very limited support for GCCXML builds. It assumes it's using an old version of GCCXML with no support for function bodies. Unfortunately, the options it uses to build with GCCXML are not appropriate. You therefore need to add these extra options.
Why do you use a special version of GCCXML?
Because the version Symbian normally uses does not dump information about function bodies. It's also rather old. There is currently no 'official' version of GCCXML with support for dumping function bodies, though it may be coming soon. In any case, for compatibility with the Symbian OS toolchain a couple of hacks are needed inside GCCXML.
Does the tool make any changes to my Symbian environment or toolchain?
Just one. It replaces \epoc32\tools\gccxml_cc1plus.exe with a new version. The original one (if any) is renamed to gccxml_cc1plus.orig.exe. As a rule, UIQ SDKs do contain the older version of GCCXML, whilst S60 SDKs don't contain any version of GCCXML.

Main Page Buy now Download trial Download datasheet Read FAQs