Pushing (Push-)buttons causes exceptions

-1

today I've got a special problem. I have a Raspberry Pi running Win10IoT, with a pushbutton connected to GPIO6. In my App, there's an Ellipse, which should be painted red, when the button is pressed. It worked.. until today! I've added a MediaElement with a simple ComboBox to load some music, but now the pushbutton throws an exception:

The application called an interface that was marshalled for a different thread. (Excep_FromHResult 0x8001010E)

Another problem: The second page "Mehr Wetter...", in english "more weather" opens a new frame. At the bottom left of this new frame, there's a back button, which should lead you back to the MainPage. But clicking this button also throws an exception: "The process cannot access the file because it is being used by another process."

Because at least the second error doesn't happen under x86, I assumed, it's a hardware problem. I already re-installed Win10IoT on the Pi, but it's still the same and unfortunately I don't have a second Raspberry to test it.

Is there anybody out there, who can help me?

I've uploaded the complete solution here!

c#
exception
raspberry-pi
uwp
asked on Stack Overflow Oct 27, 2016 by Dada93 • edited Oct 31, 2016 by DanielBarbarian

1 Answer

0

Alright, seems I've sold at least the second problem. It was a problem with opening the GPIO-Pins. When you leave and re-enter the MainPage, the program tries to open the pin again. So, if anyone has the same problem, just dispose the GPIOs before leaving the page.

According to the first problem, it seems, that I can't manipulate elements inside a hub. Maybe it's a problem with the Dispatcher, but I'm on it.

answered on Stack Overflow Oct 28, 2016 by Dada93

User contributions licensed under CC BY-SA 3.0