JavaFX application won't launch at my friend's pc - exception

I was working with my friend on a javaFX application with FXML, everything was okay till we tried to execute our work, we got that strange exception that never happened to me as far as i remember, the problem is that the same code launches normally in my pc !
This is what occures when trying to launch the code SignatureParser.current(), you'll find more details below
Thread [JavaFX Application Thread](Suspended(exception
ArrayOutOfBoundsException))
SignatureParser.current()
SignatureParser.parseZeroOrMoreThrowsSignatures()
SignatureParser.parseMethodTypeSignature()
SignatureParser.parseMethodSig(String)
MethodRepository(ConstructorRepository).parse(String)
MethodRepository(ConstructorRepository).parse(String)
MethodRepository(AbstractRepository<T>).<init>
MethodRepository(GenericDeclRepository<S>).<init>
MethodRepository(ConstructorRepository).<init>
MethodRepository.<init>(String, GenericsFactory)
MethodRepository.make(String, GenericsFactory)
Method.getGenericInfo()
Method.getGenericReturnType()
BeanAdapter.getGenericType(String)
FXMLLoader$PropertyElement.add(Object)
FXMLLoader$InstanceDeclarationElement(
FXMLLoader$ValueElement).processEndElement()
FXMLLoader.processEndElement()
FXMLLoader.loadImpl(InputStream, Class<?>)
FXMLLoader.loadImpl(Class<?>)
FXMLLoader.load()
Main.start(Stage)
LauncherImpl.lambda$launchApplication1$161(AtomicBoolean, Application)
519865426.run()
PlatformImpl.lambda$runAndWait$174(Runnable, CountDownLatch)
1293618474.run()
PlatformImpl.lambda$null$172(Runnable)
1493066385.run()
AccessController.doPrivileged(PriviledgedAction<T>, AccessControlContext)
PlatformImpl.lambda$runLater$173(Runnable, AccessControlContext)
156545103.run()
InvokeLaterDispatcher$Future.run()
WinApplication._runLoop(Runnable)
WinApplication.lambda$null$147(int, Runnable)
278934944.run()
Thread.run()
I have no clue where the problem is, as both of us have the same IDE (Eclipse 2018-09) and JavaFX version (8.0.192-b10), as well as scene builder (8.5.0).
Thanks for your help !

Sorry for not adding a minimal example for my problem, it turned out that adding any javafx components to the scene would produce that problem, but we managed to solve the problem, fortunately it was just a jdk conflict, my friend had both jdk 8u191 and 8u192 and that's what caused the problem, we solved that by removing the older version and voila !
Everything went normal after restarting the pc ofc, so the changes would take effect.
I often find the solution to my problems after posting a question here, but i hope that it would help somebody else in the future ! :)

Related

OpenJFX TreeTableView rendering issue

I was hoping there are other developers have similar issue that can share how to resolve this issue. I'm in the midst of using OpenJFX in one of my pet project. The project was tested on Oracle JDK 1.8 with JFX package included. When run on the Oracle 1.8 JDK, the TreeTableView show exactly as required:
Since Java 11 is required in my other workstation, the OpenJFX binary here is downloaded and installed. But the TreeTableView has become unreadable as followed:
Is there any JFX developer that has similar experiences?
FYI, I've tested with OpenJFX release 11.0.2, 15.0.1 and 16 all giving the same output.
Edit: It seems from the source behavior is as such as compile from source yield the same result.
Update: I should add my pet project is using JRuby and JRubyFX. Although not sure I don't think it is related to JRubyFX as the Oracle FX seems fine.
Thanks!
Regards
From your repository you have:
class WorkspaceCellFactory < javafx.scene.control.TreeTableCell
include Antrapol::ToolRack::ExceptionUtils
def updateItem(itm,e)
super
cont = nil
if not itm.nil?
if itm.is_a?(TreeWorkspace)
if not_empty?(itm.workspace)
cont = itm.workspace.path
elsif not_empty?(itm.project)
cont = itm.project
else
cont = itm
end
else
cont = itm
end
end
setGraphic(Text.new(cont))
end
end
You're setting the graphic property to a javafx.scene.text.Text node. In the past, I believe I've had a similar issue when using graphics with TreeView / TreeTableView. You've confirmed that replacing:
setGraphic(Text.new(cont))
With:
setText(cont)
Solves the problem.
Bug in JavaFX
This appears to be a bug in JavaFX. Please submit a bug report, assuming one doesn't already exist, so that the developers know there's a problem and can fix it. The bug report should include a minimal reproducible example written in Java.

flashdevelop error while loading initial content

I have been struggling with this stupid error from couple of hours. Have tried everything but it still persists. I'm unable to run any Flash Mobile AS3 project in FlashDevelop.
This is what it says in Output panel:
Debugger startup error. For troubleshooting see: http://www.flashdevelop.org/wikidocs/index.php?title=F.A.Q
Error details: System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
at net.sf.jni4net.jni.JNI.Dll.JNI_GetDefaultJavaVMInitArgs(JavaVMInitArgs* args)
at net.sf.jni4net.jni.JNI.Init()
at net.sf.jni4net.jni.JNI.CreateJavaVM(JavaVM& jvm, JNIEnv& env, Boolean attachIfExists, String[] options)
at net.sf.jni4net.Bridge.CreateJVM()
at net.sf.jni4net.Bridge.CreateJVM(BridgeSetup setup)
at FlashDebugger.DebuggerManager.Start(Boolean alwaysStart)
[Capturing traces with FDB]
and this is what it shows in the console/command prompt:
error while loading initial content
Please if anyone had seen this error and solved it successfully, I would really appreciate any help. Screenshot attached below.
Thanks!
Looks like you are using wrong Java SDK version 64 bit rather than 32 bit which FlashDevelop requires

Custom control casting exception during DesignTime but not RunTime

Been dealing with a casting exception during design time only that getting me nuts.
I'm trying to create a custom control for winRT (a week view control just like windows phone 8.1). The control works fine during run time but in design time it gives me COMException. During my investigation of the cause of this COMException, I found out that there is a casting exception inside one of the component of my control. This component is a custom listview that implement ContainerContentChanging event. Inside this event there is a casting which raises this exception.
Here is a the custom list view class:-
The code is removed coz the source code is shared below.
The TemplatedListViewEntry cctor look like this one:-
The code is removed coz the source code is shared below.
And the AppointmentModel:-
The code is removed coz the source code is shared below.
OBS!!! while debugging using 2 instance of VS or VS+Blend and put a breakpoint before this line I can see that args.Item is of type ContentControl while during run time it is AppointmentModel.
Could it be a problem with the ItemsSource which is null at design time?
If yes how should I preceed and assign this_ If No, anyone here that can help me figure out what is the problem?
OBS!!! I anyone needs more info please ask and I would gladly share the entire code with you.
Edit 1
Even if i initiate my viewmodel in the cctor of the custom Control, it raises casting exception in Designtime and not in Run tim
Edit 2
After i wrote Edit 1 above i noticed that now i have to Cast exception in two different Styles (CustomWeekView style and TemplatedListView Style) this is if you open Generic.xaml inside Blend. It is really getting annoying and i'm out of thoughts now. That is why i decided to share the source code of this Project, hopfully someone will be able to help looking at it. Below you will see the source code.
CustomWeekView

libc++abi.dylib: terminate_handler unexpectedly threw an exception - 0 stack trace iOS7 / iOS 8

Randomly (that's why I ask the question), my application crashes when want to display data into textView.
The only error message I've got in my debug console is :
libc++abi.dylib: terminate_handler unexpectedly threw an exception
I Googled but can't get a clue to find how correct this and how this happens.
I got the same error and a "clean" didn't resolve it.
It was caused by my internet testing flow, I check to see if WiFi is connected but not if that WiFi has an active internet connection that can resolve a supplied URL. It performs a dataWithContentsOfURL: that will ultimately fail. A similar thread made this suggestion to this question here by user Keith that helped me identify the problem -- which was to add breakpoints to C++ exceptions.
To enable -- click your breakpoints view and the very bottom click the '+' to add a breakpoint. Set it up as follows and the stack trance will be more meaningful.
Clean the project.
Check each constraints and remove the corrupted one.
Clean project again, it should works.
This can be caused by an outlet that is no longer existing (might have been renamed or removed).
Here is a tip on how to check outlets:
Select the container view of the suspected outlet, pay attention to "!" marks in the connections inspector.
I got this question ,because I set [self addObserver:self forKeyPath:#"_defaultAgType" options:NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld context:nil];, but I did not remove it in dealloc. I solved this by [self removeObserver:self forKeyPath:#"_defaultAgType"]; in dealloc function.
Another reason why it could happen is when you have a UI element declared but never added to the screen but still you try to do changes on them.
In my case I had a UIBarButtonItem declared in the code but I never added it to View. When I try to remove it without adding it, I had this issue.
If you renamed/moved your view controller class, make sure you've checked Inherit Module From Target on Identity inspector for your scene on the storyboard

Strange errors when linking to libmariadb

I'm currently develop an Objective-C library that links to the MariaDB C connector. I believe there is a problem with the library, though.
Every time I execute my code I get very strange errors on the console. The -(id)init method of my library calls mysql_init(NULL) to initialise the library but as soon as I return from -(id)init I get the following errors in the console:
Object 0x10643df70 of class XXX autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug
Thing is, there is no multithreaded code being executed and if I run the same - (id)init without the call to mysql_init(NULL) the errors disappear. I believe the libmariadb library is causing these errors to appear. I don't get why though.
Do I need to build it with any special command line switches? Am I calling the right methods? I obviously used the MySQL online documentation as a guide.
Make sure you add this anytime you have a new thread:
#autoreleasepool {
//enter code here
}
Have you tried latest revision from launchpad?
Also try to build libmariadb with -DUNDEF_THREADS_HACK and
CMAKE_USE_PTHREADS:BOOL=OFF)
I was busy with other stuff for a while. I've since updated MariaDB to the latest version and, as far as I can tell, it works fine.