UWP Build = Black Screen

45 views
Skip to first unread message

howud...@gmail.com

unread,
Oct 19, 2017, 2:01:49 PM10/19/17
to CodenameOne Discussions
I have an app that has been in production for a while on iOS and Android, now there is one user who wants to run it on their surface pro.  So I did a windows uwp build following the instructions here:https://www.codenameone.com/manual/appendix-uwp.html

I saw the bug report here:https://github.com/codenameone/CodenameOne/issues/2114 but it shows as closed and fixed.

Questions:
1.  Any ideas on the black screen?
2.  The link mentioned somewhere about MS supporting android apk is dead
3.  Would it be easier to implement the new MS iOS app to UWP app bridge? https://developer.microsoft.com/en-us/windows/bridges



Steve Hannah

unread,
Oct 19, 2017, 2:36:32 PM10/19/17
to codenameone...@googlegroups.com
Likely it is crashing on start.  Without the stack trace it is hard to know what is going on there.  If you're a pro user you can turn on crash reporting and it will send you the crash report in email.  Otherwise you can select "include sources", and open the project in Visual Studio if you have that to see the debug log.

Do you also get a black screen if you just build a hello world app?



--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discussions+unsub...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/37a197ac-9c17-4a6f-ad02-1bbddc22ad22%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Steve Hannah
Software Developer
Codename One

howud...@gmail.com

unread,
Oct 20, 2017, 9:20:42 PM10/20/17
to CodenameOne Discussions
I upgraded to the pro plan, and 27 builds later I still dont have a crash report.
Hello World works, so I removed code until it worked and then started to add it all back in one line at a time.  Add a line, build, uninstall app, install app, watch it crash or not crash, goto Add a line.

Here is the offending line, as well as a hello world app that reproduces the problem:

Crash here:
        btnLogin.setIcon(FontImage.createMaterial(FontImage.MATERIAL_CLOUD_DOWNLOAD, UIManager.getInstance().getComponentStyle("Command"), 5));


Full hello world app:
        Form hi = new Form("Hi World");
        hi.setLayout(new BorderLayout());
        Button btnLogin = new Button("Test");
        btnLogin.setIcon(FontImage.createMaterial(FontImage.MATERIAL_CLOUD_DOWNLOAD, UIManager.getInstance().getComponentStyle("Command"), 5));
        hi.add(BorderLayout.CENTER, btnLogin);
        
        hi.show();


I feel like I was stuck in the shower following the instructions on the shampoo...wash, rinse, repeat...wash, rinse, repeat  there's no break in that loop :)

Peter

On Thursday, October 19, 2017 at 11:36:32 AM UTC-7, Steve Hannah wrote:
Likely it is crashing on start.  Without the stack trace it is hard to know what is going on there.  If you're a pro user you can turn on crash reporting and it will send you the crash report in email.  Otherwise you can select "include sources", and open the project in Visual Studio if you have that to see the debug log.

Do you also get a black screen if you just build a hello world app?



On Thu, Oct 19, 2017 at 11:01 AM, <howud...@gmail.com> wrote:
I have an app that has been in production for a while on iOS and Android, now there is one user who wants to run it on their surface pro.  So I did a windows uwp build following the instructions here:https://www.codenameone.com/manual/appendix-uwp.html

I saw the bug report here:https://github.com/codenameone/CodenameOne/issues/2114 but it shows as closed and fixed.

Questions:
1.  Any ideas on the black screen?
2.  The link mentioned somewhere about MS supporting android apk is dead
3.  Would it be easier to implement the new MS iOS app to UWP app bridge? https://developer.microsoft.com/en-us/windows/bridges



-- 
--

Shai Almog

unread,
Oct 21, 2017, 12:24:13 AM10/21/17
to CodenameOne Discussions
If you use something like Log.p("Test"); Log.sendLog(); this should work even in the simulator. If it doesn't it's possible that your local account is building against a different account from the pro account. Notice that the account you are logged into might be a different one from the one you send builds to. You see the former in Codename One Settings. You see the latter printed to the IDE console when sending a build.

howud...@gmail.com

unread,
Oct 21, 2017, 11:12:53 AM10/21/17
to CodenameOne Discussions
Log.sendLog() works, or more precisely sends me a log file, 
String s = null; s.compareTo("test"); works

However the below code (which is also in my original post) crashes, and does not send a logfile.  BTW, I would rather focus on the crash and not on the fact there is no logfile.
        Form hi = new Form("Hi World");
        hi.setLayout(new BorderLayout());
        Button btnLogin = new Button("Test");
        btnLogin.setIcon(FontImage.createMaterial(FontImage.MATERIAL_CLOUD_DOWNLOAD, UIManager.getInstance().getComponentStyle("Command"), 5));
        hi.add(BorderLayout.CENTER, btnLogin);
        
        hi.show();




Shai Almog

unread,
Oct 22, 2017, 1:55:01 AM10/22/17
to CodenameOne Discussions
I think the problem is that the material font didn't update properly. I just pushed an update to that which would hopefully fix this issue. Our Windows server updates are just very flaky because of reliability issues with Windows 10.

howud...@gmail.com

unread,
Oct 22, 2017, 7:14:12 PM10/22/17
to CodenameOne Discussions
I just resent the build and it still crashes.  I'm still not getting crash reports.  BTW are you able to reproduce the problem?

Shai Almog

unread,
Oct 23, 2017, 12:01:04 AM10/23/17
to CodenameOne Discussions
I haven't tried to reproduce the problem because I've had some issues with my Windows devices. The MATERIAL_CLOUD_DOWNLOAD entry is a recent addition so I'm guessing something broke there with that specific entry. Steve might have a better clue on this.

Steve Hannah

unread,
Oct 24, 2017, 8:50:13 AM10/24/17
to codenameone...@googlegroups.com
I tried building an app with the code you posted

Form hi = new Form("Hi World");
        hi.setLayout(new BorderLayout());
        Button btnLogin = new Button("Test");
        btnLogin.setIcon(FontImage.createMaterial(FontImage.MATERIAL_CLOUD_DOWNLOAD, UIManager.getInstance().getComponentStyle("Command"), 5));
        hi.add(BorderLayout.CENTER, btnLogin);
        
        hi.show();


It worked fine.  Running on Windows 10 Surface Pro.

Inline image 1




On Sun, Oct 22, 2017 at 9:01 PM, Shai Almog <shai....@gmail.com> wrote:
I haven't tried to reproduce the problem because I've had some issues with my Windows devices. The MATERIAL_CLOUD_DOWNLOAD entry is a recent addition so I'm guessing something broke there with that specific entry. Steve might have a better clue on this.

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discussions+unsub...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages