The NullPointerException crash that occur in the flutter under RenderMode of rendermode.texture - flutter

Crashes occur with the latest stable version 1.17.0,the log is :
java.lang.NullPointerException: Attempt to invoke interface method 'void io.flutter.embedding.engine.renderer.RenderSurface.attachToRenderer(io.flutter.embedding.engine.renderer.FlutterRenderer)' on a null object reference.
tips:
RenderMode.surface is normal,and rendermode.texture is bad.
the code as:
FlutterFragment flutterFragment = FlutterFragment.withCachedEngine("my_engine_id")
.renderMode(FlutterView.RenderMode.texture)
.build();

Related

Ag-grid-react with react testing library throws render error

Tyring to unit test ag-grid-react with react testing library but unfortunately, I tend to be getting the same error over and over despite numerous attempts changing the how the component is rendered in the test.
When the tests are run, this error is thrown every time:
Error: Uncaught [TypeError: this.eIconWrapper.insertAdjacentElement is not a function]
The ag-grid-react version is at 25.1.0
I have also attempted this walkthrough: https://github.com/ag-grid/react-data-grid/blob/main/podcast-player/v8/src/PodcastGrid.test.js by waiting for the grid to be in the dom but still the errors persist:
console.error node_modules/react-dom/cjs/react-dom.development.js:19527
The above error occurred in the <AgGridReact> component:
in AgGridReact (at grid/index.jsx:229)
Further down the error seems to be pointing towards some sidebar component:
TypeError: this.eIconWrapper.insertAdjacentElement is not a function
at SideBarButtonComp.Object.<anonymous>.SideBarButtonComp.postConstruct

Unity WebGL - Locating code that triggers Reflection.emit

I've run into the dreaded Reflection.emit issue in my webplayer build and am unable to locate what is triggering it. I'm currently commenting out code method by method and rebuilding to locate the cause and have narrowed it down to the below.
I'm not using JSON so the various JSON libraries aren't the cause, nor any of the other result suggestions returned by google.
How can i more easily go about locating the cause of this error. I have full stack trace on and well as full debugging, but all i get is the following console output.
NotSupportedException: C:\Program Files\Unity 2018.2.0b2\Editor\Data\il2cpp\libil2cpp\icalls\mscorlib\System.Reflection.Emit\AssemblyBuilder.cpp(20) : Unsupported internal call for IL2CPP:AssemblyBuilder::basic_init - System.Reflection.Emit is not supported.
Rethrow as TypeInitializationException: The type initializer for 'System.Reflection.Emit.DynamicMethod.AnonHostModuleHolder' threw an exception.
//NOTE: appM.procM is a C# .Net 4.x dynamic variable EG:
//public dynamic procM = GetProcClass(strProcName)
public void ShowProcList() {
/* Rest of method commented out*/
if(appM.procM == null){
procList.Initialize(appM.procM.lstNames, this);
}
/* Rest of method commented out*/
}
public void Initialize(List<string> lstNames, UIM um, string currProc=null) {
uiM = um;
//cleanup of the list before populating
foreach(Transform fld in Panel.transform) {
Destroy(fld.gameObject);
}
/* Rest of method commented out*/
}
Update: I narrowed down the problem line of code, but haven't closed the question as there's got to be an easier way than commenting out line by line and rebuilding.
For future searchers, the issue is the if(appM.procM == null) check. As procM is a dynamic variable reflection is used which kills AOT in webGL builds. No compiler warnings were generated to save myself from myself.
Nevermind, i am an idiot, The option Enable Exceptions under Player Settings was set to Full Without Stacktrace and not Full with Stacktrace.
The value Full With Stacktrace contains the pertinent data. Easily locatable in the browsers console. Warning that full debugging does increase build times and slow down the application.

Debugging an Execution Exception Error Based on a Function Within Playframework

Today I did couple of updates on the front-end side of things, and then I did get the execution exception error, while running the app, that points to the written code within the target folder.
Error:
Execution exception
[IllegalStateException: java.lang.reflect.InvocationTargetException]
Pinter to the error on line 31 (/target/scala2.11/routes/main/controllers/ReverseRoutes.scala:31):
28 // #LINE:65
29 def versioned(file:Asset): Call = {
30 implicit val _rrc = new ReverseRouteContext(Map(("path", "/public")))
31 Call("GET", _prefix + { _defaultPrefix } + "vassets/" + implicitly[PathBindable[Asset]].unbind("file", file))
32 }
Where should I look for this error, as obviously I did not wrote the code within the target folder.
Note 1: Commented whatever I did after I did get the error, and I do still get the error.
Note 2: I did clean compile with no error, however when I try to run it through the browser I do get the error.
this error is strictly connected with template and using controllers call (your methods from controllers)
you have to localize on your template which controller method calls this error
for instance I had a problem with nullpointerexception and I found a problem. I had below controller:
#controllers.MyController.myMethod(object.getValue)
and it turns out that in db getValue had null and play reported it as a problem. he somehow detect that this value is null
Strange for me but maybe it will help

java.lang.IllegalStateException: Could not construct instance of helper class class

I used **ormlite greendao** for my Android application, everything works well until my android phone upgrade to Android 6.0 (Marshmallow) these days.
The problem happens at this line in my code:
private DatabaseHelper getHelper() {
if (mHelper == null)
mHelper = OpenHelperManager.getHelper(mContext, DatabaseHelper.class);// Error raise here
return mHelper;
}
And I catch out this causes the issue:
java.lang.IllegalAccessException:
java.lang.Class is not
accessible from
java.lang.Class
I have researched on the internet but couldn't figure out.
It only happens in Android 6.
Update
Cause:
java.lang.IllegalAccessException: java.lang.Class<com.mypackage.DatabaseHelper> is not accessible from java.lang.Class<com.j256.ormlite.android.apptools.OpenHelperManager>
I solved my problem by myself
As the cause problem above I changed class access level of
com.mypackage.DatabaseHelper
into public class.

Null pointer inside stub?

I am getting this really strange message from my stub (and it doesn't happen often but sometimes, few times a day):
SEVERE: Servlet.service() for servlet [default] in context with path [/EWC] threw exception
java.lang.NullPointerException
at com.company.rewsapi.REWSStub.isUserValid(REWSStub.java:28915)
at com.company.rews.webclient.beans.ClientBeanBase.isUserConnectedToREWS(ClientBeanBase.java:152)
The line 28915 inside the stub is:
_messageContext.getTransportOut().getSender().cleanup(_messageContext);
I never get null pointers from within stub. How can this happen?
What do I need to do to trace the error or to reproduce it so I can debug?
separate this _messageContext.getTransportOut().getSender().cleanup(_messageContext); line into
TransportOut to = _messageContext.getTransportOut();
Sender sender = to.getSender();
sender.cleanup(_messageContext);
Compile and run. During execution if any NullPointerException occures, you will clearly get what is null then identify why that is null.
looks like the apache fix was
} finally {
if (_messageContext.getTransportOut() != null) {
_messageContext.getTransportOut().getSender().cleanup(_messageContext);
}
}
fixed in 1.6.0 or 1.5.5 streams via
https://issues.apache.org/jira/browse/AXIS2-3788