My Windows 10 PCs don't show programs of graphic.

Windows specific questions.
Makoto WATANABE
Posts: 118
Joined: Apr 10, 2010 11:41
Location: Japan
Contact:

My Windows 10 PCs don't show programs of graphic.

Postby Makoto WATANABE » Jun 29, 2019 14:49

On my Windows 10 PCs, the graphic display programs end after displaying a white window for a while.
My Windows10 machines.
ASUS T100TA Atom Z3740 1.3GHz Win 10 32bit
ASUS AiO ET2232IUK Celeron J1800 2.4GHz Win 10 64bit
ThinkPad E570 i7-7500U 2.7GHz Win 10 64bit

On Windows 8.1 PC, these graphics are displayed correctly.
I hope this improves.

Program examples of graphic display.
https://www.freebasic.net/forum/viewtopic.php?f=7&t=27514
https://www.freebasic.net/forum/viewtopic.php?f=7&t=15284&start=15
https://www.freebasic.net/forum/viewtopic.php?f=7&t=17702&start=15
fxm
Posts: 9178
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: My Windows 10 PCs don't show programs of graphic.

Postby fxm » Jun 29, 2019 15:51

In the code of the first link, I see a common coding error among users:
When an image buffer is created (Imagecreate(xres,yres)), any point (x,y) drawn inside this image buffer must check:
0 <= x <= xres-1
and
0 <= y <= yres-1

(in particular, x = xres and y = yres are also forbidden)
otherwise, there is writing outside the allocated memory, which can cause a crash of the program.

It's complicated to check everything in this code but I see at least some points drawn with xres or yres as coordinates.
Makoto WATANABE
Posts: 118
Joined: Apr 10, 2010 11:41
Location: Japan
Contact:

Re: My Windows 10 PCs don't show programs of graphic.

Postby Makoto WATANABE » Jul 06, 2019 7:22

I checked the error status with the Windows Event Viewer.
The program ended with the following two exception codes:
0xc0000005 , 0xc000041d

Please let me know if there is a solution.
dodicat
Posts: 5938
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: My Windows 10 PCs don't show programs of graphic.

Postby dodicat » Jul 06, 2019 8:35

Hi Makoto WATANABE
Link 1
I try to be careful with direct pixel drawing, but you could try
lines 129
' _ppoint(x,y,col)
col=point(x,y,tim)
i.e. comment out _ppoint(x,y,col) and use col=point(x,y,tim)

and lines 141
'ppset((NewPoints(x,y).x),(NewPoints(x,y).y),averagecolour)
pset im,((NewPoints(x,y).x),(NewPoints(x,y).y)),averagecolour
i.e. do the same thing with pset

If you do these two things, freebasic point and pset have inbuilt clipping which should be safe in all cases, although these functions are slower than direct pixels.
Makoto WATANABE
Posts: 118
Joined: Apr 10, 2010 11:41
Location: Japan
Contact:

Re: My Windows 10 PCs don't show programs of graphic.

Postby Makoto WATANABE » Jul 06, 2019 16:16

Dear All;

Thanks for your advices.
I think my Win10 PCs have a basic problem.
My Win10 PCs can not even display "Hello World!".

Code: Select all

' Sets 320x240 in 32bpp color depth
Screen 14, 32

' Sets orange foreground and dark blue background color
Color RGB(255, 128, 0), RGB(0, 0, 64)

' Clears the screen to the background color
Cls                     

' Prints "Hello World!" in the middle of the screen
Locate 15, 14
Print "Hello World!"

Sleep


Fortunately, I bypassed the free update to Windows 10 with one "Win8.1 PC".
I am going to enjoy FreeBASIC graphics programs with this Win8.1 PC .
Thanks for your concern.
MrSwiss
Posts: 3262
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: My Windows 10 PCs don't show programs of graphic.

Postby MrSwiss » Jul 06, 2019 17:32

There is absolutely nothing wrong with that "Hello World" example in WIN 10.
(It works as expected.)

There may be a problem, with the "Japanese" (translated) version only.
This would mean, that contacting "Microsoft-Japan" would be the only path,
in order to resolve the problem. (I've once had a similar issue, with a "Germa-
nized" version of DOS (4.0/4.01 IIRC).)

The very reason that, since then, I'm only using "native language" OS's.
(aka: language = US-EN)
Makoto WATANABE
Posts: 118
Joined: Apr 10, 2010 11:41
Location: Japan
Contact:

Re: My Windows 10 PCs don't show programs of graphic.

Postby Makoto WATANABE » Jul 07, 2019 1:51

Dear MrSwiss;

Thank you for your advice.
Your guess was a great answer.
I changed my Win10PC to language = US-EN.
Then the graphic programs were displayed successfully.
("Hello World!" Is not Japanese but English.)
Image

I shall contact "Microsoft-Japan" .

Return to “Windows”

Who is online

Users browsing this forum: No registered users and 12 guests