Object reference not set to an instance of an object

This forum is for all Flare issues not related to any of the other categories.
Post Reply
benpal
Propeller Head
Posts: 36
Joined: Sat Dec 10, 2005 11:08 am
Location: Geneva, Switzerland
Contact:

Object reference not set to an instance of an object

Post by benpal »

My test project contains one html page and a glossary with some 1000 terms (in French)

I can produce the following error under the following conditions:
- compiling for WebHelp Mobile
- Welcome.html contains more than two distinct terms (or even from the glossary
- Target is set to "Convert first occurrence (all occurrences) of term"
- Glossary definition is text (no links), Style is "Expanding"

Error message:
Processing topic: Welcome.htm...
: Object reference not set to an instance of an object.


The error does not occur when compiling the same project, with the same settings, for WebHelp,
Ben Palmer
Aracane Ltd.
http://www.aracane.ch
Information Management
SG
Propeller Head
Posts: 31
Joined: Fri Feb 03, 2006 9:48 am

Re: Object reference not set to an instance of an object

Post by SG »

I had the same problem many months ago. I solved the problem; but sorry--I don't remember exactly how I solved it--however, I think I traced down all error messages and discovered that I had links to graphics or pages that didn't exist.

SG
benpal
Propeller Head
Posts: 36
Joined: Sat Dec 10, 2005 11:08 am
Location: Geneva, Switzerland
Contact:

Re: Object reference not set to an instance of an object

Post by benpal »

SG, thanks for your reply, but my project consists of the glossary and only one html page with 2 lines containing 2 or more words corresponding to glossary terms.
Ben Palmer
Aracane Ltd.
http://www.aracane.ch
Information Management
GregStenhouse
Sr. Propeller Head
Posts: 330
Joined: Tue May 13, 2008 3:27 pm
Location: Christchurch, New Zealand

Re: Object reference not set to an instance of an object

Post by GregStenhouse »

That message is a generic .net message that can mean any number of things. For example, I've had that message when building a target and there is an alias file that is completely blank, and I've also recently had that message when importing from FrameMaker and there are two hypertext destination markers in the same topic. From memory it also comes up if you use a default (master) TOC and there is no master TOC specified.

Some suggestions:
1) Check all files used in your webhelp mobile target (topics, master pages, stylesheets, TOCs, alias files, glossary etc). Open them in the internal editor and check for errors. If you're comfortable with XHTML then open them as text and see if there is anything suspicious (e.g. no closing tags, encoding not set to UTF-8 etc).
2) if your webhelp is working, then make a copy of the webhelp target file, and change the Target in that copied file to Webhelp Mobile and see if it does the same.
3) 'Trim' back a copy of your project to see if you can isolate the problem, start by reducing the glossary to one term, delete text in your topic a paragraph at a time, etc.

Finally, it may be French related? Perhaps something to do with accented characters in Glossary terms? If so you should raise an issue with Madcap (probably best to do this anyway).

Cheers
Greg
benpal
Propeller Head
Posts: 36
Joined: Sat Dec 10, 2005 11:08 am
Location: Geneva, Switzerland
Contact:

Re: Object reference not set to an instance of an object

Post by benpal »

Thanks Greg for your suggestions, especially suggestion 2 promised to lead to a resullt, but it only confirmed the error.

I followed your suggestion 1 and found obvious errors in the generated xml output. These errors are introduced in the building process, thus beyond my control. I will report a bug.
Ben Palmer
Aracane Ltd.
http://www.aracane.ch
Information Management
kevinmcl
Sr. Propeller Head
Posts: 252
Joined: Mon Sep 11, 2006 10:58 am

Re: Object reference not set to an instance of an object

Post by kevinmcl »

I have had this happen three times now - Flare 6.1 on Windows XP Pro x64 - where I'm doing some innocuous operation in the middle of a topic (the WYSIsortaWYG editor).

The editing window contents disappear and that error message (...not set to an instance...) appears.
The page area goes white.

The rest of Flare is still intact. The top and left-side borders of my current topic are still there, with the block markers for paragraphs, DIVs, table columns, etc., but where my page should be is blankness.
I can't select (except select all).

The scroll bar on the right has disengaged from the content.
The left-margin block indicators continue down below the frame (my topic page is long), but the scroll bar won't scroll.

UNDO has no effect - well, it might be undoing my text, but it has no effect on the text being invisible.

All my other concurrently open topics are still fine - visible and editable - though I don't dare touch them once the screw-up/corruption has happened, for fear of having it spread.

So, my workaround is to immediately use Windows Explorer to take a copy of the most recent non-corrupted topic.html, then use it to create a NEW page, then paste back selected text from my Notepad view of the corrupted page, and re-do the minutes or hours of formatting that I've lost. (AFTER rebooting, of course.)

The corruption following the "not set to an instance of an object" seems to be permanent, saved with the corrupted topic, and survives a restart of Flare.

I forget what I was doing the first time-or-two that this occurred. This time, I had just Inserted drop-down text, and selected the content portion for a color change., I clicked the text color icon (the big A with the color bar beneath). Boom.


I want to know how to NOT have this happen again.
What's the trick?
How do you see it coming and avoid it?

Is it necessarily something that happens in the moment? Or could it be something that has been building for hours (or days, if I leave Windows and my apps open overnight), and just picks its moment to precipitate? Is there some kind of stress being applied to .NET that could be monitored with some kind of utility? Or do I just need to religiously shut down Flare and Windoze every few hours...... or would that even help?

C'mon Madcap. Port it to a decent platform, and I'll start writing/editing Help on my MacBook Pro.

Or maybe go to an open-source framework, and I can switch to Linux. :-)

- Kevin (disgusted and looking at hours of tedious re-work)
De gustibus non disputandum est
kencrooker
Jr. Propeller Head
Posts: 3
Joined: Thu Nov 11, 2010 6:14 am

Re: Object reference not set to an instance of an object

Post by kencrooker »

I'm coming in really late on this, but had this problem this morning. I think I found the answer. I ran into this problem if glossary items have the class of "Expandable." If I change the class of all my glossary items to "Popup," then the export continues.
Post Reply