Difference between revisions of "Neurobs Presentation"

From TSG Doc
Jump to navigation Jump to search
(Created page with "== General == == Course == == Tutorial == == Templates == == Designing Principles == == Code Layout and formatting ==")
 
 
(83 intermediate revisions by 6 users not shown)
Line 1: Line 1:
== General ==
+
{{see also|Presentation}}
 +
This page documents some bugs we encountered in Presentation. Users should go to the [[Presentation]] page.
  
== Course ==
+
== Screen synchronization issue on 120 Hz screens ==
 +
There is a serious synchronization issue where the picture.present() method returns one frame too early. It can be detected by measuring the time between two consecutive present() calls returning:
  
== Tutorial ==
+
<pre>
 +
wait_interval(220);
 +
picture1.present();
 +
int t0 = clock.time();
 +
picture2.present();
 +
int t1 = clock.time();
 +
int dt = t1-t0;
 +
</pre>
  
== Templates ==
+
One would expect ''picture1'' to be shown for 1 frame (1/120 s) and time ''dt'' to show this. Sometimes this is not the case. The image will be shown for one frame (1/120 s), but ''dt'' will be 2/120 s:
  
== Designing Principles ==
+
[[File:Timeline.svg|400px|none|synchronization bug timeline]]
  
== Code Layout and formatting ==
+
The fact that ''picture1'' is shown for only 1/120 s was confirmed with a light sensor connected to an oscilloscope.
 +
 
 +
The chance of this issue occurring is highly dependent on the waiting time prior to the first ''present()'' call:
 +
 
 +
[[File:Occurrence.png|400px|none|synchronization bug occurrence]]
 +
 
 +
Neurobs people seem to [http://www.neurobs.com/menu_support/menu_forums/view_thread?id=9463&expand_all=1 think] it has something to do with triple buffering, but the graph above was created without triple buffering enabled.
 +
[[File:Failsync2.png|none|Difference of arrival times of two consecutive markers (no red bars are hidden)]]
 +
 
 +
<!--==References==
 +
<references/>-->

Latest revision as of 11:36, 18 January 2016

See also: Presentation

This page documents some bugs we encountered in Presentation. Users should go to the Presentation page.

Screen synchronization issue on 120 Hz screens

There is a serious synchronization issue where the picture.present() method returns one frame too early. It can be detected by measuring the time between two consecutive present() calls returning:

wait_interval(220);
picture1.present();
int t0 = clock.time(); 
picture2.present();
int t1 = clock.time(); 
int dt = t1-t0;

One would expect picture1 to be shown for 1 frame (1/120 s) and time dt to show this. Sometimes this is not the case. The image will be shown for one frame (1/120 s), but dt will be 2/120 s:

synchronization bug timeline

The fact that picture1 is shown for only 1/120 s was confirmed with a light sensor connected to an oscilloscope.

The chance of this issue occurring is highly dependent on the waiting time prior to the first present() call:

synchronization bug occurrence

Neurobs people seem to think it has something to do with triple buffering, but the graph above was created without triple buffering enabled.

Difference of arrival times of two consecutive markers (no red bars are hidden)