Uno Random Compile Errors - uno-platform

I have created a brand new Uno project and off the bat I get compile errors. I most common one I am getting is a cs 1061 App does not contain a definition for InitializeComponent. The app would run with this error, but once I start adding more pages to the application, the application no longer compiles. How do I resolve this issue? Also, I get this same error for each page that I add. The oddest part about this issue is that the app.xaml.cs suffers from it too.
I am also getting a XLS0411 that is complaining about the background brush that comes with the default page.
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">

The message about InitializeComponent() is a false positive from Visual Studio, this is a known issue. The Uno Platform documentation recommends to build the project once, close the solution, and then reopen it to get rid of this error.
In general the Error window is less useful with Uno Platform projects because of the various false positives, it's more reliable to check the Build pane in the Output window. The Error window is Intellisense's best guess as what errors your code may have; the Build output is what actually happened when it tried to compile. If you search for "error " from the top of the Build output you should quickly find the reason the compilation failed; this will tell you why it's failing when you add pages to the application.

Related

Xamarin's Forms Chip Error on launch of app

I am getting the following error in Xamrain forms and their is no more detail I can give until you ask me as unfamiliar with the error never had it before.
Severity Code Description Project File Line Suppression State
Error error: CGViewProvider_1 is not abstract and does not override
abstract method checkView(View,int) in ChipItemViewProvider public
class
CGViewProvider_1 THEHOCKEYLAB.Android D:\GitMaster\thehockeylabl.mobile\THEHOCKEYLAB\THEHOCKEYLAB.Android\obj\Debug\110\android\src\crc640a67887a4134e062\CGViewProvider_1.java 4
It seems to be something to do with their conversation code that converts the code into real time java, I see no obv way of getting to what the error is from here it happens on launch and cancels the build..
Its making a referring to ChipItemViewProdiver I have not changed processers or any part of my pc this application works.
If you let me no how to get extra debug info to diagnose this I would be greatfull
Edit 2
It would be appear to do with having fast debug on and the linker at the same time I am trailing it here and see if it works.
This was caused by having the linker and fast debug switched on your settings for Android should be like this. To avoid the error.
BTW I didnt change this manually folks this was after VS Update

Qt Application throws an Access violation exception during startup

I have a Qt Application that works in Debug mode without any problems. Since two days I'm trying to make it work in Release mode. After some Project property modification I managed to compile without errors. But unfortunalty the application crashes before even reaching the main method.
That's my environment:
MS VS 2010
Qt 4.8.4
Qwt 6.0.0
I don't know if this is relevant, but I also installed the Qt plugin for VS and used Qt Designer to create my GUI.
As I said in Debug mode there is no problem. Starting the release version from the Visual Studio produces the following error:
Unhandled exception at 0x77c415de in Application.exe: 0xC0000005: Access violation reading location 0x0000000c.
The last function I can "debug" is the the "WinMain" method called inside the method "__declspec(noinline) int __tmainCRTStartup", which is located in crtexe.c (honestly I have no idea what this is). The call stack looks like this:
ntdll.dll!77c415de()
[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]
ntdll.dll!77c415de()
ntdll.dll!77c3014e()
msvcr100.dll!718f0269()
msvcr100.dll!718f233b()
msvcr100.dll!718f233b()
msvcr100.dll!718f233b()
QtCore4.dll!5b2cfc49()
QtGui4.dll!57bf54ea()
Application.exe!__tmainCRTStartup() Line 547 + 0x1c bytes C
kernel32.dll!754633aa()
ntdll.dll!77c59ef2()
ntdll.dll!77c59ec5()
In the moment I'm totaly lost with this problem. No idea what to try further...
I've tried to reduce the program and commented out the complete main function. But the result was the same behaviour. As I said the error occurs even before the main function is called. I also turned off all optimization and recompiled... didn't changed anything.
What completly puzzles me, is the fact that it "works" when I call "Application.exe" from the command prompt (ok it also crashes but much later during execution). Weird, isn't it? What is the difference between starting from command prompt and starting from Visual Studio application?
AnatolyS and npiau thanks for you tips. Meanwhile I continued digging in my code. More or less I started from the very beginning and finally got the place the error occurs. I suppose npiau is right, it has nothing to do with Qt.
It's still (for me) a strange problem. I posted it in a new thread (because it has little to do with this thread): C++ Creation of a Singleton object in initializer list causes an Access Violation (only Release Mode)
The problem is not in QT but in your source code. "0xC0000005: Access violation reading location 0x0000000c" means that you try to access a wrong memory location.
Check out your arrays, ans pointers.

activity could not be loaded because of errors in the XAML

Considering the following scenario:
Create MyCodeActivity1 with argument MyArgument1
Add this activity to a myworkflow.xaml
Rename MyArgument1 in MyCodeActivity1 to MyRenamedArgument1
If you open myworkflow.xaml, visual studio will show this error:
activity could not be loaded because of errors in the XAML
Is there a facility where visual studio can give more information about the error please?
For now I have created a small windows application that tries to execute the workflow and shows an error message if invalid. This does give a clear message. But it would be great if visual studio provided this functionality directly.
No.
Nope.
Nuh uh.
Visual Studio's refactoring can't handle change in Activity code => change in XamlAppDef XML. Its not surprising, such a chain of logic would be complex to achieve. So whenever you do this you must expect your workflows will have to be fixed. Either plan ahead, or...
Any time a workflow won't compile, or if it shows the red box of pain in the design surface, you should always right click on the workflow file, select Open With... and select the XML (text) editor. You will see the squiggly error lines and more detail about the error in this view.
I got the same error("activity could not be loaded because of errors in the XAML"), But in my case, I had created a Code Activity and used that in a State Machine. But, I found out that the defined Code Activity had not been shown in the Toolbox. It means that the Code Activity is not identifiable to Windows Work Flow.

Flex SDK missing fundamental things

alt text http://img710.imageshack.us/img710/4107/flashbuildershite.jpg
All of a sudden Flash Builder 4 is missing all kinds of fundamental things and is generating incorrect errors. I've had the same issue yesterday, where I fixed it by downloading a new Flex SDK and importing that into FB. I did this again, but this time it fixed nothing.
I don't think it's something I did, like removing critical references from the build path. The errors also appeared on projects I was not working on at the time. It occurs for ActionScript, Flex and Flex Library projects alike.
Update 3: Well, i've singled the problem down to a single piece of code, though a very simple one. I can make a new workspace in FB and things work ok, then screw the workspace up forever by adding this code to a project. All projects will have errors and closing or even removing the faulty project does not change this. Making another new workspace (without the faulty code) makes my projects compile again.
Link: http://www.the3rdage.net/files/2745/Main.as
(i've uploaded the file in case an odd character or encoding error causes the error)
Update 2: I've tried manual compiling with mxmlc, the same errors occur. It appears to be an SDK problem, not Flash Builder.
Update: I find this stack trace in the Flash Builder error log:
!ENTRY com.adobe.flexbuilder.project 4 43 2010-05-11 11:55:47.495
!MESSAGE Uncaught exception in compiler
!STACK 0
java.lang.NullPointerException
at macromedia.asc.semantics.ConstantEvaluator.evaluate(ConstantEvaluator.java:2592)
at macromedia.asc.parser.VariableBindingNode.evaluate(VariableBindingNode.java:64)
at macromedia.asc.semantics.ConstantEvaluator.evaluate(ConstantEvaluator.java:2233)
at macromedia.asc.parser.ListNode.evaluate(ListNode.java:44)
at macromedia.asc.semantics.ConstantEvaluator.evaluate(ConstantEvaluator.java:2578)
at macromedia.asc.parser.VariableDefinitionNode.evaluate(VariableDefinitionNode.java:48)
at macromedia.asc.semantics.ConstantEvaluator.evaluate(ConstantEvaluator.java:2310)
at macromedia.asc.parser.StatementListNode.evaluate(StatementListNode.java:60)
at macromedia.asc.semantics.ConstantEvaluator.evaluate(ConstantEvaluator.java:2503)
at macromedia.asc.parser.WithStatementNode.evaluate(WithStatementNode.java:44)
at macromedia.asc.semantics.ConstantEvaluator.evaluate(ConstantEvaluator.java:2310)
at macromedia.asc.parser.StatementListNode.evaluate(StatementListNode.java:60)
at macromedia.asc.semantics.ConstantEvaluator.evaluate(ConstantEvaluator.java:2891)
at macromedia.asc.parser.FunctionCommonNode.evaluate(FunctionCommonNode.java:106)
at macromedia.asc.semantics.ConstantEvaluator.evaluate(ConstantEvaluator.java:2905)
at macromedia.asc.parser.FunctionCommonNode.evaluate(FunctionCommonNode.java:106)
at macromedia.asc.semantics.ConstantEvaluator.evaluate(ConstantEvaluator.java:3643)
at macromedia.asc.parser.ClassDefinitionNode.evaluate(ClassDefinitionNode.java:106)
at macromedia.asc.semantics.ConstantEvaluator.evaluate(ConstantEvaluator.java:3371)
at macromedia.asc.parser.ProgramNode.evaluate(ProgramNode.java:80)
at flex2.compiler.as3.As3Compiler.analyze4(As3Compiler.java:709)
at flex2.compiler.CompilerAPI.analyze(CompilerAPI.java:3089)
at flex2.compiler.CompilerAPI.analyze(CompilerAPI.java:2977)
at flex2.compiler.CompilerAPI.batch2(CompilerAPI.java:528)
at flex2.compiler.CompilerAPI.batch(CompilerAPI.java:1274)
at flex2.compiler.CompilerAPI.compile(CompilerAPI.java:1496)
at flex2.tools.oem.Application.compile(Application.java:1188)
at flex2.tools.oem.Application.recompile(Application.java:1133)
at flex2.tools.oem.Application.compile(Application.java:819)
at flex2.tools.flexbuilder.BuilderApplication.compile(BuilderApplication.java:344)
at com.adobe.flexbuilder.multisdk.compiler.internal.ASApplicationBuilder$MyBuilder.mybuild(ASApplicationBuilder.java:276)
at com.adobe.flexbuilder.multisdk.compiler.internal.ASApplicationBuilder.build(ASApplicationBuilder.java:127)
at com.adobe.flexbuilder.multisdk.compiler.internal.ASBuilder.build(ASBuilder.java:190)
at com.adobe.flexbuilder.multisdk.compiler.internal.ASItemBuilder.build(ASItemBuilder.java:74)
at com.adobe.flexbuilder.project.compiler.internal.FlexProjectBuilder.buildItem(FlexProjectBuilder.java:480)
at com.adobe.flexbuilder.project.compiler.internal.FlexProjectBuilder.build(FlexProjectBuilder.java:306)
at com.adobe.flexbuilder.project.compiler.internal.FlexIncrementalBuilder.build(FlexIncrementalBuilder.java:157)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:627)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:170)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:201)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:253)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:256)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:309)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:341)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:140)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:238)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Did you get a chance to list this issue in their bugs list. I have not yet tried Flex 4. did you try to refresh your project and re open your flash builder.
Update:
What about a simple project. I think you are trying to load something which its not able to get.
mxmlc - verify-digests
Try this.
Problems I've had that were somewhat similar, once I had FB running under the wrong version of Java. Another time I had done some edits to the flex-config.xml file in order to make it work with a Maven plugin we had written in house. After that we made the plugin look at a copy of the original xml file, so that problem went away.
hth.
Might i recommend HFCD? The HellFire Compile Daemon is an out of process flex compiler that speeds up compile times immensely, and almost more importantly runs in a separate process from FlashBuidler. I have had some absolutely horrendous errors with Flash Builder due to the complexity and size of our project, where HFCD has helped tremendously here.

Tracking down intermittent 'Object reference not set to an instance of an object.' error on build

I could use some help trying to track down an intermittent error that I've been having with our ASP.Net project for quite some time.
Intermittently when building the solution, the build will fail with the error "/: Build (web): Object reference not set to an instance of an object." The error has no associated file, line, column or project information. The weird thing about the error is that it will go away on successive rebuilds and doesn't seem to result in any run-time errors that we've come across once the build is successful. Sometimes the error will pop only once, sometimes 3-4 times, but eventually the build will finish successfully and then seems to build just fine each time after. I haven't been able to nail down a pattern as to why and when the error will happen, and since it always eventually builds it hasn't been a critical problem for us. Just an annoyance. But one that I want gone for obvious reasons.
I guess I should add that this is an application that was originally developed in ASP.net 1.1 and converted to 2.0 and I inherited it somewhere down the line after that, so I don't know when the problem originally surfaced. As far as everyone here is concerned, it's always been there.
Obviously I'm not expecting someone to pick out the cause of my problem as that would require them to look at our entire solution to pick out potential problems. Just hoping someone can give me a couple fresh ideas as to how to go about tracking down the actual source of the error in code. It has to be coming from somewhere, right? How would you go about finding out where?
I've seen this when you have a web control in a page where there is invalid HTML. If your codebehind is trying to do something with the control, it won't be able to find it and will give you Object Reference... error at compile time. In my experience, it doesn't create a runtime error, and the project will build if the file in question is closed at the time of build. HTH, Good Luck!
Run this command at the command line and see if you get some more detailed information
%WINDIR%\Microsoft.NET\Framework\v3.5\msbuild.exe YourSolution.sln /v:n
To follow up on this problem, we never did track down the origin of the error but it disappeared when we upgraded to Visual Studio 2008 and converted the project to a Web Application.
The first thing I'd try would be to increase the compiler verbosity. This can be set in the Visual Studio options - e.g. "Tools->Options->Projects and Solutions-Build and Run->MSBuild project build output verbosity" for VS2005. If you set it to diagnostic then it should tell you what it's doing at the time the exception is raised at the very least.
I had this problem for a long time and finally found a solution that work fine for me.
It doesn't make sense to me... but altering my web.config file with the following gets definitively rid of this intermittent build error :
<buildProviders>
<add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
<!-- add this line below -->
<remove extension=".rdlc"/>
</buildProviders>
Hope this help !
I had this at build time when my project contained custom datasources (my own objects returning collections) with compile errors (that is, my objects had errors).
You'll also get this error if you try and add a datasource and your project doesn't have any datasources in the project's root (e.g. if you've put all your datasource classes in a subfolder). The only solution I found was to create a datasource in the project's root.
Sorry not to be more precise, but there seems to be several things that can go wrong with datasources/objects at compile-time.
An "Object reference not set to an instance of an object" is clearly a run-time error, not a compile-time error. So what that says to me is that Visual Studio is choking on something, which may not necessarily be in your code, or which something in your code is only indirectly causing.
Next question I'd ask: Does this happen only in Visual Studio, or does the same thing show up when you build using MSBuild or CSC?
What's really odd is that it's a run-time error. You shouldn't see that at compile time. Do you have any pre- or post- build steps attached to the solution? Any unit tests you're including with your 'build' process?
Where does this error show up?
Check the Application Log of your Event Viewer - It should tell you where the exception is being thrown.
Just to clarify, is it the compiler itself that is choking? Are you doing anything weird with #define and #if directives in your code? Maybe something is being done out of order at some point... Just a thought...
See if there are any post-build events that could be failing. These can be found on each project's property page.
Try using Rebuild Solution instead of Build Solution. You may need to add Rebuild Solution from Tools > Customize. If your web app installs or registers any windows services, and those services are started, Rebuilding plows through those types of problems.

Resources