I created a JavaFX/1.8.0_60 app on Windows 7 64 bit with MSI/EXE native installers. The app installs correctly system-msi/user-exe level but when clicking desktop shortcut my application window is sometimes blank and I need to reboot to make it work.
Running native distributions with debug settings indicates some missing prism info/loading:
jvmArgs = ['-verbose:class']
systemProperties = ['javafx.verbose':'true', 'prism.verbose':'true']
Before reboot - window is blank
(System.out)
Prism pipeline init order: d3d sw
Using native-based Pisces rasterizer
Using dirty region optimizations
Not using texture mask for primitives
Not forcing power of 2 sizes for textures
Using hardware CLAMP_TO_ZERO mode
Opting in for HiDPI pixel scaling
Prism pipeline name = com.sun.prism.d3d.D3DPipeline
QLoading D3D native library ...
succeeded.
Direct3D initialization succeeded
(X) Got class = class com.sun.prism.d3d.D3DPipeline
Initialized prism pipeline: com.sun.prism.d3d.D3DPipeline
(System.err)
Loaded C:\Users\me\AppData\Local\myapp\runtime\lib\ext\..\..\bin\msvcr120.dll from relative path
Loaded C:\Users\me\AppData\Local\myapp\runtime\lib\ext\..\..\bin\msvcp120.dll from relative path
Loaded C:\Users\me\AppData\Local\myapp\runtime\lib\ext\..\..\bin\prism_d3d.dll from relative path
D3DPipelineManager: Created D3D9Ex device
JavaFX: using com.sun.javafx.tk.quantum.QuantumToolkit
Loaded C:\Users\me\AppData\Local\myapp\runtime\lib\ext\..\..\bin\glass.dll from relative path
vsync: true vpipe: true
Loaded C:\Users\me\AppData\Local\myapp\runtime\lib\ext\..\..\bin\javafx_font.dll from relative path
After reboot - window is correct
(System.out)
Prism pipeline init order: d3d sw
Using native-based Pisces rasterizer
Using dirty region optimizations
Not using texture mask for primitives
Not forcing power of 2 sizes for textures
Using hardware CLAMP_TO_ZERO mode
Opting in for HiDPI pixel scaling
Prism pipeline name = com.sun.prism.d3d.D3DPipeline
Loading D3D native library ...
succeeded.
Direct3D initialization succeeded
(X) Got class = class com.sun.prism.d3d.D3DPipeline
Initialized prism pipeline: com.sun.prism.d3d.D3DPipeline
OS Information:
Windows 7 build 7601
D3D Driver Information:
Intel(R) HD Graphics
\\.\DISPLAY1
Driver igdumd64.dll, version 8.15.10.2752
Pixel Shader version 3.0
Device : ven_8086, dev_0102, subsys_307017AA
Max Multisamples supported: 4
Loading Prism common native library ...
succeeded.
(System.err)
Loaded C:\Users\me\AppData\Local\myapp\runtime\lib\ext\..\..\bin\msvcr120.dll from relative path
Loaded C:\Users\me\AppData\Local\myapp\runtime\lib\ext\..\..\bin\msvcp120.dll from relative path
Loaded C:\Users\me\AppData\Local\myapp\runtime\lib\ext\..\..\bin\prism_d3d.dll from relative path
D3DPipelineManager: Created D3D9Ex device
JavaFX: using com.sun.javafx.tk.quantum.QuantumToolkit
Loaded C:\Users\me\AppData\Local\myapp\runtime\lib\ext\..\..\bin\glass.dll from relative path
Maximum supported texture size: 8192
Maximum texture size clamped to 4096
vsync: true vpipe: true
Loaded C:\Users\me\AppData\Local\myapp\runtime\lib\ext\..\..\bin\javafx_font.dll from relative path
Loaded C:\Users\me\AppData\Local\myapp\runtime\lib\ext\..\..\bin\prism_common.dll from relative path
Any ideas why graphics/prism wont load and how to diagnose further on Windows 7 so that I don't need to reboot is appreciated.
Thanks,
Paul
Related
I want to use my TPM as hardware random generator. I am building a system using Yocto for the AM6642-SK platform from Texas Instruments. meta-ti by default uses something called OPTEE to generate random numbers. I would like to give up this completely and enable hardware support for random number generation in the form of my TPM SLB9670. Does anyone have similar experiences with meta-ti and know how to do it?
Thanks.
[EDIT] I set kernel Kconfig options:
CONFIG_OPTEE=n
CONFIG_HW_RANDOM=y
CONFIG_HW_RANDOM_TPM=y
and I can see that in cat /sys/class/misc/hw_random/rng_available there is: tpm-rng-0
also in: cat /sys/class/misc/hw_random/rng_current there is: tpm-rng-0
So it seems that tmp as /dev/hwrng is enabled but still after boot up CPU load is 100%...
/dev/tpm0 device is present and it works
I would like to ask the following a question: im using stm32g0xx microcontroller and i want to change the flash address in linker script automatically and not be forced to changed manually every time i want to generate an apllication image to let it run from diffrent address. what im doing i wrote an application and i wrote it to tow different address"0x08001000 and 0x08004800" to have the apility to switch to other application incase one of them is updated or damaged. it worked fine but i need by every image to change the flash address manually and i would like to ask if it is possible to changed somewhere else out of the linker script like startup.s?
MEMORY
{
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 8K
FLASH (rx) : ORIGIN = 0x8001000, LENGTH = 32K
}
MEMORY
{
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 8K
FLASH (rx) : ORIGIN = 0x8004800, LENGTH = 32K
}
You can create two linker files and compile two times, each time with a different linker script and a different output binary. You will obtain the two necessary binaries. To integrate it on your project, it depends on your way of working (STM IDE, standalone Makefile...) which you did not mention.
As a side note, you should modify the LENGTH on your linker scripts, it will prevent the linker to place data where you have another application.
Your first application starts at 4KB (0x1000), and the second start at 18KB (0x4800), the lenght of the first application should be 18-4 = 16KB and the second LENGTH should be 32-18 = 14KB (if the FLASH total size is 32KB).
You can write two different linker script and apply one or the other in your building enviroment (with the -T linker flag) or you can use a variable for your ORIGIN and pass it with -Wl,--defsym=<VAR_NAME>=<VAR_VALUE>
I have use androidx with blur image, but when run android api< 19 crash app.
When i run with android>19, i run normal,not crash app and if i use android normal with "android.support.v8.renderscript" no crash app.
At build.gradle. I have add :
renderscriptTargetApi 18
renderscriptSupportModeEnabled true
Code app:
public static Bitmap blurBitmap(Bitmap bitmap,
float radius) { //Create renderscript
RenderScript
rs = RenderScript.create(MyApplication.getInstance());
//Create allocation from Bitmap
Allocation allocation = Allocation.createFromBitmap(rs,
bitmap);
Type t = allocation.getType();
//Create allocation with the same type
Allocation blurredAllocation = Allocation.createTyped(rs,
t);
//Create script
ScriptIntrinsicBlur blurScript = ScriptIntrinsicBlur.create(rs, Element.U8(rs));
//Set blur radius (maximum 25.0)
blurScript.setRadius(radius);
//Set input for script
blurScript.setInput(allocation);
//Call script for output allocation
blurScript.forEach(blurredAllocation);
//Copy script result into bitmap
blurredAllocation.copyTo(bitmap);
//Destroy everything to free memory
allocation.destroy();
blurredAllocation.destroy();
blurScript.destroy();
t.destroy();
rs.destroy();
return bitmap;
}
Edit:
This issue is now fixed in the latest build tools. I've verified this by upgrading compile sdk to API 29 and build tools to 29.0.2.
This has nothing to do with your implementation. It's a bug in the androidx library and in fact, it happens for me even on API 21 so it might have a bigger impact than you've experienced.
Someone has already filed issues here and here. I've been following on the issue for quite sometime unfortunately there isn't much progress going on. This is currently a showstopper for me to migrate to AndroidX for many of my projects.
The Element.U8 argument for ScriptIntrinsicBlur.create() is not correct.
The ScriptIntrinsicBlur is expecting an Allocation with elements of type Element.U8, but a Bitmap-backed Allocation has elements of type Element.RGBA_8888 (a.k.a Element.U8_4).
try:
ScriptIntrinsicBlur.create(rs, Element.RGBA_8888(rs))
or in general:
ScriptIntrinsicBlur.create(rs, allocation.getElement())
I'm working on a sony Xperia Z1 codename honami, rhine board which works on top of MSM8974 SoC.
Yields after cat /proc/cpuinfo (as expected):
Hardware : Qualcomm MSM 8974 (Flattened Device Tree)
in my rootdir I have a ueventd.rhine.rc file which sets a handful of permissions which aren't being set. I tried replacing it with an uevent.qcom.rc instead with no avail.
Any insights?
I figured by my own what was happening. Some sources say that the
< device_name > part as in ueventd.<device_name>.rc is supposedly to be taken from the following:
Hardware : Qualcomm MSM 8974 (Flattened Device Tree)
as part of the result fetched from /proc/cpuinfo. It's somehow true, but only in a few cases. If init can take this part from the kernel command line it will.
From ueventd.c:
/* Respect hardware passed in through the kernel cmd line. Here we will look
* for androidboot.hardware param in kernel cmdline, and save its value in
* hardware[]. */
import_kernel_cmdline(0, import_kernel_nv);
get_hardware_name(hardware, &revision);
ueventd_parse_config_file("/ueventd.rc");
snprintf(tmp, sizeof(tmp), "/ueventd.%s.rc", hardware);
ueventd_parse_config_file(tmp);
Apart from that, my honami hardware is passed to this cmdline, and then is taken, therefore the right name for that file in my system should be ueventd.honami.rc.
I am building a game in which I need to change its theme at runtime according to player's choice. Here is a chunk of code to change background image:
string path;
string themeName;
themeName = PlayerPrefs.GetString("Theme_Name");
//Change Background Image
path = "Assets/Textures/" + themeName + "/Background.jpg";
Background_Image.GetComponent<Image>().sprite = Resources.LoadAssetAtPath<Sprite>(path);
This works perfectly in Unity however no image gets applied to the background when I export the game for Windows 8.1. The variable 'path' evaluates to "Assets/Textures/Default/Background.jpg" which is the right path and works for Unity project but not Windows.
Do I need to separately export my images folder or use a different path after exporting game or something? Might be a very stupid thing but I am kinda lost here
Use Resources.Load instead. Resources.LoadAssetAtPath works only in the Editor.
Create a folder called "Resources" under the "Assets" folder. Move all your images to this folder.
Then change your code to the below
path = themeName + "/Background.jpg";
Background_Image.GetComponent<Image>().sprite = Resources.Load<Sprite>(path);
The above code assumes that you have a subfolder named with your themes inside the Resources folder.
For example, if one of your themes is called "Theme1", then the background Image should be stored in {Your_Project_Folder}/Assets/Resources/Theme1/Background.jpg