与皮肤相关的 CN1 崩溃?
CN1 crash linked to skins?
我刚刚更新到最新的 CN1 源,但现在我得到了一个之前编译的项目的以下错误。是否知道导致此问题的原因?
注意。我已经为这个演示示例激活了 CSS,因为我正在尝试调试我遇到的问题。请注意“加载皮肤文件失败:/iPhoneX.skin”这一行。我已经为这个项目重新加载了CN1设置,所以据我所知iPhoneX皮肤应该在那里。
如果我做了一些愚蠢的事情,请提前道歉,今晚我很唠叨:-)
JavaSE.build-skins:
JavaSE.init-skins:
DEPRECATED - The copydir task is deprecated. Use copy instead.
Copying 1 file to /Users/user/NetBeansProjects/CodenameOne/Ports/JavaSE/build/classes
Expanding: /Users/user/NetBeansProjects/cn1-binaries/javase/sqlite-jdbc-3.7.15-M1.jar into /Users/user/NetBeansProjects/CodenameOne/Ports/JavaSE/build/classes
Expanding: /Users/user/NetBeansProjects/cn1-binaries/javase/Filters.jar into /Users/user/NetBeansProjects/CodenameOne/Ports/JavaSE/build/classes
JavaSE.compile:
Building jar: /Users/user/NetBeansProjects/CodenameOne/Ports/JavaSE/dist/JavaSE.jar
To run this application from the command line without Ant, try:
/Library/Java/JavaVirtualMachines/jdk1.8.0_141.jdk/Contents/Home/jre/bin/java -cp /Users/user/NetBeansProjects/CodenameOne/CodenameOne/dist/CodenameOne.jar:/Users/user/NetBeansProjects/cn1-binaries/javase/sqlite-jdbc-3.7.15-M1.jar:/Users/user/NetBeansProjects/cn1-binaries/javase/Filters.jar:/Users/user/NetBeansProjects/cn1-binaries/javase/jcef.jar:/Users/user/NetBeansProjects/cn1-binaries/javase/jmf-2.1.1e.jar:/Users/user/NetBeansProjects/cn1-binaries/jfxrt.jar:/Users/user/NetBeansProjects/CodenameOne/Ports/JavaSE/dist/JavaSE.jar com.codename1.impl.javase.Simulator
JavaSE.deploy:
JavaSE.jar:
Retina Scale: 2.0
Using stateful mode. Use -help flag to see options for new stateless mode.
Updating merge file /Users/user/NetBeansProjects/safearedemo/css/theme.css.merged
Compiling /Users/user/NetBeansProjects/safearedemo/css/theme.css.merged to /Users/user/NetBeansProjects/safearedemo/src/theme.res
File has not changed since last compile.
CSS file successfully compiled. /Users/user/NetBeansProjects/safearedemo/src/theme.res
Compile is forcing compliance to the supported API's/features for maximum device compatibility. This allows smaller
code size and wider device support
compile:
run:
Adding CEF to classpath
Found theme.css file. Watching for changes...
CSS> Retina Scale: 2.0
CSS> Using stateful mode. Use -help flag to see options for new stateless mode.
CSS> Looks like this CSS file needs CEF on classpath... adding it now, and retrying...
CSS> Adding CEF to classpath
Retina Scale: 2.0
Failed loading the skin file: /iPhoneX.skin
java.lang.NullPointerException
at com.codename1.impl.javase.JavaSEPort.initializeCoordinates(JavaSEPort.java:2270)
at com.codename1.impl.javase.JavaSEPort.loadSkinFile(JavaSEPort.java:2491)
at com.codename1.impl.javase.JavaSEPort.loadSkinFile(JavaSEPort.java:4400)
at com.codename1.impl.javase.JavaSEPort.init(JavaSEPort.java:4612)
at com.codename1.impl.CodenameOneImplementation.initImpl(CodenameOneImplementation.java:178)
at com.codename1.ui.Display.init(Display.java:500)
at com.codename1.impl.javase.Executor.run(Executor.java:242)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access0(EventQueue.java:97)
at java.awt.EventQueue.run(EventQueue.java:709)
at java.awt.EventQueue.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
CSS> Retina Scale: 2.0
CSS> Using stateful mode. Use -help flag to see options for new stateless mode.
CSS> Updating merge file /Users/user/NetBeansProjects/safearedemo/css/theme.css.merged
CSS> Starting watch thread to watch [/Users/user/NetBeansProjects/safearedemo/css/theme.css]
CSS> Compiling /Users/user/NetBeansProjects/safearedemo/css/theme.css.merged to /Users/user/NetBeansProjects/safearedemo/src/theme.res
CSS> File has not changed since last compile.
CSS> CSS file successfully compiled. /Users/user/NetBeansProjects/safearedemo/src/theme.res
java.lang.reflect.InvocationTargetException
at java.awt.EventQueue.invokeAndWait(EventQueue.java:1321)
at java.awt.EventQueue.invokeAndWait(EventQueue.java:1296)
at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1348)
at com.codename1.impl.javase.JavaSEPort$C.blit(JavaSEPort.java:1392)
at com.codename1.impl.javase.JavaSEPort.flushGraphics(JavaSEPort.java:5613)
at com.codename1.impl.javase.JavaSEPort$C.run(JavaSEPort.java:1557)
at com.codename1.ui.Display.processSerialCalls(Display.java:1338)
at com.codename1.ui.Display.mainEDTLoop(Display.java:1125)
at com.codename1.ui.RunnableWrapper.run(RunnableWrapper.java:120)
at com.codename1.impl.CodenameOneThread.run(CodenameOneThread.java:176)
Caused by: java.lang.NullPointerException
at com.codename1.impl.javase.JavaSEPort$C.drawScreenBuffer(JavaSEPort.java:1467)
at com.codename1.impl.javase.JavaSEPort$C.access0(JavaSEPort.java:1189)
at com.codename1.impl.javase.JavaSEPort$C.run(JavaSEPort.java:1358)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:301)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access0(EventQueue.java:97)
at java.awt.EventQueue.run(EventQueue.java:709)
at java.awt.EventQueue.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Rendering frame took too long 6473 milliseconds
java.lang.reflect.InvocationTargetException
at java.awt.EventQueue.invokeAndWait(EventQueue.java:1321)
at java.awt.EventQueue.invokeAndWait(EventQueue.java:1296)
at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1348)
at com.codename1.impl.javase.JavaSEPort$C.blit(JavaSEPort.java:1392)
at com.codename1.impl.javase.JavaSEPort$C.blit(JavaSEPort.java:1400)
at com.codename1.impl.javase.JavaSEPort.flushGraphics(JavaSEPort.java:5602)
at com.codename1.impl.CodenameOneImplementation.paintDirty(CodenameOneImplementation.java:644)
at com.codename1.impl.javase.JavaSEPort.paintDirty(JavaSEPort.java:2247)
at com.codename1.ui.Display.edtLoopImpl(Display.java:1259)
at com.codename1.ui.Display.mainEDTLoop(Display.java:1162)
at com.codename1.ui.RunnableWrapper.run(RunnableWrapper.java:120)
at com.codename1.impl.CodenameOneThread.run(CodenameOneThread.java:176)
Caused by: java.lang.NullPointerException
at com.codename1.impl.javase.JavaSEPort$C.drawScreenBuffer(JavaSEPort.java:1467)
at com.codename1.impl.javase.JavaSEPort$C.access0(JavaSEPort.java:1189)
at com.codename1.impl.javase.JavaSEPort$C.run(JavaSEPort.java:1358)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:301)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access0(EventQueue.java:97)
at java.awt.EventQueue.run(EventQueue.java:709)
at java.awt.EventQueue.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
如果您使用源代码,那么 iPhoneX 的皮肤文件需要在 JavaSEPort/src 中。通常构建脚本会复制它,但我们在构建过程中进行了一些更改,这可能不再是无缝的。
我刚刚更新到最新的 CN1 源,但现在我得到了一个之前编译的项目的以下错误。是否知道导致此问题的原因?
注意。我已经为这个演示示例激活了 CSS,因为我正在尝试调试我遇到的问题。请注意“加载皮肤文件失败:/iPhoneX.skin”这一行。我已经为这个项目重新加载了CN1设置,所以据我所知iPhoneX皮肤应该在那里。
如果我做了一些愚蠢的事情,请提前道歉,今晚我很唠叨:-)
JavaSE.build-skins:
JavaSE.init-skins:
DEPRECATED - The copydir task is deprecated. Use copy instead.
Copying 1 file to /Users/user/NetBeansProjects/CodenameOne/Ports/JavaSE/build/classes
Expanding: /Users/user/NetBeansProjects/cn1-binaries/javase/sqlite-jdbc-3.7.15-M1.jar into /Users/user/NetBeansProjects/CodenameOne/Ports/JavaSE/build/classes
Expanding: /Users/user/NetBeansProjects/cn1-binaries/javase/Filters.jar into /Users/user/NetBeansProjects/CodenameOne/Ports/JavaSE/build/classes
JavaSE.compile:
Building jar: /Users/user/NetBeansProjects/CodenameOne/Ports/JavaSE/dist/JavaSE.jar
To run this application from the command line without Ant, try:
/Library/Java/JavaVirtualMachines/jdk1.8.0_141.jdk/Contents/Home/jre/bin/java -cp /Users/user/NetBeansProjects/CodenameOne/CodenameOne/dist/CodenameOne.jar:/Users/user/NetBeansProjects/cn1-binaries/javase/sqlite-jdbc-3.7.15-M1.jar:/Users/user/NetBeansProjects/cn1-binaries/javase/Filters.jar:/Users/user/NetBeansProjects/cn1-binaries/javase/jcef.jar:/Users/user/NetBeansProjects/cn1-binaries/javase/jmf-2.1.1e.jar:/Users/user/NetBeansProjects/cn1-binaries/jfxrt.jar:/Users/user/NetBeansProjects/CodenameOne/Ports/JavaSE/dist/JavaSE.jar com.codename1.impl.javase.Simulator
JavaSE.deploy:
JavaSE.jar:
Retina Scale: 2.0
Using stateful mode. Use -help flag to see options for new stateless mode.
Updating merge file /Users/user/NetBeansProjects/safearedemo/css/theme.css.merged
Compiling /Users/user/NetBeansProjects/safearedemo/css/theme.css.merged to /Users/user/NetBeansProjects/safearedemo/src/theme.res
File has not changed since last compile.
CSS file successfully compiled. /Users/user/NetBeansProjects/safearedemo/src/theme.res
Compile is forcing compliance to the supported API's/features for maximum device compatibility. This allows smaller
code size and wider device support
compile:
run:
Adding CEF to classpath
Found theme.css file. Watching for changes...
CSS> Retina Scale: 2.0
CSS> Using stateful mode. Use -help flag to see options for new stateless mode.
CSS> Looks like this CSS file needs CEF on classpath... adding it now, and retrying...
CSS> Adding CEF to classpath
Retina Scale: 2.0
Failed loading the skin file: /iPhoneX.skin
java.lang.NullPointerException
at com.codename1.impl.javase.JavaSEPort.initializeCoordinates(JavaSEPort.java:2270)
at com.codename1.impl.javase.JavaSEPort.loadSkinFile(JavaSEPort.java:2491)
at com.codename1.impl.javase.JavaSEPort.loadSkinFile(JavaSEPort.java:4400)
at com.codename1.impl.javase.JavaSEPort.init(JavaSEPort.java:4612)
at com.codename1.impl.CodenameOneImplementation.initImpl(CodenameOneImplementation.java:178)
at com.codename1.ui.Display.init(Display.java:500)
at com.codename1.impl.javase.Executor.run(Executor.java:242)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access0(EventQueue.java:97)
at java.awt.EventQueue.run(EventQueue.java:709)
at java.awt.EventQueue.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
CSS> Retina Scale: 2.0
CSS> Using stateful mode. Use -help flag to see options for new stateless mode.
CSS> Updating merge file /Users/user/NetBeansProjects/safearedemo/css/theme.css.merged
CSS> Starting watch thread to watch [/Users/user/NetBeansProjects/safearedemo/css/theme.css]
CSS> Compiling /Users/user/NetBeansProjects/safearedemo/css/theme.css.merged to /Users/user/NetBeansProjects/safearedemo/src/theme.res
CSS> File has not changed since last compile.
CSS> CSS file successfully compiled. /Users/user/NetBeansProjects/safearedemo/src/theme.res
java.lang.reflect.InvocationTargetException
at java.awt.EventQueue.invokeAndWait(EventQueue.java:1321)
at java.awt.EventQueue.invokeAndWait(EventQueue.java:1296)
at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1348)
at com.codename1.impl.javase.JavaSEPort$C.blit(JavaSEPort.java:1392)
at com.codename1.impl.javase.JavaSEPort.flushGraphics(JavaSEPort.java:5613)
at com.codename1.impl.javase.JavaSEPort$C.run(JavaSEPort.java:1557)
at com.codename1.ui.Display.processSerialCalls(Display.java:1338)
at com.codename1.ui.Display.mainEDTLoop(Display.java:1125)
at com.codename1.ui.RunnableWrapper.run(RunnableWrapper.java:120)
at com.codename1.impl.CodenameOneThread.run(CodenameOneThread.java:176)
Caused by: java.lang.NullPointerException
at com.codename1.impl.javase.JavaSEPort$C.drawScreenBuffer(JavaSEPort.java:1467)
at com.codename1.impl.javase.JavaSEPort$C.access0(JavaSEPort.java:1189)
at com.codename1.impl.javase.JavaSEPort$C.run(JavaSEPort.java:1358)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:301)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access0(EventQueue.java:97)
at java.awt.EventQueue.run(EventQueue.java:709)
at java.awt.EventQueue.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Rendering frame took too long 6473 milliseconds
java.lang.reflect.InvocationTargetException
at java.awt.EventQueue.invokeAndWait(EventQueue.java:1321)
at java.awt.EventQueue.invokeAndWait(EventQueue.java:1296)
at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1348)
at com.codename1.impl.javase.JavaSEPort$C.blit(JavaSEPort.java:1392)
at com.codename1.impl.javase.JavaSEPort$C.blit(JavaSEPort.java:1400)
at com.codename1.impl.javase.JavaSEPort.flushGraphics(JavaSEPort.java:5602)
at com.codename1.impl.CodenameOneImplementation.paintDirty(CodenameOneImplementation.java:644)
at com.codename1.impl.javase.JavaSEPort.paintDirty(JavaSEPort.java:2247)
at com.codename1.ui.Display.edtLoopImpl(Display.java:1259)
at com.codename1.ui.Display.mainEDTLoop(Display.java:1162)
at com.codename1.ui.RunnableWrapper.run(RunnableWrapper.java:120)
at com.codename1.impl.CodenameOneThread.run(CodenameOneThread.java:176)
Caused by: java.lang.NullPointerException
at com.codename1.impl.javase.JavaSEPort$C.drawScreenBuffer(JavaSEPort.java:1467)
at com.codename1.impl.javase.JavaSEPort$C.access0(JavaSEPort.java:1189)
at com.codename1.impl.javase.JavaSEPort$C.run(JavaSEPort.java:1358)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:301)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access0(EventQueue.java:97)
at java.awt.EventQueue.run(EventQueue.java:709)
at java.awt.EventQueue.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
如果您使用源代码,那么 iPhoneX 的皮肤文件需要在 JavaSEPort/src 中。通常构建脚本会复制它,但我们在构建过程中进行了一些更改,这可能不再是无缝的。