It is currently 25 May 2020, 6:52 Advanced search

Compilation error

Questions and answers on how to best use Instant Developer

Compilation error

Postby Corrado » 22 April 2019, 15:43

Hello,
All of a sudden, I have started to get this error, after the application was working fine for a long time:

Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0037: Cannot convert null to 'iMacros.Status' because it is a non-nullable value type

Source Error:
Line 621: v_AC = (iMacros.AppClass)new iMacros.AppClass();
Line 622: MainFrm.DTTObj.AddAssignNewValue ("E9395414-0021-400A-97E3-AC9535E0D76E", "9242D71D-A738-43D9-B6C5-62BAA7A17840", v_AC);
Line 623: iMacros.Status S = null;
Line 624: MainFrm.DTTObj.AddAssign ("61454EDB-665C-4561-9A80-22E10BD196A3", "s := ac.iim Open (\"-runner -silent\", false, timeout)", "", S);
Line 625: MainFrm.DTTObj.AddToken ("61454EDB-665C-4561-9A80-22E10BD196A3", "78B75DA4-DBDF-11D4-900E-726096000000", 589824, "false", (new IDVariant(0)).booleanValue());

iMacros is an imported library.
Interesting that the same piece of code in the same panel, but in another procedure, does not generate any errors..
Screen Shot 04-22-19 at 11.41 AM.JPG
Screen Shot 04-22-19 at 11.41 AM.JPG (27.67 KiB) Viewed 1052 times


And in .cs file these 2 pieces also look differently:
iMacros.Status S = new iMacros.Status(); (works fine)
iMacros.Status S = null; (gives error)

What I'm missing here? how come can they be even compiled differently?..
Thank you
Corrado
 
Posts: 76
Joined: 18 October 2013, 13:19
Location: Toronto, ON

Re: Compilation error

Postby ljwilson » 24 April 2019, 19:21

So something must have changed--inde version number, windows update, imported library, etc.

Do you have an older version of the app with which you could test?

...jack
ljwilson
 
Posts: 523
Joined: 26 November 2013, 14:15

Re: Compilation error

Postby Corrado » 24 April 2019, 21:57

no.. just after next time I started the app, within the same day, it began throwing this error..
also, weird that the same code on the same panel, just procedure under another button, is compiled differently and works fine..
really beats me
Corrado
 
Posts: 76
Joined: 18 October 2013, 13:19
Location: Toronto, ON

Re: Compilation error

Postby Corrado » 27 January 2020, 16:36

Finally found it.
When I'm editing this line, for some reason, Variable attribute "New" of variable s changes to False.
So just make sure that New = True, and then all works fine.

Not sure if this is an INDE bug or feature, and if it was fixed in later versions?
Corrado
 
Posts: 76
Joined: 18 October 2013, 13:19
Location: Toronto, ON

Re: Compilation error

Postby ljwilson » 29 January 2020, 13:15

I recommend you create a simple example project and attach it to this thread IF if it is still reproducible with the latest InDe (19.5 r12 as of this writing).

If so then you can submit a malfunction report, referencing this thread. Malfunction reports are free.

...jack
ljwilson
 
Posts: 523
Joined: 26 November 2013, 14:15

Re: Compilation error

Postby Corrado » 2 February 2020, 17:14

Currently I'm on version 16.5 r7
I will check once I'm ready to upgrade.

Just wanted to mention that it happened to imported library.
There is no problems when declaring native INDE objects.
Corrado
 
Posts: 76
Joined: 18 October 2013, 13:19
Location: Toronto, ON


Return to Tips & Tricks

Who is online

Users browsing this forum: No registered users and 2 guests